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 AnwContentFieldSettings_boolean(self::FIELD_FILE_ENABLED); $this->addContentField($oContentField); $oContentField = new AnwContentFieldSettings_boolean(self::FIELD_MAIL_ENABLED); $this->addContentField($oContentField); $oContentField = new AnwContentFieldSettings_email_address(self::FIELD_MAIL_ADDRESSES); $oContentMultiplicity = new AnwContentMultiplicity_multiple(); $oContentMultiplicity->setSortable(false); $oContentField->setMultiplicity($oContentMultiplicity); $this->addContentField($oContentField); }
function init() { parent::init(); //lang policy $oContentField = new AnwContentFieldSettings_radio(self::FIELD_POLICY); $asEnumValues = array(self::POLICY_ALL_LANGS => $this->getComponent()->t_contentfieldsettings("policy_all_langs"), self::POLICY_SELECTED_LANGS => $this->getComponent()->t_contentfieldsettings("policy_selected_langs")); $oContentField->setEnumValues($asEnumValues); $oContentField->setDefaultValue(self::POLICY_ALL_LANGS); $this->addContentField($oContentField); //langs selection $oContentField = new AnwContentFieldSettings_checkboxGroup(self::FIELD_LANGS); $asLangs = AnwComponent::globalCfgLangs(); $asEnumValues = array(); foreach ($asLangs as $sLang) { $sLangName = $sLang . " - " . Anwi18n::langName($sLang); $asEnumValues[$sLang] = $sLangName; } $oContentField->setEnumValues($asEnumValues); $oMultiplicity = new AnwContentMultiplicity_multiple(); $oMultiplicity->setSortable(false); $oContentField->setMultiplicity($oMultiplicity); $this->addContentField($oContentField); }