@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
| 99 | 99 | Button::ATTRIBUTES => [ |
| 100 | 100 | $targetAttribute => "/{$routeBase}/edit", |
| 101 | - ] + ($hasCan ? [ "v-if" => 'can(\'create\')' ]: []), |
|
| 101 | + ] + ($hasCan ? ["v-if" => 'can(\'create\')'] : []), |
|
| 102 | 102 | ] |
| 103 | 103 | )->setContent( |
| 104 | 104 | '<i class="fa fa-plus"></i> Add new', |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
| 113 | 113 | Button::ATTRIBUTES => [ |
| 114 | 114 | $targetAttribute => "'/{$routeBase}/' + model.{$keyAttribute} + '/edit'", |
| 115 | - ] + ($hasCan ? [ "v-if" => 'can(\'edit\')' ]: []), |
|
| 115 | + ] + ($hasCan ? ["v-if" => 'can(\'edit\')'] : []), |
|
| 116 | 116 | ] |
| 117 | 117 | )->setContent( |
| 118 | 118 | '<i class="fa fa-pencil"></i> Edit', |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | Button::ATTRIBUTES => [ |
| 129 | 129 | 'href' => '#', |
| 130 | 130 | '@click.prevent' => 'remove', |
| 131 | - ] + ($hasCan ? [ "v-if" => 'can(\'delete\')' ]: []), |
|
| 131 | + ] + ($hasCan ? ["v-if" => 'can(\'delete\')'] : []), |
|
| 132 | 132 | ] |
| 133 | 133 | )->setContent( |
| 134 | 134 | '<i class="fa fa-trash"></i> Delete', |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | $this->generator->templateParameters['options'] = $this->getOptions()->options; |
| 149 | 149 | |
| 150 | 150 | $this->generator->templateParameters['tableItemFields'] = |
| 151 | - array_values(array_map(function (Field $f) { |
|
| 151 | + array_values(array_map(function(Field $f) { |
|
| 152 | 152 | $required = $f->getValidator('required', false); |
| 153 | 153 | if ($f->getDatatype()->getBasetype() === 'relationship') { |
| 154 | 154 | $name = $f->getName(); |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | 'required' => true |
| 245 | 245 | ] |
| 246 | 246 | ]; |
| 247 | - $cardFieldNames = array_map(function (Field $f) { |
|
| 247 | + $cardFieldNames = array_map(function(Field $f) { |
|
| 248 | 248 | return $f->getName(); |
| 249 | 249 | }, $this->generator->getCardFields()); |
| 250 | 250 | $vueCode->setExtraProps($extraprops); |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | $vueCode = $vue->getVueCode(); |
| 271 | 271 | // set basic data for vue |
| 272 | 272 | $vueCode->setExtraProps([]); |
| 273 | - $cardFieldNames = array_map(function (Field $f) { |
|
| 273 | + $cardFieldNames = array_map(function(Field $f) { |
|
| 274 | 274 | return $f->getName(); |
| 275 | 275 | }, $this->generator->getCardFields()); |
| 276 | 276 | foreach ($this->generator->getCardFields() as $f) { |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | public function vueTableItem(FrameworkVue $vue): void |
| 304 | 304 | { |
| 305 | 305 | $vueCode = $vue->getVueCode(); |
| 306 | - $tableFieldNames = array_map(function (Field $f) { |
|
| 306 | + $tableFieldNames = array_map(function(Field $f) { |
|
| 307 | 307 | return $f->getName(); |
| 308 | 308 | }, $this->generator->getTableFields()); |
| 309 | 309 | $vueCode->setExtraProps([]); |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | $vueCode->setExtraProps([]); |
| 351 | 351 | |
| 352 | 352 | $createGraphqlVariables = $this->generator->getModel()->mapFields( |
| 353 | - function (Field $f) { |
|
| 353 | + function(Field $f) { |
|
| 354 | 354 | if (!$f->getRenderable('form', true)) { |
| 355 | 355 | return null; |
| 356 | 356 | } |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | $vue, |
| 372 | 372 | 'Form', |
| 373 | 373 | 'editable', |
| 374 | - function (Field $f) { |
|
| 374 | + function(Field $f) { |
|
| 375 | 375 | if (!$f->getExtradata('modelFillable')) { |
| 376 | 376 | return false; |
| 377 | 377 | } |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | |
| 397 | 397 | if ($mode == 'editable') { |
| 398 | 398 | $vue->setEditableTemplate( |
| 399 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 399 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 400 | 400 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
| 401 | 401 | } |
| 402 | 402 | ); |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | ); |
| 411 | 411 | } else { |
| 412 | 412 | $vue->setViewableTemplate( |
| 413 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 413 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 414 | 414 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
| 415 | 415 | } |
| 416 | 416 | ); |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | $path = $this->generator->getModel()->getName() . '/index.js'; |
| 433 | 433 | $name = $this->generator->getStudlyName(); |
| 434 | 434 | |
| 435 | - $contents = function ($basepath, $element) use ($name) { |
|
| 435 | + $contents = function($basepath, $element) use ($name) { |
|
| 436 | 436 | $dir = $basepath . '/' . $name; |
| 437 | 437 | $import = []; |
| 438 | 438 | $export = []; |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | $path = $this->generator->getModel()->getName() . '/index.dynamic.js'; |
| 463 | 463 | $name = $this->generator->getStudlyName(); |
| 464 | 464 | |
| 465 | - $contents = function ($basepath, $element) use ($name) { |
|
| 465 | + $contents = function($basepath, $element) use ($name) { |
|
| 466 | 466 | $dir = $basepath . '/' . $name; |
| 467 | 467 | $import = []; |
| 468 | 468 | $export = []; |