示例#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
 /**
  * Executes the view
  *
  * @return mixed
  */
 public function execute()
 {
     $this->template->define('page-title', 'Homepage');
     $this->template->assign('username', 'Administrator');
     return $this->template->render('tests/child.phtml');
 }