function init() { // news title $oContentField = new AnwContentFieldPage_string(self::FIELD_TITLE); $oContentField->indexAs(self::PUB_TITLE); $this->addContentField($oContentField); // news intro $oContentField = new AnwContentFieldPage_xhtml(self::FIELD_INTRO); $this->addContentField($oContentField); // news body $oContentField = new AnwContentFieldPage_xhtml(self::FIELD_BODY); $oContentField->setDynamicParsingAllowed(true); $oContentField->setDynamicPhpAllowed(true); $this->addContentField($oContentField); // news date $oContentField = new AnwContentFieldPage_date(self::FIELD_DATE); $oContentField->setTranslatable(false); $oContentField->indexAs(self::PUB_DATE); $this->addContentField($oContentField); // news categories $oFetchingContentClass = AnwContentClasses::getContentClass(self::NEWSCATEGORY_CLASS); $oContentField = new AnwContentFieldPage_pageGroup(self::FIELD_CATEGORIES, $oFetchingContentClass); $oContentField->setTranslatable(false); $oContentMultiplicity = new AnwContentMultiplicity_multiple(); $oContentField->setMultiplicity($oContentMultiplicity); $oContentField->indexAs(self::PUB_CATEGORIES); $this->addContentField($oContentField); }
function init() { // page head $oContentField = new AnwContentFieldPage_xhtml(self::FIELD_HEAD); $oContentField->setTranslatable(false); $oContentField->setDynamicParsingAllowed(true); $oContentField->setDynamicPhpAllowed(true); $this->addContentField($oContentField); // page body $oContentField = new AnwContentFieldPage_xhtml(self::FIELD_BODY); $oContentField->setDynamicParsingAllowed(true); $oContentField->setDynamicPhpAllowed(true); $this->addContentField($oContentField); // page title $oContentField = new AnwContentFieldPage_string(self::FIELD_TITLE); $oContentField->indexAs(self::PUB_TITLE); $this->addContentField($oContentField); }