Share » Forums » Developer » PHP fetch the options stored in an...

PHP fetch the options stored in an class attribute

PHP fetch the options stored in an class attribute

Wednesday 22 March 2006 6:24:11 am - 2 replies

Author Message

Kristof Coomans

Wednesday 22 March 2006 9:31:36 am

Hi Felix

Did you fetch the right class attribute? Inspect it with

var_dump( $classAttribute );

If it's the right class attribute, take a look at it's content with

var_dump( $caContent );

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Betsy Gamrat

Wednesday 22 March 2006 10:30:15 am

eZ selections are stored as integers in data_int

$attribs =& $iObject->contentObjectAttributes();
	for($i=0;$i<count($attribs);$i++){
		switch($attribs[$i]->attribute("contentclass_attribute_identifier")) {
			case 'a':
	 			$attribs[$i]->setAttribute('data_int', $a );
	 			$attribs[$i]->store();
			break;
			case 'b':
				$attribs[$i]->setAttribute('data_int',$b);
				$attribs[$i]->store();
		}
	}

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu