コード例 #1
0
 /**
  * Search for user with name equal to or containing the term provided.
  * @param  String $searchTerm
  */
 public function searchUser($searchTerm)
 {
     $this->searchModel->searchUser($searchTerm);
     if ($this->searchModel->foundMatch()) {
         $this->profileView->setUser($this->searchModel->getSearchResult());
     } else {
         $this->searchView->setResult($this->searchModel->getSearchResult());
     }
 }
コード例 #2
0
 /**
  * Calls \view\UserProfileView to set correct user profile to be rendered.
  */
 public function setUserProfile($user)
 {
     $this->userProfileView->setUser($user);
 }