function init() { // translation file name $oContentField = new AnwContentFieldPage_string(self::FIELD_NAME); $oContentField->setTranslatable(false); $oContentField->indexAs(self::PUB_NAME); $this->addContentField($oContentField); // translation file items $oContentField = new AnwContentFieldPage_trfileItem(self::FIELD_ITEMS); $oContentMultiplicity = new AnwContentMultiplicity_multiple(); $oContentField->setMultiplicity($oContentMultiplicity); $this->addContentField($oContentField); }
function init() { // main link $oContentField = new AnwContentFieldPage_link(self::FIELD_MAINLINK); $this->addContentField($oContentField); // sub links $oContentField = new AnwContentFieldPage_menuSubItem(self::FIELD_SUBITEMS); $oContentMultiplicity = new AnwContentMultiplicity_multiple(); $oContentField->setMultiplicity($oContentMultiplicity); $this->addContentField($oContentField); //active URL matches $oContentField = new AnwContentFieldPage_string(self::FIELD_URLMATCHES); $oContentField->setTranslatable(false); $oContentMultiplicity = new AnwContentMultiplicity_multiple(); $oContentMultiplicity->setSortable(false); $oContentField->setMultiplicity($oContentMultiplicity); $this->addContentField($oContentField); }
function init() { // feed title $oContentField = new AnwContentFieldPage_string(self::FIELD_TITLE); $oContentField->indexAs(self::PUB_TITLE); $this->addContentField($oContentField); // feed description $oContentField = new AnwContentFieldPage_xhtml(self::FIELD_DESCRIPTION); $this->addContentField($oContentField); // feed match $oContentField = new AnwContentFieldPage_string(self::FIELD_MATCH); $oContentField->setDefaultValue('*'); $oContentField->setTranslatable(false); $oContentField->addForbiddenPattern('/^$/'); $oContentMultiplicity = new AnwContentMultiplicity_multiple(); $oContentMultiplicity->setSortable(false); $oContentField->setMultiplicity($oContentMultiplicity); $this->addContentField($oContentField); // feed contentclass $oContentField = new AnwContentFieldPage_checkboxGroup(self::FIELD_CONTENTCLASS); $oContentField->setTranslatable(false); $asEnumValues = array(); $aoContentClasses = AnwContentClasses::getContentClasses(); foreach ($aoContentClasses as $oContentClass) { $asEnumValues[$oContentClass->getName()] = $oContentClass->getName(); } $oContentField->setEnumValues($asEnumValues); $oContentMultiplicity = new AnwContentMultiplicity_multiple(); $oContentMultiplicity->setSortable(false); $oContentField->setMultiplicity($oContentMultiplicity); $this->addContentField($oContentField); // feed limit $oContentField = new AnwContentFieldPage_integer(self::FIELD_LIMIT); $oContentField->setTranslatable(false); $oContentField->setDefaultValue(15); $oContentField->setValueMin(1); $oContentField->setValueMax(50); $this->addContentField($oContentField); }
function init() { parent::init(); $oContentField = new AnwContentFieldPage_string(self::FIELD_TITLE); $this->addContentField($oContentField); $oContentField = new AnwContentFieldPage_string(self::FIELD_URL); $oContentField->setTranslatable(false); $this->addContentField($oContentField); $oContentField = new AnwContentFieldPage_radio(self::FIELD_TARGET); $oContentField->setTranslatable(false); $asEnumValues = array(); $asEnumValues[self::TARGET_SELF] = self::getTargetLabel(self::TARGET_SELF); $asEnumValues[self::TARGET_BLANK] = self::getTargetLabel(self::TARGET_BLANK); $oContentField->setEnumValues($asEnumValues); $oContentField->setDefaultValue(self::TARGET_SELF); $this->addContentField($oContentField); }