Blame view

common/models/CatalogLang.php 1.65 KB
e3ec491c   andryeyev   + Catalog в backe...
1
2
3
4
5
6
7
8
9
  <?php
  
  namespace common\models;
  
  use Yii;
  
  /**
   * This is the model class for table "catalog_i18n".
   *
94ea562b   andryeyev   + редактирование ...
10
   * @property integer $catalog_id
e3ec491c   andryeyev   + Catalog в backe...
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
   * @property integer $lang_id
   * @property string $title
   * @property string $alias
   * @property string $meta_title
   * @property string $meta_keywords
   * @property string $meta_description
   * @property string $full_alias
   */
  class CatalogLang extends \yii\db\ActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'catalog_i18n';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
94ea562b   andryeyev   + редактирование ...
35
36
              [['catalog_id', 'lang_id', 'title', 'alias'], 'required'],
              [['catalog_id', 'lang_id'], 'integer'],
e3ec491c   andryeyev   + Catalog в backe...
37
38
39
40
41
42
43
44
45
46
47
48
49
              [['title'], 'string', 'max' => 1024],
              [['alias'], 'string', 'max' => 128],
              [['meta_title', 'meta_keywords', 'meta_description', 'full_alias'], 'string', 'max' => 255],
              [['alias', 'lang_id'], 'unique', 'targetAttribute' => ['alias', 'lang_id'], 'message' => 'The combination of Lang ID and Alias has already been taken.']
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
94ea562b   andryeyev   + редактирование ...
50
              'catalog_id' => Yii::t('app', 'catalog_id'),
e3ec491c   andryeyev   + Catalog в backe...
51
52
53
54
55
56
57
58
59
60
              'lang_id' => Yii::t('app', 'Lang ID'),
              'title' => Yii::t('app', 'Title'),
              'alias' => Yii::t('app', 'Alias'),
              'meta_title' => Yii::t('app', 'Meta Title'),
              'meta_keywords' => Yii::t('app', 'Meta Keywords'),
              'meta_description' => Yii::t('app', 'Meta Description'),
              'full_alias' => Yii::t('app', 'Full Alias'),
          ];
      } 
  }