@@ -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()->getSection('vue'); |
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 | if ($f->getDatatype()->getBasetype() === 'relationship') { |
153 | 153 | $name = $f->getName(); |
154 | 154 | return "<{$name}-link v-bind=\"{$name}\"></{$name}-link>"; |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | 'required' => true |
244 | 244 | ] |
245 | 245 | ]; |
246 | - $cardFieldNames = array_map(function (Field $f) { |
|
246 | + $cardFieldNames = array_map(function(Field $f) { |
|
247 | 247 | return $f->getName(); |
248 | 248 | }, $this->generator->getCardFields()); |
249 | 249 | $vueCode->setExtraProps($extraprops); |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $vueCode = $vue->getVueCode(); |
270 | 270 | // set basic data for vue |
271 | 271 | $vueCode->setExtraProps([]); |
272 | - $cardFieldNames = array_map(function (Field $f) { |
|
272 | + $cardFieldNames = array_map(function(Field $f) { |
|
273 | 273 | return $f->getName(); |
274 | 274 | }, $this->generator->getCardFields()); |
275 | 275 | foreach ($this->generator->getCardFields() as $f) { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | public function vueTableItem(FrameworkVue $vue): void |
303 | 303 | { |
304 | 304 | $vueCode = $vue->getVueCode(); |
305 | - $tableFieldNames = array_map(function (Field $f) { |
|
305 | + $tableFieldNames = array_map(function(Field $f) { |
|
306 | 306 | return $f->getName(); |
307 | 307 | }, $this->generator->getTableFields()); |
308 | 308 | $vueCode->setExtraProps([]); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $vueCode->setExtraProps([]); |
337 | 337 | |
338 | 338 | $createGraphqlVariables = $this->generator->getModel()->mapFields( |
339 | - function (Field $f) { |
|
339 | + function(Field $f) { |
|
340 | 340 | if (!$f->getRenderable('form', true)) { |
341 | 341 | return null; |
342 | 342 | } |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | $vue, |
358 | 358 | 'Form', |
359 | 359 | 'editable', |
360 | - function (Field $f) { |
|
360 | + function(Field $f) { |
|
361 | 361 | if (!$f->getExtradata('modelFillable')) { |
362 | 362 | return false; |
363 | 363 | } |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | |
383 | 383 | if ($mode == 'editable') { |
384 | 384 | $vue->setEditableTemplate( |
385 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
385 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
386 | 386 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
387 | 387 | } |
388 | 388 | ); |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | ); |
397 | 397 | } else { |
398 | 398 | $vue->setViewableTemplate( |
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 | ); |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | $path = $this->generator->getModel()->getName() . '/index.js'; |
419 | 419 | $name = $this->generator->getStudlyName(); |
420 | 420 | |
421 | - $contents = function ($basepath, $element) use ($name) { |
|
421 | + $contents = function($basepath, $element) use ($name) { |
|
422 | 422 | $dir = $basepath . '/' . $name; |
423 | 423 | $import = []; |
424 | 424 | $export = []; |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | $path = $this->generator->getModel()->getName() . '/index.dynamic.js'; |
449 | 449 | $name = $this->generator->getStudlyName(); |
450 | 450 | |
451 | - $contents = function ($basepath, $element) use ($name) { |
|
451 | + $contents = function($basepath, $element) use ($name) { |
|
452 | 452 | $dir = $basepath . '/' . $name; |
453 | 453 | $import = []; |
454 | 454 | $export = []; |