| @@ 73-82 (lines=10) @@ | ||
| 70 | /** |
|
| 71 | * @inheritdoc |
|
| 72 | */ |
|
| 73 | public function rules() |
|
| 74 | { |
|
| 75 | return [ |
|
| 76 | [['property_id', 'name', 'value'], 'required'], |
|
| 77 | [['property_id', 'sort_order', 'dont_filter'], 'integer'], |
|
| 78 | [['slug'], 'unique'], |
|
| 79 | [['title_prepend'], 'boolean'], |
|
| 80 | [['name', 'value', 'slug', 'title_append'], 'string'] |
|
| 81 | ]; |
|
| 82 | } |
|
| 83 | ||
| 84 | /** |
|
| 85 | * @inheritdoc |
|
| @@ 51-69 (lines=19) @@ | ||
| 48 | /** |
|
| 49 | * @inheritdoc |
|
| 50 | */ |
|
| 51 | public function rules() |
|
| 52 | { |
|
| 53 | return [ |
|
| 54 | [['category_id'], 'required'], |
|
| 55 | [ |
|
| 56 | [ |
|
| 57 | 'category_id', |
|
| 58 | 'sort_order', |
|
| 59 | 'property_id', |
|
| 60 | 'is_filter_by_price', |
|
| 61 | 'is_range_slider', |
|
| 62 | 'delegate_to_children' |
|
| 63 | ], |
|
| 64 | 'integer' |
|
| 65 | ], |
|
| 66 | [['category_id', 'property_id'], 'unique', 'targetAttribute' => ['category_id', 'property_id']], |
|
| 67 | [['multiple'], 'boolean'], |
|
| 68 | ]; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * @inheritdoc |
|