@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
122 | 122 | Button::ATTRIBUTES => [ |
123 | 123 | $targetAttribute => "/{$routeBase}/edit", |
124 | - ] + ($hasCan ? [ "v-if" => 'can.create' ]: []), |
|
124 | + ] + ($hasCan ? ["v-if" => 'can.create'] : []), |
|
125 | 125 | ] |
126 | 126 | )->setContent( |
127 | 127 | '<i class="fa fa-plus"></i> Add new', |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
136 | 136 | Button::ATTRIBUTES => [ |
137 | 137 | $targetAttribute => "'/{$routeBase}/' + model.{$keyAttribute} + '/edit'", |
138 | - ] + ($hasCan ? [ "v-if" => 'can.edit' ]: []), |
|
138 | + ] + ($hasCan ? ["v-if" => 'can.edit'] : []), |
|
139 | 139 | ] |
140 | 140 | )->setContent( |
141 | 141 | '<i class="fa fa-pencil"></i> Edit', |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | Button::ATTRIBUTES => [ |
152 | 152 | 'href' => '#', |
153 | 153 | '@click.prevent' => 'remove', |
154 | - ] + ($hasCan ? [ "v-if" => 'can.delete' ]: []), |
|
154 | + ] + ($hasCan ? ["v-if" => 'can.delete'] : []), |
|
155 | 155 | ] |
156 | 156 | )->setContent( |
157 | 157 | '<i class="fa fa-trash"></i> Delete', |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $this->generator->templateParameters['options'] = $this->options->getSection('vue'); |
172 | 172 | |
173 | 173 | $this->generator->templateParameters['tableItemFields'] = |
174 | - array_values(array_map(function (Field $f) { |
|
174 | + array_values(array_map(function(Field $f) { |
|
175 | 175 | if ($f->getDatatype()->getBasetype() === 'relationship') { |
176 | 176 | $name = $f->getName(); |
177 | 177 | return "<{$name}-link v-bind=\"{$name}\"></{$name}-link>"; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | 'required' => true |
257 | 257 | ] |
258 | 258 | ]; |
259 | - $cardFieldNames = array_map(function (Field $f) { |
|
259 | + $cardFieldNames = array_map(function(Field $f) { |
|
260 | 260 | return $f->getName(); |
261 | 261 | }, $this->generator->getCardFields()); |
262 | 262 | $vueCode->setExtraProps($extraprops); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | ] |
290 | 290 | ]; |
291 | 291 | $vueCode->setExtraProps($extraprops); |
292 | - $cardFieldNames = array_map(function (Field $f) { |
|
292 | + $cardFieldNames = array_map(function(Field $f) { |
|
293 | 293 | return $f->getName(); |
294 | 294 | }, $this->generator->getCardFields()); |
295 | 295 | foreach ($this->generator->getCardFields() as $f) { |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | public function vueTableItem(FrameworkVue $vue): void |
315 | 315 | { |
316 | 316 | $vueCode = $vue->getVueCode(); |
317 | - $tableFieldNames = array_map(function (Field $f) { |
|
317 | + $tableFieldNames = array_map(function(Field $f) { |
|
318 | 318 | return $f->getName(); |
319 | 319 | }, $this->generator->getTableFields()); |
320 | 320 | $extraprops = [ |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $vue, |
347 | 347 | 'Form', |
348 | 348 | 'editable', |
349 | - function (Field $f) { |
|
349 | + function(Field $f) { |
|
350 | 350 | if (!$f->getExtradata('modelFillable')) { |
351 | 351 | return false; |
352 | 352 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | |
372 | 372 | if ($mode == 'editable') { |
373 | 373 | $vue->setEditableTemplate( |
374 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
374 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
375 | 375 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
376 | 376 | } |
377 | 377 | ); |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | ); |
386 | 386 | } else { |
387 | 387 | $vue->setViewableTemplate( |
388 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
388 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
389 | 389 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
390 | 390 | } |
391 | 391 | ); |
@@ -417,14 +417,14 @@ discard block |
||
417 | 417 | ]; |
418 | 418 | |
419 | 419 | $import = array_map( |
420 | - function ($i) use ($name) { |
|
420 | + function($i) use ($name) { |
|
421 | 421 | return "import {$name}$i from './{$name}$i.vue';"; |
422 | 422 | }, |
423 | 423 | $items |
424 | 424 | ); |
425 | 425 | |
426 | 426 | $export = array_map( |
427 | - function ($i) use ($name) { |
|
427 | + function($i) use ($name) { |
|
428 | 428 | return " {$name}$i,"; |
429 | 429 | }, |
430 | 430 | $items |