Exemplo n.º 1
0
 /**
  * Constructor
  *
  * @access public
  */
 public function __construct()
 {
     Croogo::applyHookProperties('Hook.controller_properties');
     parent::__construct();
     if ($this->name == 'CakeError') {
         $this->_set(Router::getPaths());
         $this->params = Router::getParams();
         $this->constructClasses();
         $this->Component->initialize($this);
         $this->beforeFilter();
         $this->Component->triggerCallback('startup', $this);
     }
 }
Exemplo n.º 2
0
 /**
  * afterConstruct
  *
  * called when Controller::__construct() is complete.
  * Override this method to perform class configuration/initialization that
  * needs to be performed earlier from Controller::beforeFilter().
  *
  * You still need to call parent::afterConstruct() method to ensure correct
  * behavior.
  */
 public function afterConstruct()
 {
     Croogo::applyHookProperties('Hook.controller_properties', $this);
     if (isset($this->request->params['admin'])) {
         $this->helpers[] = 'Croogo.Croogo';
         if (empty($this->helpers['Html'])) {
             $this->helpers['Html'] = array('className' => 'Croogo.CroogoHtml');
         }
         if (empty($this->helpers['Form'])) {
             $this->helpers['Form'] = array('className' => 'Croogo.CroogoForm');
         }
         if (empty($this->helpers['Paginator'])) {
             $this->helpers['Paginator'] = array('className' => 'Croogo.CroogoPaginator');
         }
     }
 }
Exemplo n.º 3
0
 /**
  * afterConstruct
  *
  * called when Controller::__construct() is complete.
  * Override this method to perform class configuration/initialization that
  * needs to be performed earlier from Controller::beforeFilter().
  *
  * You still need to call parent::afterConstruct() method to ensure correct
  * behavior.
  */
 public function afterConstruct()
 {
     Croogo::applyHookProperties('Hook.controller_properties', $this);
     $this->_setupComponents();
     $this->_setupTheme();
 }
Exemplo n.º 4
0
 /**
  * Constructor
  *
  * @param mixed  $id    Set this ID for this model on startup, can also be an array of options, see above.
  * @param string $table Name of database table to use.
  * @param string $ds    DataSource connection name.
  */
 public function __construct($id = false, $table = null, $ds = null)
 {
     Croogo::applyHookProperties('Hook.model_properties');
     parent::__construct($id, $table, $ds);
 }
Exemplo n.º 5
0
 /**
  * Constructor
  *
  * @access public
  */
 public function __construct($request = null, $response = null)
 {
     Croogo::applyHookProperties('Hook.controller_properties', $this);
     parent::__construct($request, $response);
 }