Ejemplo n.º 1
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     $this->acceptOutput = true;
     $this->overrideEditableRegion = false;
     $this->canCallController = false;
     // define the custom attributes
     //$this->defineAttribute('actionName',	false, 'action', COMPONENT_TYPE_STRING);
     $this->defineAttribute('defaultAction', false, 'index', COMPONENT_TYPE_STRING);
     $this->defineAttribute('baseClassPath', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('controllerName', false, '', COMPONENT_TYPE_STRING);
     // call the superclass for validate the attributes
     parent::init();
     $this->actionName = $this->getAttribute('actionName');
     if (__Request::get($this->actionName, '') == '') {
         __Request::set($this->actionName, $this->getAttribute('defaultAction'));
     }
     // backward compatibility
     $baseClassPath = $this->getAttribute('baseClassPath');
     if ($baseClassPath) {
         $controllerName = $this->getAttribute('controllerName');
         $this->setAttribute('controllerName', $baseClassPath . '.controllers.' . $controllerName . '.*');
     }
 }
Ejemplo n.º 2
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     $this->defineAttribute('allowBlocks', false, false, COMPONENT_TYPE_BOOLEAN);
     // call the superclass for validate the attributes
     parent::init();
 }