1 | <?php |
||
16 | class Builder |
||
17 | { |
||
18 | use Macroable; |
||
19 | use HasOptions; |
||
20 | use HasTable; |
||
21 | use HasEditor; |
||
22 | use Columns\Index; |
||
23 | use Columns\Action; |
||
24 | use Columns\Checkbox; |
||
25 | |||
26 | /** |
||
27 | * @var Collection |
||
28 | */ |
||
29 | public $collection; |
||
30 | |||
31 | /** |
||
32 | * @var Repository |
||
33 | */ |
||
34 | public $config; |
||
35 | |||
36 | /** |
||
37 | * @var Factory |
||
38 | */ |
||
39 | public $view; |
||
40 | |||
41 | /** |
||
42 | * @var HtmlBuilder |
||
43 | */ |
||
44 | public $html; |
||
45 | |||
46 | /** |
||
47 | * @var array |
||
48 | */ |
||
49 | protected $tableAttributes = []; |
||
50 | |||
51 | /** |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $template = ''; |
||
55 | |||
56 | /** |
||
57 | * @var array |
||
58 | */ |
||
59 | protected $attributes = []; |
||
60 | |||
61 | /** |
||
62 | * @param Repository $config |
||
63 | * @param Factory $view |
||
64 | * @param HtmlBuilder $html |
||
65 | */ |
||
66 | public function __construct(Repository $config, Factory $view, HtmlBuilder $html) |
||
74 | |||
75 | /** |
||
76 | * Generate DataTable javascript. |
||
77 | * |
||
78 | * @param null $script |
||
79 | * @param array $attributes |
||
80 | * @return \Illuminate\Support\HtmlString |
||
81 | * @throws \Exception |
||
82 | */ |
||
83 | public function scripts($script = null, array $attributes = ['type' => 'text/javascript']) |
||
90 | |||
91 | /** |
||
92 | * Get generated raw scripts. |
||
93 | * |
||
94 | * @return \Illuminate\Support\HtmlString |
||
95 | * @throws \Exception |
||
96 | */ |
||
97 | public function generateScripts() |
||
105 | |||
106 | /** |
||
107 | * Get generated json configuration. |
||
108 | * |
||
109 | * @return string |
||
110 | */ |
||
111 | public function generateJson() |
||
127 | |||
128 | /** |
||
129 | * Generate DataTables js parameters. |
||
130 | * |
||
131 | * @param array $attributes |
||
132 | * @return string |
||
133 | */ |
||
134 | public function parameterize($attributes = []) |
||
160 | |||
161 | /** |
||
162 | * Check if given key & value is a valid callback js function. |
||
163 | * |
||
164 | * @param string $value |
||
165 | * @param string $key |
||
166 | * @return bool |
||
167 | */ |
||
168 | protected function isCallbackFunction($value, $key) |
||
178 | |||
179 | /** |
||
180 | * Get javascript template to use. |
||
181 | * |
||
182 | * @return string |
||
183 | */ |
||
184 | protected function template() |
||
190 | |||
191 | /** |
||
192 | * Generate DataTable's table html. |
||
193 | * |
||
194 | * @param array $attributes |
||
195 | * @param bool $drawFooter |
||
196 | * @param bool $drawSearch |
||
197 | * @return \Illuminate\Support\HtmlString |
||
198 | */ |
||
199 | public function table(array $attributes = [], $drawFooter = false, $drawSearch = false) |
||
218 | |||
219 | /** |
||
220 | * Configure DataTable's parameters. |
||
221 | * |
||
222 | * @param array $attributes |
||
223 | * @return $this |
||
224 | */ |
||
225 | public function parameters(array $attributes = []) |
||
231 | |||
232 | /** |
||
233 | * Set custom javascript template. |
||
234 | * |
||
235 | * @param string $template |
||
236 | * @return $this |
||
237 | */ |
||
238 | public function setTemplate($template) |
||
244 | |||
245 | /** |
||
246 | * Make a data script to be appended on ajax request of dataTables. |
||
247 | * |
||
248 | * @param array $data |
||
249 | * @return string |
||
250 | */ |
||
251 | protected function makeDataScript(array $data) |
||
260 | } |
||
261 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..