Initial import
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user