Advertisement
Sdelkadrom

Untitled

Jun 15th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. $numOfRooms = '';
  2. if ($model->canShowInView('num_of_rooms')) :
  3. $numOfRooms = Yii::t('module_apartments', '{n} bedroom|{n} bedrooms|{n} bedrooms', array($model->num_of_rooms)) . '. ';
  4. endif;
  5. if ($model->canShowInView('square') && $model->canShowInView('land_square')) {
  6. $disambiguatingDescription = utf8_ucfirst(Yii::t('module_apartments', 'total square: {n}', $model->square)) . " " . tc('site_square')
  7. . '. ' . utf8_ucfirst(Yii::t('module_apartments', 'land square: {n}', $model->land_square)) . " " . tc('site_land_square');
  8. $jsonLDMain['itemOffered'] = array(
  9. '@type' => 'Product',
  10. 'name' => $nameProduct,
  11. 'category' => HApartment::getNameByType($model->type),
  12. 'disambiguatingDescription' => $disambiguatingDescription,
  13. );
  14. } elseif ($model->canShowInView('square')) {
  15. $disambiguatingDescription = $numOfRooms . utf8_ucfirst(Yii::t('module_apartments', 'total square: {n}', $model->square)) . " " . tc('site_square');
  16. $jsonLDMain['itemOffered'] = array(
  17. '@type' => 'Product',
  18. 'name' => $nameProduct,
  19. 'category' => HApartment::getNameByType($model->type),
  20. 'disambiguatingDescription' => $disambiguatingDescription,
  21. );
  22. } elseif ($model->canShowInView('land_square')) {
  23. $disambiguatingDescription = utf8_ucfirst(Yii::t('module_apartments', 'land square: {n}', $model->land_square)) . " " . tc('site_land_square');
  24. $jsonLDMain['itemOffered'] = array(
  25. '@type' => 'Product',
  26. 'name' => $nameProduct,
  27. 'category' => HApartment::getNameByType($model->type),
  28. 'disambiguatingDescription' => $disambiguatingDescription,
  29. );
  30. } else {
  31. $jsonLDMain['itemOffered'] = array(
  32. '@type' => 'Product',
  33. 'name' => $nameProduct,
  34. 'category' => HApartment::getNameByType($model->type),
  35. );
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement