| 1 | <?php |
||
| 12 | class blocks_factory |
||
| 13 | { |
||
| 14 | /** @var array */ |
||
| 15 | private $blocks; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Constructor |
||
| 19 | * |
||
| 20 | * @param \phpbb\di\service_collection $blocks Service Collection |
||
| 21 | */ |
||
| 22 | 3 | public function __construct(\phpbb\di\service_collection $blocks) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Register available topic blocks |
||
| 29 | * @param \phpbb\di\service_collection $blocks |
||
| 30 | */ |
||
| 31 | 3 | protected function register_blocks(\phpbb\di\service_collection $blocks) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Get topic block object |
||
| 42 | * |
||
| 43 | * @param string $service_name |
||
| 44 | * @return null|\blitze\content\services\topic\block_interface |
||
| 45 | */ |
||
| 46 | public function get($service_name) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get available content topic blocks |
||
| 53 | * @return array |
||
| 54 | */ |
||
| 55 | 2 | public function get_all() |
|
| 67 | } |
||
| 68 |