1 | <?php namespace Anomaly\SettingsModule\Setting\Form; |
||
12 | class SettingFormRepository implements FormRepositoryInterface |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * The config repository. |
||
17 | * |
||
18 | * @var Repository |
||
19 | */ |
||
20 | protected $config; |
||
21 | |||
22 | /** |
||
23 | * The event dispatcher. |
||
24 | * |
||
25 | * @var Dispatcher |
||
26 | */ |
||
27 | protected $events; |
||
28 | |||
29 | /** |
||
30 | * The application container. |
||
31 | * |
||
32 | * @var Container |
||
33 | */ |
||
34 | protected $container; |
||
35 | |||
36 | /** |
||
37 | * The settings repository. |
||
38 | * |
||
39 | * @var SettingRepositoryInterface |
||
40 | */ |
||
41 | protected $settings; |
||
42 | |||
43 | /** |
||
44 | * Create a new SettingFormRepositoryInterface instance. |
||
45 | * |
||
46 | * @param Repository $config |
||
47 | * @param Dispatcher $events |
||
48 | * @param Container $container |
||
49 | * @param SettingRepositoryInterface $settings |
||
50 | */ |
||
51 | public function __construct( |
||
62 | |||
63 | /** |
||
64 | * Find an entry or return a new one. |
||
65 | * |
||
66 | * @param $id |
||
67 | * @return string |
||
68 | */ |
||
69 | public function findOrNew($id) |
||
73 | |||
74 | /** |
||
75 | * Save the form. |
||
76 | * |
||
77 | * @param FormBuilder|SettingFormBuilder $builder |
||
78 | * @return bool|mixed |
||
79 | */ |
||
80 | public function save(FormBuilder $builder) |
||
96 | } |
||
97 |