1 | <?php |
||
17 | class Builder implements BuilderContract |
||
18 | { |
||
19 | use HasAttributes; |
||
20 | |||
21 | /** |
||
22 | * @var Container |
||
23 | */ |
||
24 | protected $container; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $items; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $name; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $type; |
||
40 | |||
41 | /** |
||
42 | * @var AttributesContract |
||
43 | */ |
||
44 | protected $activeAttributes; |
||
45 | |||
46 | /** |
||
47 | * @var MenuRender |
||
48 | */ |
||
49 | protected $viewFactory; |
||
50 | |||
51 | /** |
||
52 | * @var array |
||
53 | */ |
||
54 | protected $config; |
||
55 | |||
56 | /** |
||
57 | * @var string |
||
58 | */ |
||
59 | protected $view = null; |
||
60 | |||
61 | /** |
||
62 | * @inheritDoc |
||
63 | */ |
||
64 | 21 | public function __construct(Container $container, $name, AttributesContract $attributes, |
|
79 | |||
80 | /** |
||
81 | * @inheritDoc |
||
82 | */ |
||
83 | 5 | public function submenu($name, \Closure $itemCallable, \Closure $menuCallable) |
|
113 | |||
114 | /** |
||
115 | * @inheritDoc |
||
116 | */ |
||
117 | 13 | public function create($name, $title, $url, $attributes = [], $linkAttributes = [], $callback = null) |
|
140 | |||
141 | /** |
||
142 | * @inheritDoc |
||
143 | */ |
||
144 | 5 | public function has($name) |
|
148 | |||
149 | /** |
||
150 | * @inheritDoc |
||
151 | */ |
||
152 | 3 | public function get($name, $default = null) |
|
159 | |||
160 | /** |
||
161 | * @inheritDoc |
||
162 | */ |
||
163 | 7 | public function all() |
|
167 | |||
168 | /** |
||
169 | * @inheritDoc |
||
170 | */ |
||
171 | 1 | public function forget($name) |
|
177 | |||
178 | /** |
||
179 | * @inheritDoc |
||
180 | */ |
||
181 | 7 | public function getType() |
|
185 | |||
186 | /** |
||
187 | * @inheritDoc |
||
188 | */ |
||
189 | 1 | public function setType($type) |
|
193 | |||
194 | /** |
||
195 | * @inheritDoc |
||
196 | */ |
||
197 | 6 | public function render($renderView = null) |
|
214 | |||
215 | /** |
||
216 | * @inheritDoc |
||
217 | */ |
||
218 | 9 | public function activeAttributes($callback = null) |
|
226 | |||
227 | /** |
||
228 | * @inheritDoc |
||
229 | */ |
||
230 | 5 | public function getView() |
|
234 | |||
235 | /** |
||
236 | * @inheritDoc |
||
237 | */ |
||
238 | 21 | public function setView($view) |
|
246 | |||
247 | /** |
||
248 | * Minify html |
||
249 | * |
||
250 | * @param string $html |
||
251 | * @return string |
||
252 | */ |
||
253 | 6 | protected function minifyHtmlOutput($html) |
|
269 | |||
270 | /** |
||
271 | * Get view for render |
||
272 | * |
||
273 | * @param string $view |
||
274 | * @return string |
||
275 | */ |
||
276 | 6 | protected function getRenderView($view = null) |
|
290 | } |