Пример #1
0
 public function execute(ResponseInterface $response) : ResponseInterface
 {
     $this->presentation->define('page-title', 'User Search');
     $users = [];
     foreach ($this->model->search() as $value) {
         $users[] = $value['username'];
     }
     $this->presentation->assign('items', $users);
     $this->presentation->assign('term', $this->model->criteria());
     $response->content()->write($this->presentation->render('users/search'));
     return $response;
 }
Пример #2
0
 public function execute($criteria)
 {
     $this->search->setCriteria($criteria);
     return $this->view(true);
 }