1 | <?php |
||
33 | class PostCategory extends Tree |
||
34 | { |
||
35 | /** |
||
36 | * @inheritdoc |
||
37 | */ |
||
38 | 1 | public static function tableName() |
|
39 | { |
||
40 | 1 | return '{{%post_category}}'; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * @inheritdoc |
||
45 | */ |
||
46 | 1 | public function rules() |
|
47 | { |
||
48 | return [ |
||
49 | 1 | [['lft', 'lvl'], 'default', 'value' => 1], |
|
50 | 1 | ['rgt', 'default', 'value' => 1], |
|
51 | [ |
||
52 | [ |
||
53 | 1 | 'root', |
|
54 | 1 | 'lft', |
|
55 | 1 | 'rgt', |
|
56 | 1 | 'lvl', |
|
57 | 1 | 'icon_type', |
|
58 | 1 | 'active', |
|
59 | 1 | 'selected', |
|
60 | 1 | 'disabled', |
|
61 | 1 | 'readonly', |
|
62 | 1 | 'visible', |
|
63 | 1 | 'collapsed', |
|
64 | 1 | 'movable_u', |
|
65 | 1 | 'movable_d', |
|
66 | 1 | 'movable_l', |
|
67 | 1 | 'movable_r', |
|
68 | 1 | 'removable', |
|
69 | 'removable_all' |
||
70 | 1 | ], |
|
71 | 'integer' |
||
72 | 1 | ], |
|
73 | 1 | [['lft', 'rgt', 'lvl', 'name'], 'required'], |
|
74 | 1 | [['name', 'slug'], 'string', 'max' => 60], |
|
75 | 1 | [['icon'], 'string', 'max' => 255], |
|
76 | |||
77 | 1 | ]; |
|
78 | } |
||
79 | |||
80 | /** |
||
81 | * @inheritdoc |
||
82 | */ |
||
83 | public function attributeLabels() |
||
109 | } |
||
110 |