Esempio n. 1
0
 public function __construct($resourceId, $menuConfig = null, $menuUrl = null, Kwf_Component_Data $component = null)
 {
     if ($resourceId instanceof Kwf_Component_Data) {
         $component = $resourceId;
         $resourceId = 'kwc_' . $component->dbId;
     } else {
         if (!$component) {
             throw new Kwf_Exception("component parameter is required");
         }
     }
     $this->_component = $component;
     if (!$menuConfig) {
         if (Kwc_Abstract::hasSetting($this->_class, 'componentNameShort')) {
             $name = Kwc_Abstract::getSetting($this->_class, 'componentNameShort');
         } else {
             $name = Kwc_Abstract::getSetting($this->_class, 'componentName');
         }
         $icon = Kwc_Abstract::getSetting($component->componentClass, 'componentIcon');
         $menuConfig = array('text' => trlKwfStatic('Edit {0}', $name), 'icon' => $icon);
     }
     if (!$menuUrl) {
         $menuUrl = Kwc_Admin::getInstance($component->componentClass)->getControllerUrl() . '?componentId=' . $component->dbId;
     }
     parent::__construct($resourceId, $menuConfig, $menuUrl);
 }
Esempio n. 2
0
 public function __construct($resourceId, $menuConfig = null, $menuUrl = null, $componentClass = null)
 {
     if (!$componentClass) {
         $componentClass = $resourceId;
     }
     $this->_componentClass = $componentClass;
     parent::__construct('kwc_' . $resourceId, $menuConfig, $menuUrl);
 }
 public function __construct($resourceId, $menuConfig = null, $menuEventConfig = null)
 {
     $this->_menuEventConfig = $menuEventConfig;
     parent::__construct($resourceId, $menuConfig);
 }
 public function __construct($componentClass, $menuConfig = null, $menuUrl = null)
 {
     $this->_componentClass = $componentClass;
     parent::__construct('kwc_Kwc_Editable', $menuConfig, $menuUrl);
 }