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