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; }
public function execute($criteria) { $this->search->setCriteria($criteria); return $this->view(true); }