Advertisement
Sdelkadrom

Untitled

Apr 22nd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. public function getSocialTitle()
  2. {
  3.  
  4. $location = array();
  5. if (issetModule('location')) {
  6. // if (isset($ad->locCountry) && $ad->locCountry) {
  7. // $location[] = $ad->locCountry->getStrByLang('name');
  8. //}
  9. // if(isset($ad->locRegion) && $ad->locRegion) {
  10. // $location[] = $ad->locRegion->getStrByLang('name');
  11. // }
  12. if (isset($this->locCity) && $this->locCity) {
  13. $location[] = $this->locCity->getStrByLang('name');
  14. }
  15. } else {
  16. if (isset($this->city) && $this->city) {
  17. $location[] = $this->city->getStrByLang('name');
  18. }
  19. }
  20.  
  21. $title = HApartment::getNameByType($this->type);
  22.  
  23. if (isset($this->objType) && $this->objType)
  24. $title .= ', ' . $this->objType->getStrByLang('name');
  25.  
  26. $title .= ', ' . trim(strip_tags($this->getPrettyPrice(false)));
  27.  
  28. $title .= ', ' . implode(', ', $location);
  29.  
  30. $title .= ', ' . $this->getTitle();
  31.  
  32. return $title;
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement