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