Esempio n. 1
0
 public function run()
 {
     $image = ImageUtils::getDefaultImage('profiles');
     $ids = array();
     foreach ($this->users as $user) {
         $ids[] = $user->id;
     }
     $images = UserPhotosApi::getPrimaryImageForUsers($ids);
     $this->render('peopleResults', array('modelProperty' => $this->modelProperty, 'modelUser' => $this->modelUser, 'modelProfile' => $this->modelProfile, 'users' => $this->users, 'images' => $images, 'ids' => $ids, 'image' => $image, 'totalResults' => $this->totalResults, 'pages' => $this->pages, 'userType' => $this->userType));
 }
Esempio n. 2
0
 public function run()
 {
     $image = ImageUtils::getDefaultImage('profiles');
     $ids = array();
     foreach ($this->users as $user) {
         $ids[] = $user->id;
     }
     $images = UserPhotosApi::getPrimaryImageForUsers($ids);
     $this->render('peopleSearchResults', array('modelProperty' => $this->modelProperty, 'modelUser' => $this->modelUser, 'modelProfile' => $this->modelProfile, 'users' => $this->users, 'images' => $images, 'ids' => $ids, 'image' => $image, 'pagesAgent' => $this->pagesAgent, 'pagesUser' => $this->pagesUser, 'pagesBuilder' => $this->pagesBuilder, 'pagesSpecialists' => $this->pagesSpecialists));
 }
Esempio n. 3
0
 public function actionProfile($id)
 {
     Yii::beginProfile('account_profile');
     $userProfile = UserApi::getUser($id);
     if (!$userProfile) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     $userProfile = UserApi::getUserProfileDetails($id);
     $userAddress = DbUtils::getAddress($userProfile->city_id);
     $userImages = UserPhotosApi::getAllImages($id);
     $agentAddress = "";
     $agentImage = "";
     $agentProfile = AgentProfileApi::getAgentDetails($id);
     if ($agentProfile) {
         $agentAddress = DbUtils::getAddress($agentProfile->city_id);
         $agentImage = AgentProfileApi::getImage($id);
     }
     $builderAddress = "";
     $builderImage = "";
     $builderProfile = BuilderProfileApi::getBuilderDetails($id);
     if ($builderProfile) {
         $builderAddress = DbUtils::getAddress($builderProfile->city_id);
         $builderImage = BuilderProfileApi::getImage($id);
     }
     $specialistAddress = "";
     $specialistImage = "";
     $specialistProfile = SpecialistProfileApi::getSpecialistDetails($id);
     $specialistProjects = "";
     if ($specialistProfile) {
         $specialistAddress = DbUtils::getAddress($specialistProfile->city_id);
         $specialistImage = SpecialistProfileApi::getImage($id);
         $specialistProjects = SpecialistApi::getSpecialistProjects($id);
     }
     $this->render('profile', array('userProfile' => $userProfile, 'userAddress' => $userAddress, 'userImages' => $userImages, 'agentProfile' => $agentProfile, 'agentAddress' => $agentAddress, 'builderProfile' => $builderProfile, 'builderAddress' => $builderAddress, 'specialistProfile' => $specialistProfile, 'specialistAddress' => $specialistAddress, 'specialistProjects' => $specialistProjects, 'agentImage' => $agentImage, 'builderImage' => $builderImage, 'specialistImage' => $specialistImage));
     Yii::endProfile('account_profile');
 }