function init()
 {
     parent::init();
     //actions page policy
     $oContentField = new AnwContentFieldSettings_radio(self::FIELD_POLICY);
     $asEnumValues = array(self::POLICY_ALL_ACTIONS => $this->getComponent()->t_contentfieldsettings("policy_all_actionspage"), self::POLICY_SELECTED_ACTIONS => $this->getComponent()->t_contentfieldsettings("policy_selected_actionspage"));
     $oContentField->setEnumValues($asEnumValues);
     $oContentField->setDefaultValue(self::POLICY_SELECTED_ACTIONS);
     $this->addContentField($oContentField);
     //actions page selection
     $oContentField = new AnwContentFieldSettings_checkboxGroup(self::FIELD_ACTIONS);
     $asActions = AnwComponent::getEnabledComponents(AnwComponent::TYPE_ACTION);
     $asEnumValues = array();
     foreach ($asActions as $sAction) {
         if (AnwAction::isActionPage($sAction) && !AnwAction::isMagicAclAction($sAction)) {
             $asEnumValues[$sAction] = $sAction;
         }
     }
     $oContentField->setEnumValues($asEnumValues);
     $oMultiplicity = new AnwContentMultiplicity_multiple();
     $oMultiplicity->setSortable(false);
     $oContentField->setMultiplicity($oMultiplicity);
     $this->addContentField($oContentField);
 }
Exemplo n.º 2
0
 protected function getGrantAllUsersByDefaultActions()
 {
     $asGrantActionGlobal = array();
     $asGrantActionPage = array();
     $aoGrantAllUsersByDefaultActions = AnwAction::getGrantAllUsersByDefaultActions();
     foreach ($aoGrantAllUsersByDefaultActions as $sAction) {
         if (AnwAction::isActionPage($sAction)) {
             $asGrantActionPage[] = $sAction;
         } else {
             $asGrantActionGlobal[] = $sAction;
         }
     }
     return array($asGrantActionGlobal, $asGrantActionPage);
 }