Total Complexity | 7 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | trait EmberTrait |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | */ |
||
20 | public static function tableAlias() |
||
21 | { |
||
22 | return static::TABLE_ALIAS; |
||
|
|||
23 | } |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | public static function tableName() |
||
29 | { |
||
30 | return '{{%' . static::tableAlias() . '}}'; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @inheritdoc |
||
35 | */ |
||
36 | public function stateRules() |
||
37 | { |
||
38 | return [ |
||
39 | [ |
||
40 | [ |
||
41 | 'enabled' |
||
42 | ], |
||
43 | 'safe', |
||
44 | 'on' => [ |
||
45 | Model::SCENARIO_DEFAULT |
||
46 | ] |
||
47 | ] |
||
48 | ]; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @inheritdoc |
||
53 | */ |
||
54 | public function isEnabled() |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @inheritdoc |
||
61 | */ |
||
62 | public function isDisabled() |
||
63 | { |
||
64 | return !$this->isEnabled(); |
||
65 | } |
||
66 | |||
67 | /** |
||
68 | * @inheritdoc |
||
69 | */ |
||
70 | public function toEnabled() |
||
74 | } |
||
75 | |||
76 | /** |
||
77 | * @inheritdoc |
||
78 | */ |
||
79 | public function toDisabled() |
||
85 |