Example #1
0
 private function existResource($id)
 {
     $this->resource = $this->modelResource->get($id);
     if (!$this->resource) {
         $this->flashMessage($this->translator->translate('admin.role.resourceNotFound'), 'error');
         $this->redirect('default');
     }
 }
Example #2
0
 private function exist($id)
 {
     $this->resource = $this->resources->get($id);
     if (!$this->resource) {
         $this->flashMessage($this->translator->translate('admin.text.itemNotExist'), 'error');
         $this->redirect('default');
     }
 }