1 | <?php |
||
19 | trait RecordWithState |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * @var bool Enabled |
||
24 | */ |
||
25 | public $enabled; |
||
26 | |||
27 | /** |
||
28 | * @inheritdoc |
||
29 | */ |
||
30 | protected function stateRules() |
||
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | public function isEnabled() |
||
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | public function isDisabled() |
||
62 | |||
63 | /** |
||
64 | * @inheritdoc |
||
65 | */ |
||
66 | public function toEnabled() |
||
71 | |||
72 | /** |
||
73 | * @inheritdoc |
||
74 | */ |
||
75 | public function toDisabled() |
||
80 | |||
81 | } |
||
82 |