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); } }