1 | <?php |
||
21 | class Admin implements AdminInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var ModelConfigurationInterface[]|ModelCollection |
||
25 | */ |
||
26 | protected $models; |
||
27 | |||
28 | /** |
||
29 | * @var TemplateInterface |
||
30 | */ |
||
31 | protected $template; |
||
32 | |||
33 | /** |
||
34 | * @var Application |
||
35 | */ |
||
36 | protected $app; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | protected $missedSections = []; |
||
42 | |||
43 | /** |
||
44 | * Admin constructor. |
||
45 | * |
||
46 | * @param Application $application |
||
47 | */ |
||
48 | 283 | public function __construct(Application $application) |
|
56 | |||
57 | /** |
||
58 | * @param TemplateInterface $template |
||
59 | */ |
||
60 | 283 | public function setTemplate(TemplateInterface $template) |
|
64 | |||
65 | /** |
||
66 | * Initialize class. |
||
67 | */ |
||
68 | 283 | public function initialize() |
|
72 | |||
73 | /** |
||
74 | * @param string $class |
||
75 | * @param Closure|null $callback |
||
76 | * |
||
77 | * @return $this |
||
78 | */ |
||
79 | 2 | public function registerModel($class, Closure $callback = null) |
|
89 | |||
90 | /** |
||
91 | * @param ModelConfigurationInterface $model |
||
92 | * |
||
93 | * @return $this |
||
94 | */ |
||
95 | 2 | public function register(ModelConfigurationInterface $model) |
|
105 | |||
106 | /** |
||
107 | * @param array $sections |
||
108 | * |
||
109 | * @return $this |
||
110 | */ |
||
111 | 283 | public function registerSections(array $sections) |
|
123 | |||
124 | /** |
||
125 | * @return array |
||
126 | */ |
||
127 | public function getMissedSections() |
||
131 | |||
132 | /** |
||
133 | * @param string $class |
||
134 | * @param ModelConfigurationInterface $model |
||
135 | * |
||
136 | * @return $this |
||
137 | */ |
||
138 | 2 | public function setModel($class, ModelConfigurationInterface $model) |
|
144 | |||
145 | /** |
||
146 | * @param string|Model $class |
||
147 | * @return ModelConfigurationInterface |
||
148 | */ |
||
149 | 2 | public function getModel($class) |
|
161 | |||
162 | /** |
||
163 | * @return ModelConfigurationInterface[]|ModelCollection |
||
164 | */ |
||
165 | 285 | public function getModels() |
|
169 | |||
170 | /** |
||
171 | * @param string $class |
||
172 | * |
||
173 | * @return bool |
||
174 | */ |
||
175 | 2 | public function hasModel($class) |
|
179 | |||
180 | /** |
||
181 | * @return NavigationInterface |
||
182 | */ |
||
183 | public function navigation() |
||
187 | |||
188 | /** |
||
189 | * @return MetaInterface |
||
190 | */ |
||
191 | public function meta() |
||
195 | |||
196 | /** |
||
197 | * @return TemplateInterface |
||
198 | */ |
||
199 | 1 | public function template() |
|
203 | |||
204 | /** |
||
205 | * @param string $class |
||
206 | * @param int $priority |
||
207 | * |
||
208 | * @return Page |
||
209 | */ |
||
210 | 1 | public function addMenuPage($class = null, $priority = 100) |
|
214 | |||
215 | /** |
||
216 | * @return Navigation |
||
217 | * |
||
218 | * @deprecated |
||
219 | */ |
||
220 | public function getNavigation() |
||
224 | |||
225 | /** |
||
226 | * @param string|Renderable $content |
||
227 | * @param string|null $title |
||
228 | * |
||
229 | * @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory |
||
230 | */ |
||
231 | 1 | public function view($content, $title = null) |
|
235 | |||
236 | /** |
||
237 | * Register all of the base service providers. |
||
238 | * |
||
239 | * @return void |
||
240 | */ |
||
241 | 283 | protected function registerBaseServiceProviders() |
|
259 | |||
260 | /** |
||
261 | * Register the core class aliases in the container. |
||
262 | * |
||
263 | * @return void |
||
264 | */ |
||
265 | 283 | protected function registerCoreContainerAliases() |
|
284 | } |
||
285 |