1 | <?php namespace Anomaly\PreferencesModule\Preference\Form; |
||
17 | class PreferenceFormRepository implements FormRepositoryInterface |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * The config repository. |
||
22 | * |
||
23 | * @var Repository |
||
24 | */ |
||
25 | protected $config; |
||
26 | |||
27 | /** |
||
28 | * The application container. |
||
29 | * |
||
30 | * @var Container |
||
31 | */ |
||
32 | protected $container; |
||
33 | |||
34 | /** |
||
35 | * The preferences repository. |
||
36 | * |
||
37 | * @var PreferenceRepositoryInterface |
||
38 | */ |
||
39 | protected $preferences; |
||
40 | |||
41 | /** |
||
42 | * Create a new PreferenceFormRepositoryInterface instance. |
||
43 | * |
||
44 | * @param Repository $config |
||
45 | * @param Container $container |
||
46 | * @param PreferenceRepositoryInterface $preferences |
||
47 | */ |
||
48 | public function __construct(Repository $config, Container $container, PreferenceRepositoryInterface $preferences) |
||
54 | |||
55 | /** |
||
56 | * Find an entry or return a new one. |
||
57 | * |
||
58 | * @param $id |
||
59 | * @return string |
||
60 | */ |
||
61 | public function findOrNew($id) |
||
65 | |||
66 | /** |
||
67 | * Save the form. |
||
68 | * |
||
69 | * @param FormBuilder $builder |
||
70 | * @return bool|mixed |
||
71 | */ |
||
72 | public function save(FormBuilder $builder) |
||
87 | } |
||
88 |