Exemplo n.º 1
0
 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()
 {
     // 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_DESCRIPTION);
     $this->addContentField($oContentField);
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 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);
 }
Exemplo n.º 6
0
 function init()
 {
     // menu title
     $oContentField = new AnwContentFieldPage_string(self::FIELD_TITLE);
     $oContentField->setDefaultValue('Untitled menu');
     $oContentField->indexAs(self::PUB_TITLE);
     $this->addContentField($oContentField);
     $oContentField = new AnwContentFieldPage_menuItem(self::FIELD_ITEMS);
     $oContentMultiplicity = new AnwContentMultiplicity_multiple();
     $oContentField->setMultiplicity($oContentMultiplicity);
     $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);
 }