Total Complexity | 2 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class SettingsForm extends Model |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | public $title; |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | public $meta_keywords; |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | public $meta_description; |
||
21 | |||
22 | /** |
||
23 | * @inheritdoc |
||
24 | */ |
||
25 | public function rules() |
||
26 | { |
||
27 | return [ |
||
28 | [['title'], 'trim'], |
||
29 | [['title'], 'string', 'max' => 128], |
||
30 | |||
31 | [['meta_keywords'], 'trim'], |
||
32 | [['meta_keywords'], 'string', 'max' => 128], |
||
33 | |||
34 | [['meta_description'], 'trim'], |
||
35 | [['meta_description'], 'string', 'max' => 256], |
||
36 | ]; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @inheritdoc |
||
41 | */ |
||
42 | public function attributeLabels() |
||
43 | { |
||
44 | return [ |
||
45 | 'title' => 'Title', |
||
46 | 'meta_keywords' => 'Meta keywords', |
||
47 | 'meta_description' => 'Meta description', |
||
48 | ]; |
||
50 | } |