Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class SubscribeFormWidget extends Widget |
||
14 | { |
||
15 | /** |
||
16 | * @var bool |
||
17 | */ |
||
18 | public $status = true; |
||
19 | |||
20 | /** |
||
21 | * @var SubscribeFormModel |
||
22 | */ |
||
23 | public $model; |
||
24 | |||
25 | /** |
||
26 | * @inheritDoc |
||
27 | */ |
||
28 | public function init() |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return string|void |
||
36 | */ |
||
37 | public function run() |
||
38 | { |
||
39 | if ($this->status === true) { |
||
40 | $this->registerResource(); |
||
41 | echo $this->render('subscribe-form', ['model' => $this->model]); |
||
42 | } |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Register resource |
||
47 | */ |
||
48 | protected function registerResource() |
||
52 | } |
||
53 | } |
||
54 |