Blame view

common/models/SeoDynamic.php 2.07 KB
fa68c38d   Administrator   12.04.16 finish ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  <?php
  
  namespace common\models;
  
  use Yii;
  
  /**
   * This is the model class for table "seo_dynamic".
   *
   * @property integer $seo_dynamic_id
   * @property integer $seo_category_id
   * @property string $name
   * @property string $action
   * @property string $fields
   * @property string $title
   * @property string $h1
   * @property string $description
585f04ca   Administrator   15.04.16 seo widget
18
   * @property string $seo_text
fa68c38d   Administrator   12.04.16 finish ...
19
   * @property integer $status
585f04ca   Administrator   15.04.16 seo widget
20
21
   * @property string $param
   * @property string $key
fa68c38d   Administrator   12.04.16 finish ...
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
   *
   * @property SeoCategory $seoCategory
   */
  class SeoDynamic extends \yii\db\ActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'seo_dynamic';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['seo_category_id', 'status'], 'integer'],
              [['seo_text'], 'string'],
              [['name', 'action'], 'string', 'max' => 200],
585f04ca   Administrator   15.04.16 seo widget
44
              [['fields', 'title', 'h1', 'description', 'param', 'key'], 'string', 'max' => 255],
fa68c38d   Administrator   12.04.16 finish ...
45
46
47
48
49
50
51
52
53
54
              [['seo_category_id'], 'exist', 'skipOnError' => true, 'targetClass' => SeoCategory::className(), 'targetAttribute' => ['seo_category_id' => 'seo_category_id']],
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
7b08eb78   Administrator   15.04.16 seo widget
55
56
57
58
59
60
61
62
63
64
65
66
              'seo_dynamic_id' => Yii::t('app', 'seo_dynamic_id'),
              'seo_category_id' => Yii::t('app', 'seo_category_id'),
              'name' => Yii::t('app', 'name'),
              'action' => Yii::t('app', 'action'),
              'fields' => Yii::t('app', 'fields'),
              'title' => Yii::t('app', 'title'),
              'h1' => Yii::t('app', 'h1'),
              'description' => Yii::t('app', 'description'),
              'seo_text' => Yii::t('app', 'seo_text'),
              'status' => Yii::t('app', 'status'),
              'param' => Yii::t('app', 'param'),
              'key' => Yii::t('app', 'key'),
fa68c38d   Administrator   12.04.16 finish ...
67
68
69
70
71
72
73
74
75
76
77
          ];
      }
  
      /**
       * @return \yii\db\ActiveQuery
       */
      public function getSeoCategory()
      {
          return $this->hasOne(SeoCategory::className(), ['seo_category_id' => 'seo_category_id']);
      }
  }