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 | ['rgt', 'default', 'value' => 1], |
||
51 | [ |
||
52 | [ |
||
53 | 'root', |
||
54 | 'lft', |
||
55 | 'rgt', |
||
56 | 'lvl', |
||
57 | 'icon_type', |
||
58 | 'active', |
||
59 | 'selected', |
||
60 | 'disabled', |
||
61 | 'readonly', |
||
62 | 'visible', |
||
63 | 'collapsed', |
||
64 | 'movable_u', |
||
65 | 'movable_d', |
||
66 | 'movable_l', |
||
67 | 'movable_r', |
||
68 | 'removable', |
||
69 | 'removable_all' |
||
70 | ], |
||
71 | 'integer' |
||
72 | ], |
||
73 | [['lft', 'rgt', 'lvl', 'name'], 'required'], |
||
74 | [['name', 'slug'], 'string', 'max' => 60], |
||
75 | [['icon'], 'string', 'max' => 255], |
||
76 | |||
77 | ]; |
||
78 | } |
||
79 | |||
80 | /** |
||
81 | * @inheritdoc |
||
82 | */ |
||
83 | public function attributeLabels() |
||
109 | } |
||
110 |