Esempio n. 1
0
 public function before()
 {
     if (!$this->check()) {
         if ($this->event instanceof RouteEvent) {
             $this->event->errors |= $this->errors;
         }
         return false;
     }
     return parent::before();
 }
Esempio n. 2
0
 public function before()
 {
     $config = ['class' => Access::className(), 'owner' => $this->owner, 'rules' => $this->rules];
     $this->access = Instance::ensure($config);
     if (!$this->access->checkAccess()) {
         if ($this->event instanceof RouteEvent) {
             $this->event->errors |= $this->access->errors;
         }
         return false;
     }
     return parent::before();
 }