1 | <?php |
||
12 | class fields_factory |
||
13 | { |
||
14 | /** @var \phpbb\language\language */ |
||
15 | protected $language; |
||
16 | |||
17 | /** @var array */ |
||
18 | protected $fields = array(); |
||
19 | |||
20 | /** |
||
21 | * Constructor |
||
22 | * |
||
23 | * @param \phpbb\language\language $language Language object |
||
24 | * @param \phpbb\di\service_collection $field_drivers Form fields |
||
25 | */ |
||
26 | 8 | public function __construct(\phpbb\language\language $language, \phpbb\di\service_collection $field_drivers) |
|
32 | |||
33 | /** |
||
34 | * Register available form fields |
||
35 | * @param \phpbb\di\service_collection $field_drivers |
||
36 | */ |
||
37 | 8 | protected function register_fields(\phpbb\di\service_collection $field_drivers) |
|
47 | |||
48 | /** |
||
49 | * @return array |
||
50 | */ |
||
51 | 3 | public function get_all() |
|
55 | |||
56 | /** |
||
57 | * Get field object |
||
58 | * |
||
59 | * @param string $service_name |
||
60 | * @return \blitze\content\services\form\field\field_interface |
||
61 | */ |
||
62 | 2 | public function get($service_name) |
|
66 | |||
67 | /** |
||
68 | * Verify if field exists |
||
69 | * |
||
70 | * @param string $service_name |
||
71 | * @return bool |
||
72 | */ |
||
73 | 3 | public function exists($service_name) |
|
77 | |||
78 | /** |
||
79 | * Get available content field options |
||
80 | * @return array |
||
81 | */ |
||
82 | 1 | public function get_options() |
|
94 | } |
||
95 |