Ejemplo n.º 1
0
 public function init()
 {
     if (!Yii::app()->params['local']) {
         Yii::app()->end();
     }
     parent::init();
 }
Ejemplo n.º 2
0
 /**
  * Initializes the controller.
  */
 public function init()
 {
     parent::init();
     $this->_authorizer = $this->module->getAuthorizer();
     $this->layout = $this->module->layout;
     $this->defaultAction = 'view';
     // Register the scripts
     $this->module->registerScripts();
 }
Ejemplo n.º 3
0
 public function accessDenied($message = null)
 {
     Yii::app()->user->setState('Company', 0);
     if ($message === null) {
         $message = Rights::t('app', 'User is not asigned a role inside the company!');
     }
     return parent::accessDenied($message);
 }