コード例 #1
0
ファイル: SlotLabelFactory.php プロジェクト: Trideon/gigolo
 protected function GetFullName(ReservationItemView $reservation)
 {
     $shouldHide = Configuration::Instance()->GetSectionKey(ConfigSection::PRIVACY, ConfigKeys::PRIVACY_HIDE_USER_DETAILS, new BooleanConverter());
     if ($shouldHide && (is_null($this->user) || $this->user->UserId != $reservation->UserId && !$this->user->IsAdminForGroup($reservation->OwnerGroupIds()))) {
         return Resources::GetInstance()->GetString('Private');
     }
     $name = new FullName($reservation->FirstName, $reservation->LastName);
     return $name->__toString();
 }