Exemplo n.º 1
0
 /**
  * Authentication constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->addBeforeFilters(array('loadAssets'));
     $this->addAfterFilters(array('loadFlashMessage'));
     if (Core\Config()->CAPTCHA['enabled'] && in_array(Core\Router()->request->action(), array('login', 'reset'))) {
         $this->loadCaptcha(Core\Config()->CAPTCHA);
     }
 }
Exemplo n.º 2
0
 /**
  * Resource constructor.
  */
 public function __construct()
 {
     parent::__construct();
     if ($this->resourceModel) {
         $this->addBeforeFilters(array('loadDefaultResource'));
         $this->addBeforeFilters(array('loadAttributeSections'), array('except' => 'delete'));
         $this->addBeforeFilters(array('loadResource'), array('only' => array('show', 'edit', 'delete')));
         $this->addAfterFilters(array('loadFlashMessage'));
     }
 }