1 | <?php |
||
19 | abstract class AbstractWidgetHandler implements WidgetHandlerInterface |
||
20 | { |
||
21 | protected static $expectedParameters = []; |
||
22 | |||
23 | protected $widgetModel; |
||
24 | |||
25 | /** |
||
26 | * @return array |
||
27 | */ |
||
28 | public static function getExpectedParameters() |
||
32 | |||
33 | /** |
||
34 | * AbstractWidgetHandler constructor. |
||
35 | * |
||
36 | * @param WidgetModelInterface $widgetModel |
||
37 | */ |
||
38 | public function __construct(WidgetModelInterface $widgetModel) |
||
42 | |||
43 | /** |
||
44 | * @param $name |
||
45 | * |
||
46 | * @return string |
||
47 | */ |
||
48 | protected function getModelParameter($name) |
||
64 | |||
65 | /** |
||
66 | * Check if widget should be rendered. |
||
67 | * |
||
68 | * @return bool |
||
69 | */ |
||
70 | public function isVisible() |
||
74 | |||
75 | /** |
||
76 | * Returns associative array with all expected parameters and their values. |
||
77 | * |
||
78 | * @return array |
||
79 | */ |
||
80 | protected function getAllParametersWithValue() |
||
89 | } |
||
90 |