public function before() { if (!$this->check()) { if ($this->event instanceof RouteEvent) { $this->event->errors |= $this->errors; } return false; } return parent::before(); }
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(); }