@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
85 | 85 | Button::ATTRIBUTES => [ |
86 | 86 | $targetAttribute => "/{$routeBase}/edit", |
87 | - ] + ($hasCan ? [ "v-if" => 'can.create' ]: []), |
|
87 | + ] + ($hasCan ? ["v-if" => 'can.create'] : []), |
|
88 | 88 | ] |
89 | 89 | )->setContent( |
90 | 90 | '<i class="fa fa-plus"></i> Add new', |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | Button::TYPE => ($hasVueRouter ? 'router-link' : 'a'), |
99 | 99 | Button::ATTRIBUTES => [ |
100 | 100 | $targetAttribute => "'/{$routeBase}/' + model.{$keyAttribute} + '/edit'", |
101 | - ] + ($hasCan ? [ "v-if" => 'can.edit' ]: []), |
|
101 | + ] + ($hasCan ? ["v-if" => 'can.edit'] : []), |
|
102 | 102 | ] |
103 | 103 | )->setContent( |
104 | 104 | '<i class="fa fa-pencil"></i> Edit', |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | Button::ATTRIBUTES => [ |
115 | 115 | 'href' => '#', |
116 | 116 | '@click.prevent' => 'remove', |
117 | - ] + ($hasCan ? [ "v-if" => 'can.delete' ]: []), |
|
117 | + ] + ($hasCan ? ["v-if" => 'can.delete'] : []), |
|
118 | 118 | ] |
119 | 119 | )->setContent( |
120 | 120 | '<i class="fa fa-trash"></i> Delete', |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $this->generator->templateParameters['buttonDelete'] = $buttonDelete; |
128 | 128 | |
129 | 129 | $this->generator->templateParameters['tableItemFields'] = |
130 | - array_values(array_map(function (Field $f) { |
|
130 | + array_values(array_map(function(Field $f) { |
|
131 | 131 | if ($f->getDatatype()->getBasetype() === 'relationship') { |
132 | 132 | $name = $f->getName(); |
133 | 133 | return "<{$name}-link v-bind=\"{$name}\"></{$name}-link>"; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | 'required' => true |
213 | 213 | ] |
214 | 214 | ]; |
215 | - $cardFieldNames = array_map(function (Field $f) { |
|
215 | + $cardFieldNames = array_map(function(Field $f) { |
|
216 | 216 | return $f->getName(); |
217 | 217 | }, $this->generator->getCardFields()); |
218 | 218 | $vueCode->setExtraProps($extraprops); |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | ] |
241 | 241 | ]; |
242 | 242 | $vueCode->setExtraProps($extraprops); |
243 | - $cardFieldNames = array_map(function (Field $f) { |
|
243 | + $cardFieldNames = array_map(function(Field $f) { |
|
244 | 244 | return $f->getName(); |
245 | 245 | }, $this->generator->getCardFields()); |
246 | 246 | foreach ($this->generator->getCardFields() as $f) { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | public function vueTableItem(FrameworkVue $vue): void |
266 | 266 | { |
267 | 267 | $vueCode = $vue->getVueCode(); |
268 | - $tableFieldNames = array_map(function (Field $f) { |
|
268 | + $tableFieldNames = array_map(function(Field $f) { |
|
269 | 269 | return $f->getName(); |
270 | 270 | }, $this->generator->getTableFields()); |
271 | 271 | $extraprops = [ |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | $vue, |
298 | 298 | 'Form', |
299 | 299 | 'editable', |
300 | - function (Field $f) { |
|
300 | + function(Field $f) { |
|
301 | 301 | if (!$f->getExtradata('modelFillable')) { |
302 | 302 | return false; |
303 | 303 | } |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | |
323 | 323 | if ($mode == 'editable') { |
324 | 324 | $vue->setEditableTemplate( |
325 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
325 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
326 | 326 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
327 | 327 | } |
328 | 328 | ); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | ); |
337 | 337 | } else { |
338 | 338 | $vue->setViewableTemplate( |
339 | - function (FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
339 | + function(FrameworkVue $vue, array $data, Model $m) use ($stub) { |
|
340 | 340 | return $this->generator->templateCallback($stub, $vue, $data, $m); |
341 | 341 | } |
342 | 342 | ); |
@@ -368,14 +368,14 @@ discard block |
||
368 | 368 | ]; |
369 | 369 | |
370 | 370 | $import = array_map( |
371 | - function ($i) use ($name) { |
|
371 | + function($i) use ($name) { |
|
372 | 372 | return "import {$name}$i from './{$name}$i.vue';"; |
373 | 373 | }, |
374 | 374 | $items |
375 | 375 | ); |
376 | 376 | |
377 | 377 | $export = array_map( |
378 | - function ($i) use ($name) { |
|
378 | + function($i) use ($name) { |
|
379 | 379 | return " {$name}$i,"; |
380 | 380 | }, |
381 | 381 | $items |