@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | // $blade = FrameworkComposer::getByName('Blade'); |
87 | 87 | |
88 | 88 | if ($vue !== null) { |
89 | - $cardFieldNames = array_map(function (Field $f) { |
|
89 | + $cardFieldNames = array_map(function(Field $f) { |
|
90 | 90 | return $f->getName(); |
91 | 91 | }, $this->cardFields); |
92 | - $tableFieldNames = array_map(function (Field $f) { |
|
92 | + $tableFieldNames = array_map(function(Field $f) { |
|
93 | 93 | return $f->getName(); |
94 | 94 | }, $this->tableFields); |
95 | 95 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $vue, |
115 | 115 | 'Form', |
116 | 116 | 'editable', |
117 | - function (Field $f) { |
|
117 | + function(Field $f) { |
|
118 | 118 | if (!$f->getExtradata('modelFillable')) { |
119 | 119 | return false; |
120 | 120 | } |
@@ -177,12 +177,12 @@ discard block |
||
177 | 177 | protected function buildTemplateParameters(): void |
178 | 178 | { |
179 | 179 | $this->cardFields = $this->model->filterField( |
180 | - function (Field $field) { |
|
180 | + function(Field $field) { |
|
181 | 181 | return $field->getRenderable('card', false); |
182 | 182 | } |
183 | 183 | ); |
184 | 184 | $this->tableFields = $this->model->filterField( |
185 | - function (Field $field) { |
|
185 | + function(Field $field) { |
|
186 | 186 | return $field->getRenderable('table', false); |
187 | 187 | } |
188 | 188 | ); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | 'Button', |
195 | 195 | [ |
196 | 196 | Button::TYPE => 'a', |
197 | - Button::ATTRIBUTES => ['href' => "/{$this->lowerName}/edit" ], |
|
197 | + Button::ATTRIBUTES => ['href' => "/{$this->lowerName}/edit"], |
|
198 | 198 | ] |
199 | 199 | )->setContent( |
200 | 200 | '<i class="fa fa-plus"></i> Add new', |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | 'Table', |
238 | 238 | [ |
239 | 239 | Table::ROW_NAMES => array_map( |
240 | - function (Field $field) { |
|
240 | + function(Field $field) { |
|
241 | 241 | return $field->getRenderable(Renderable::LABEL, $field->getName()); |
242 | 242 | }, |
243 | 243 | $this->tableFields |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | true |
256 | 256 | ); |
257 | 257 | $titleFields = $this->model->filterField( |
258 | - function (Field $field) { |
|
258 | + function(Field $field) { |
|
259 | 259 | return $field->getRenderable('title', false); |
260 | 260 | } |
261 | 261 | ); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | // TODO 'hasCan' => $this->model |
280 | 280 | 'spinner' => $spinner, |
281 | 281 | 'tablelist' => $table->getRenderHTML(), |
282 | - 'tableItemFields' => array_keys(array_map(function (Field $f) { |
|
282 | + 'tableItemFields' => array_keys(array_map(function(Field $f) { |
|
283 | 283 | return $f->getName(); |
284 | 284 | }, $this->tableFields)), |
285 | 285 | 'titleField' => array_key_first($titleFields) ?: 'id' |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | |
315 | 315 | if ($mode == 'editable') { |
316 | 316 | $vue->setEditableTemplate( |
317 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
317 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
318 | 318 | return $this->templateCallback($stub, $vue, $data, $m); |
319 | 319 | } |
320 | 320 | ); |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | ); |
329 | 329 | } else { |
330 | 330 | $vue->setViewableTemplate( |
331 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
331 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
332 | 332 | return $this->templateCallback($stub, $vue, $data, $m); |
333 | 333 | } |
334 | 334 | ); |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | * card |
356 | 356 | */ |
357 | 357 | $cardFieldNames = array_map( |
358 | - function (Field $field) { |
|
358 | + function(Field $field) { |
|
359 | 359 | return $field->getName(); |
360 | 360 | }, |
361 | 361 | $this->cardFields |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | * table |
392 | 392 | */ |
393 | 393 | $tableFieldNames = array_map( |
394 | - function (Field $field) { |
|
394 | + function(Field $field) { |
|
395 | 395 | return $field->getName(); |
396 | 396 | }, |
397 | 397 | $this->tableFields |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | * item |
428 | 428 | */ |
429 | 429 | $graphqlQuery = $this->model->mapFields( |
430 | - function (Field $f) { |
|
430 | + function(Field $f) { |
|
431 | 431 | // TODO, hidden is not available. we don't have the directives here. |
432 | 432 | if ($f->getRenderable('modelHidden', false) !== false) { |
433 | 433 | return null; |
@@ -499,14 +499,14 @@ discard block |
||
499 | 499 | ]; |
500 | 500 | |
501 | 501 | $import = array_map( |
502 | - function ($i) use ($name) { |
|
502 | + function($i) use ($name) { |
|
503 | 503 | return "import {$name}$i from './{$name}$i.vue';"; |
504 | 504 | }, |
505 | 505 | $items |
506 | 506 | ); |
507 | 507 | |
508 | 508 | $export = array_map( |
509 | - function ($i) use ($name) { |
|
509 | + function($i) use ($name) { |
|
510 | 510 | return " {$name}$i,\n"; |
511 | 511 | }, |
512 | 512 | $items |