Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $numOfRooms = '';
- if ($model->canShowInView('num_of_rooms')) :
- $numOfRooms = Yii::t('module_apartments', '{n} bedroom|{n} bedrooms|{n} bedrooms', array($model->num_of_rooms)) . '. ';
- endif;
- if ($model->canShowInView('square') && $model->canShowInView('land_square')) {
- $disambiguatingDescription = utf8_ucfirst(Yii::t('module_apartments', 'total square: {n}', $model->square)) . " " . tc('site_square')
- . '. ' . utf8_ucfirst(Yii::t('module_apartments', 'land square: {n}', $model->land_square)) . " " . tc('site_land_square');
- $jsonLDMain['itemOffered'] = array(
- '@type' => 'Product',
- 'name' => $nameProduct,
- 'category' => HApartment::getNameByType($model->type),
- 'disambiguatingDescription' => $disambiguatingDescription,
- );
- } elseif ($model->canShowInView('square')) {
- $disambiguatingDescription = $numOfRooms . utf8_ucfirst(Yii::t('module_apartments', 'total square: {n}', $model->square)) . " " . tc('site_square');
- $jsonLDMain['itemOffered'] = array(
- '@type' => 'Product',
- 'name' => $nameProduct,
- 'category' => HApartment::getNameByType($model->type),
- 'disambiguatingDescription' => $disambiguatingDescription,
- );
- } elseif ($model->canShowInView('land_square')) {
- $disambiguatingDescription = utf8_ucfirst(Yii::t('module_apartments', 'land square: {n}', $model->land_square)) . " " . tc('site_land_square');
- $jsonLDMain['itemOffered'] = array(
- '@type' => 'Product',
- 'name' => $nameProduct,
- 'category' => HApartment::getNameByType($model->type),
- 'disambiguatingDescription' => $disambiguatingDescription,
- );
- } else {
- $jsonLDMain['itemOffered'] = array(
- '@type' => 'Product',
- 'name' => $nameProduct,
- 'category' => HApartment::getNameByType($model->type),
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement