@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
| 103 | 103 | Button::ATTRIBUTES => [ |
| 104 | 104 | $targetAttribute => "/{$routeBase}/edit", |
| 105 | - ] + ($hasCan ? [ "v-if" => 'can(\'create\')' ]: []), |
|
| 105 | + ] + ($hasCan ? ["v-if" => 'can(\'create\')'] : []), |
|
| 106 | 106 | ] |
| 107 | 107 | )->setContent( |
| 108 | 108 | '<i class="fa fa-plus"></i> ' . $this->getOptions()->getOption('frontend', 'messages')['addNew'], |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
| 117 | 117 | Button::ATTRIBUTES => [ |
| 118 | 118 | $targetAttribute => "'/{$routeBase}/' + model.{$keyAttribute} + '/edit'", |
| 119 | - ] + ($hasCan ? [ "v-if" => 'can(\'edit\')' ]: []), |
|
| 119 | + ] + ($hasCan ? ["v-if" => 'can(\'edit\')'] : []), |
|
| 120 | 120 | ] |
| 121 | 121 | )->setContent( |
| 122 | 122 | '<i class="fa fa-pencil"></i> ' . $this->getOptions()->getOption('frontend', 'messages')['edit'], |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | Button::ATTRIBUTES => [ |
| 133 | 133 | 'href' => '#', |
| 134 | 134 | '@click.prevent' => 'remove(model.id)', |
| 135 | - ] + ($hasCan ? [ "v-if" => 'can(\'delete\')' ]: []), |
|
| 135 | + ] + ($hasCan ? ["v-if" => 'can(\'delete\')'] : []), |
|
| 136 | 136 | ] |
| 137 | 137 | )->setContent( |
| 138 | 138 | '<i class="fa fa-trash"></i> ' . $this->getOptions()->getOption('frontend', 'messages')['delete'], |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $this->generator->templateParameters['options'] = $this->getOptions()->options; |
| 153 | 153 | |
| 154 | 154 | $this->generator->templateParameters['tableItemFields'] = |
| 155 | - array_values(array_map(function (Field $f) { |
|
| 155 | + array_values(array_map(function(Field $f) { |
|
| 156 | 156 | $required = $f->getValidator('required', false); |
| 157 | 157 | if ($f->getDatatype()->getBasetype() === 'relationship') { |
| 158 | 158 | $name = $f->getName(); |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | true |
| 252 | 252 | ) |
| 253 | 253 | ]; |
| 254 | - $cardFieldNames = array_map(function (Field $f) { |
|
| 254 | + $cardFieldNames = array_map(function(Field $f) { |
|
| 255 | 255 | return $f->getName(); |
| 256 | 256 | }, $this->generator->getCardFields()); |
| 257 | 257 | $vueCode->setExtraProps($extraprops); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | $vueCode = $vue->getVueCode(); |
| 280 | 280 | // set basic data for vue |
| 281 | 281 | $vueCode->setExtraProps([]); |
| 282 | - $cardFieldNames = array_map(function (Field $f) { |
|
| 282 | + $cardFieldNames = array_map(function(Field $f) { |
|
| 283 | 283 | return $f->getName(); |
| 284 | 284 | }, $this->generator->getCardFields()); |
| 285 | 285 | foreach ($this->generator->getCardFields() as $f) { |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | public function vueTableItem(FrameworkVue $vue): void |
| 319 | 319 | { |
| 320 | 320 | $vueCode = $vue->getVueCode(); |
| 321 | - $tableFieldNames = array_map(function (Field $f) { |
|
| 321 | + $tableFieldNames = array_map(function(Field $f) { |
|
| 322 | 322 | return $f->getName(); |
| 323 | 323 | }, $this->generator->getTableFields()); |
| 324 | 324 | $vueCode->setExtraProps([]); |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | $vueCode->setExtraProps([]); |
| 365 | 365 | |
| 366 | 366 | $createGraphqlVariables = $this->generator->getModel()->mapFields( |
| 367 | - function (Field $f) { |
|
| 367 | + function(Field $f) { |
|
| 368 | 368 | if (!$f->getRenderable('form', true)) { |
| 369 | 369 | return null; |
| 370 | 370 | } |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | $vue, |
| 386 | 386 | 'Form', |
| 387 | 387 | 'editable', |
| 388 | - function (Field $f) { |
|
| 388 | + function(Field $f) { |
|
| 389 | 389 | if (!$f->getExtradata('modelFillable')) { |
| 390 | 390 | return false; |
| 391 | 391 | } |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | |
| 411 | 411 | if ($mode == 'editable') { |
| 412 | 412 | $vue->setEditableTemplate( |
| 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 | ); |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | ); |
| 425 | 425 | } else { |
| 426 | 426 | $vue->setViewableTemplate( |
| 427 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 427 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
| 428 | 428 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
| 429 | 429 | } |
| 430 | 430 | ); |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | $path = $this->generator->getModel()->getName() . '/index.js'; |
| 447 | 447 | $name = $this->generator->getStudlyName(); |
| 448 | 448 | |
| 449 | - $contents = function ($basepath, $element) use ($name) { |
|
| 449 | + $contents = function($basepath, $element) use ($name) { |
|
| 450 | 450 | $dir = $basepath . '/' . $name; |
| 451 | 451 | $import = []; |
| 452 | 452 | $export = []; |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | $path = $this->generator->getModel()->getName() . '/index.dynamic.js'; |
| 477 | 477 | $name = $this->generator->getStudlyName(); |
| 478 | 478 | |
| 479 | - $contents = function ($basepath, $element) use ($name) { |
|
| 479 | + $contents = function($basepath, $element) use ($name) { |
|
| 480 | 480 | $dir = $basepath . '/' . $name; |
| 481 | 481 | $import = []; |
| 482 | 482 | $export = []; |