Esempio n. 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;
 }
Esempio n. 2
0
 /**
  * Executes the view
  *
  * @param ResponseInterface $response
  *
  * @return ResponseInterface
  */
 public function execute(ResponseInterface $response)
 {
     $this->presentation->define('page-title', 'Welcome');
     $response->content()->write($this->presentation->render('index/home.phtml'));
     return $response;
 }
Esempio n. 3
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');
 }