37 lines
809 B
PHP
37 lines
809 B
PHP
<?php
|
|
|
|
namespace app\models;
|
|
|
|
/**
|
|
* Class SeoManagement
|
|
* @package app\models
|
|
* @property $id
|
|
* @property $title
|
|
* @property $title_en
|
|
* @property $key_words
|
|
* @property $key_words_en
|
|
* @property $text
|
|
* @property $text_en
|
|
* @property $page_id
|
|
* @property \app\models\Pages $page
|
|
*/
|
|
class SeoManagement extends _Base
|
|
{
|
|
public function getPage()
|
|
{
|
|
return $this->hasOne(Pages::class, ['id' => 'page_id']);
|
|
}
|
|
|
|
public function getTitle() {
|
|
return \Yii::$app->language == 'en' ? $this->title_en : $this->title;
|
|
}
|
|
|
|
public function getDescription() {
|
|
return \Yii::$app->language == 'en' ? $this->text : $this->text_en;
|
|
}
|
|
|
|
public function getKeyWords() {
|
|
return \Yii::$app->language == 'en' ? $this->key_words : $this->key_words_en;
|
|
}
|
|
}
|