1 | <?php |
||
14 | abstract class base_action implements action_interface |
||
15 | { |
||
16 | /** @var \phpbb\config\config */ |
||
17 | protected $config; |
||
18 | |||
19 | /** @var ContainerInterface */ |
||
20 | protected $phpbb_container; |
||
21 | |||
22 | /** @var \phpbb\request\request_interface */ |
||
23 | protected $request; |
||
24 | |||
25 | /** @var \phpbb\language\language */ |
||
26 | protected $translator; |
||
27 | |||
28 | /** @var \blitze\sitemaker\services\blocks\blocks */ |
||
29 | protected $blocks; |
||
30 | |||
31 | /** @var \blitze\sitemaker\services\blocks\factory */ |
||
32 | protected $block_factory; |
||
33 | |||
34 | /** @var \blitze\sitemaker\model\mapper_factory */ |
||
35 | protected $mapper_factory; |
||
36 | |||
37 | protected static $default_prefs = array( |
||
38 | 'hide_blocks' => false, |
||
39 | 'ex_positions' => array(), |
||
40 | ); |
||
41 | |||
42 | /** |
||
43 | * Constructor |
||
44 | * |
||
45 | * @param \phpbb\config\config $config Config object |
||
46 | * @param ContainerInterface $phpbb_container Service container |
||
47 | * @param \phpbb\request\request_interface $request Request object |
||
48 | * @param \phpbb\language\language $translator Langua object |
||
49 | * @param \blitze\sitemaker\services\blocks\blocks $blocks Blocks object |
||
50 | * @param \blitze\sitemaker\services\blocks\factory $block_factory Blocks factory object |
||
51 | * @param \blitze\sitemaker\model\mapper_factory $mapper_factory Mapper factory object |
||
52 | */ |
||
53 | 46 | public function __construct(\phpbb\config\config $config, ContainerInterface $phpbb_container, \phpbb\request\request_interface $request, \phpbb\language\language $translator, \blitze\sitemaker\services\blocks\blocks $blocks, \blitze\sitemaker\services\blocks\factory $block_factory, \blitze\sitemaker\model\mapper_factory $mapper_factory) |
|
63 | |||
64 | /** |
||
65 | * This is guaranteed to return a route entity. If the route does not exist, it create it |
||
66 | * |
||
67 | * @param array $route_data |
||
68 | * @param bool $has_blocks |
||
69 | * @return \blitze\sitemaker\model\entity_interface |
||
70 | */ |
||
71 | 9 | protected function force_get_route(array $route_data, $has_blocks = false) |
|
86 | |||
87 | /** |
||
88 | * @param array $info |
||
89 | * @return array |
||
90 | */ |
||
91 | 12 | protected function get_condition(array $info) |
|
98 | |||
99 | /** |
||
100 | * @param \blitze\sitemaker\model\entity_interface $entity |
||
101 | * @return array |
||
102 | */ |
||
103 | 16 | protected function render_block(\blitze\sitemaker\model\entity_interface $entity) |
|
126 | |||
127 | /** |
||
128 | * @param string $custom_title |
||
129 | * @param string $default_title |
||
130 | * @return string |
||
131 | */ |
||
132 | 15 | protected function get_block_title($custom_title, $default_title) |
|
136 | |||
137 | /** |
||
138 | * @param array $returned_data |
||
139 | * @return string |
||
140 | */ |
||
141 | 15 | protected function get_block_content(array &$returned_data) |
|
154 | |||
155 | /** |
||
156 | * @param array $route_prefs |
||
157 | * @return bool |
||
158 | */ |
||
159 | 7 | protected function route_is_customized(array $route_prefs) |
|
164 | } |
||
165 |