Initial import
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\models;
|
||||
|
||||
/**
|
||||
* Class Collections
|
||||
* @package app\models
|
||||
* @property $id
|
||||
* @property $name
|
||||
* @property $annotation
|
||||
* @property $description
|
||||
* @property $info_center
|
||||
* @property $info_center_address
|
||||
* @property $ts_en_name
|
||||
* @property $ts_en_annotation
|
||||
* @property $ts_en_description
|
||||
* @property $ts_en_info_center
|
||||
* @property $ts_en_info_center_address
|
||||
* @property $media_key
|
||||
* @property $is_active
|
||||
* @property $is_selected
|
||||
* @property $partner_id
|
||||
* @property \app\models\Partner $partner
|
||||
* @property $publish_date
|
||||
*/
|
||||
class Collections extends _Base
|
||||
{
|
||||
public function title() {
|
||||
if(\Yii::$app->language == 'en') {
|
||||
return $this->ts_en_name;
|
||||
} else {
|
||||
return $this->name;
|
||||
}
|
||||
} public function textShort() {
|
||||
if(\Yii::$app->language == 'en') {
|
||||
return $this->ts_en_annotation;
|
||||
} else {
|
||||
return $this->annotation;
|
||||
}
|
||||
}
|
||||
|
||||
public function getPartner() {
|
||||
return $this->hasOne(Partner::class, ['id' => 'partner_id']);
|
||||
}
|
||||
|
||||
|
||||
public function image($rez = null) {
|
||||
return $this->getSrcOfSingleImage('title_collection_image', $rez);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user