Exemplo n.º 1
0
 public function loadState(array $params)
 {
     parent::loadState($params);
     if (!isset($params['web']) || !($this->web = $this->repository->getBy(['alias' => $params['web']]))) {
         $this->error();
     }
 }
Exemplo n.º 2
0
 public function actionEdit(string $id)
 {
     if (!($this->entity = $this->repository->getById($id))) {
         $this->error();
     }
 }