1 | <?php |
||
36 | abstract class Display implements DisplayInterface |
||
37 | { |
||
38 | use HtmlAttributes, Assets; |
||
39 | |||
40 | /** |
||
41 | * @var string|\Illuminate\View\View |
||
42 | */ |
||
43 | protected $view; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $modelClass; |
||
49 | |||
50 | /** |
||
51 | * @var array |
||
52 | */ |
||
53 | protected $with = []; |
||
54 | |||
55 | /** |
||
56 | * @var string |
||
57 | */ |
||
58 | protected $title; |
||
59 | |||
60 | /** |
||
61 | * @var string |
||
62 | */ |
||
63 | protected $repositoryClass = RepositoryInterface::class; |
||
64 | |||
65 | /** |
||
66 | * @var RepositoryInterface |
||
67 | */ |
||
68 | protected $repository; |
||
69 | |||
70 | /** |
||
71 | * @var DisplayExtensionInterface[]|Collection |
||
72 | */ |
||
73 | protected $extensions; |
||
74 | |||
75 | /** |
||
76 | * @var bool |
||
77 | */ |
||
78 | protected $initialized = false; |
||
79 | |||
80 | /** |
||
81 | * Display constructor. |
||
82 | */ |
||
83 | public function __construct() |
||
84 | { |
||
85 | $this->extensions = new Collection(); |
||
86 | |||
87 | $this->extend('actions', new Actions()); |
||
88 | $this->extend('filters', new Filters()); |
||
89 | $this->extend('apply', new Apply()); |
||
90 | $this->extend('scopes', new Scopes()); |
||
91 | |||
92 | $this->initializePackage(); |
||
93 | } |
||
94 | |||
95 | /** |
||
96 | * @return bool |
||
97 | */ |
||
98 | public function isInitialized() |
||
102 | |||
103 | /** |
||
104 | * @param string $name |
||
105 | * @param DisplayExtensionInterface $extension |
||
106 | * |
||
107 | * @return DisplayExtensionInterface |
||
108 | */ |
||
109 | public function extend($name, DisplayExtensionInterface $extension) |
||
117 | |||
118 | /** |
||
119 | * @return Collection|\SleepingOwl\Admin\Contracts\Display\DisplayExtensionInterface[] |
||
120 | */ |
||
121 | public function getExtensions() |
||
125 | |||
126 | /** |
||
127 | * @return RepositoryInterface |
||
128 | */ |
||
129 | public function getRepository() |
||
133 | |||
134 | /** |
||
135 | * @param $repositoryClass |
||
136 | * |
||
137 | * @return $this |
||
138 | */ |
||
139 | public function setRepositoryClass($repositoryClass) |
||
145 | |||
146 | /** |
||
147 | * @param array|string[] ...$relations |
||
148 | * |
||
149 | * @return $this |
||
150 | */ |
||
151 | public function with($relations) |
||
157 | |||
158 | /** |
||
159 | * @return void |
||
160 | */ |
||
161 | public function initialize() |
||
180 | |||
181 | /** |
||
182 | * @param string $modelClass |
||
183 | * |
||
184 | * @return $this |
||
185 | */ |
||
186 | public function setModelClass($modelClass) |
||
194 | |||
195 | /** |
||
196 | * @return string |
||
197 | */ |
||
198 | public function getTitle() |
||
212 | |||
213 | /** |
||
214 | * @param string $title |
||
215 | * |
||
216 | * @return $this |
||
217 | */ |
||
218 | public function setTitle($title) |
||
224 | |||
225 | /** |
||
226 | * Get the instance as an array. |
||
227 | * |
||
228 | * @return array |
||
229 | */ |
||
230 | public function toArray() |
||
238 | |||
239 | /** |
||
240 | * @return string |
||
241 | */ |
||
242 | public function getView() |
||
246 | |||
247 | /** |
||
248 | * @param string|\Illuminate\View\View $view |
||
249 | * |
||
250 | * @return $this |
||
251 | */ |
||
252 | public function setView($view) |
||
258 | |||
259 | /** |
||
260 | * Get the evaluated contents of the object. |
||
261 | * |
||
262 | * @return string |
||
263 | */ |
||
264 | public function render() |
||
284 | |||
285 | /** |
||
286 | * @return string |
||
287 | */ |
||
288 | public function __toString() |
||
292 | |||
293 | /** |
||
294 | * @param string $name |
||
295 | * @param array $arguments |
||
296 | * |
||
297 | * @return DisplayExtensionInterface |
||
298 | */ |
||
299 | public function __call($name, $arguments) |
||
315 | |||
316 | /** |
||
317 | * @return ModelConfigurationInterface |
||
318 | */ |
||
319 | protected function getModelConfiguration() |
||
323 | |||
324 | /** |
||
325 | * @return \Illuminate\Foundation\Application|mixed |
||
326 | * @throws \Exception |
||
327 | */ |
||
328 | protected function makeRepository() |
||
338 | } |
||
339 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.