@@ -140,17 +140,17 @@ discard block |
||
| 140 | 140 | public function buildTemplateParameters(): void |
| 141 | 141 | { |
| 142 | 142 | $this->titleFields = $this->fModel->filterField( |
| 143 | - function (Field $field) { |
|
| 143 | + function(Field $field) { |
|
| 144 | 144 | return $field->getRenderable('title', false); |
| 145 | 145 | } |
| 146 | 146 | ); |
| 147 | 147 | $this->cardFields = $this->fModel->filterField( |
| 148 | - function (Field $field) { |
|
| 148 | + function(Field $field) { |
|
| 149 | 149 | return $field->getRenderable('card', false); |
| 150 | 150 | } |
| 151 | 151 | ); |
| 152 | 152 | $this->tableFields = $this->fModel->filterField( |
| 153 | - function (Field $field) { |
|
| 153 | + function(Field $field) { |
|
| 154 | 154 | return $field->getRenderable('table', false); |
| 155 | 155 | } |
| 156 | 156 | ); |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | 'Table', |
| 207 | 207 | [ |
| 208 | 208 | Table::ROW_NAMES => array_map( |
| 209 | - function (Field $field) { |
|
| 209 | + function(Field $field) { |
|
| 210 | 210 | return $field->getRenderable(Renderable::LABEL, $field->getName()); |
| 211 | 211 | }, |
| 212 | 212 | $this->tableFields |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | true |
| 225 | 225 | ); |
| 226 | 226 | $titleFields = $this->fModel->filterField( |
| 227 | - function (Field $field) { |
|
| 227 | + function(Field $field) { |
|
| 228 | 228 | return $field->getRenderable('title', false); |
| 229 | 229 | } |
| 230 | 230 | ); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | 'keyAttribute' => $this->keyAttribute, |
| 256 | 256 | 'spinner' => $spinner, |
| 257 | 257 | 'tablelist' => $table->getRenderHTML(), |
| 258 | - 'tableItemFields' => array_keys(array_map(function (Field $f) { |
|
| 258 | + 'tableItemFields' => array_keys(array_map(function(Field $f) { |
|
| 259 | 259 | return $f->getName(); |
| 260 | 260 | }, $this->tableFields)), |
| 261 | 261 | 'typeTitle' => $this->fModel->getRenderable('name', $this->studlyName), |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | $filters[] = [ |
| 320 | 320 | 'name' => $arg->name, |
| 321 | 321 | 'type' => $typename, |
| 322 | - 'required' => (bool)$required, |
|
| 322 | + 'required' => (bool) $required, |
|
| 323 | 323 | 'requiredJSBoolean' => $required ? 'true' : 'false' |
| 324 | 324 | ]; |
| 325 | 325 | } |
@@ -335,13 +335,13 @@ discard block |
||
| 335 | 335 | * card |
| 336 | 336 | */ |
| 337 | 337 | $cardFieldNames = array_map( |
| 338 | - function (Field $field) { |
|
| 338 | + function(Field $field) { |
|
| 339 | 339 | return $field->getName(); |
| 340 | 340 | }, |
| 341 | 341 | $this->cardFields |
| 342 | 342 | ); |
| 343 | 343 | $graphqlQuery = $this->fModel->mapFields( |
| 344 | - function (Field $f) use ($cardFieldNames) { |
|
| 344 | + function(Field $f) use ($cardFieldNames) { |
|
| 345 | 345 | if (in_array($f->getName(), $cardFieldNames)) { |
| 346 | 346 | // TODO: filter subfields in relationships |
| 347 | 347 | return $f->toGraphqlQuery(); |
@@ -357,8 +357,8 @@ discard block |
||
| 357 | 357 | $filtersQuery = ', ' . join( |
| 358 | 358 | ', ', |
| 359 | 359 | array_map( |
| 360 | - function ($item) { |
|
| 361 | - return '$' . $item['name'] . ': ' . $item['type'] . ($item['required'] ? '!' : ''); |
|
| 360 | + function($item) { |
|
| 361 | + return '$' . $item['name'] . ': ' . $item['type'] . ($item['required'] ? '!' : ''); |
|
| 362 | 362 | }, |
| 363 | 363 | $filters |
| 364 | 364 | ) |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | $filtersParams = ', ' . join( |
| 367 | 367 | ', ', |
| 368 | 368 | array_map( |
| 369 | - function ($item) { |
|
| 369 | + function($item) { |
|
| 370 | 370 | return $item['name'] . ': $' . $item['name']; |
| 371 | 371 | }, |
| 372 | 372 | $filters |
@@ -405,14 +405,14 @@ discard block |
||
| 405 | 405 | * table |
| 406 | 406 | */ |
| 407 | 407 | $tableFieldNames = array_map( |
| 408 | - function (Field $field) { |
|
| 408 | + function(Field $field) { |
|
| 409 | 409 | return $field->getName(); |
| 410 | 410 | }, |
| 411 | 411 | $this->tableFields |
| 412 | 412 | ); |
| 413 | 413 | |
| 414 | 414 | $graphqlQuery = $this->fModel->mapFields( |
| 415 | - function (Field $f) use ($tableFieldNames) { |
|
| 415 | + function(Field $f) use ($tableFieldNames) { |
|
| 416 | 416 | if (in_array($f->getName(), $tableFieldNames)) { |
| 417 | 417 | // TODO: filter subfields in relationships |
| 418 | 418 | return $f->toGraphqlQuery(); |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | * item |
| 453 | 453 | */ |
| 454 | 454 | $graphqlQuery = $this->fModel->mapFields( |
| 455 | - function (Field $f) { |
|
| 455 | + function(Field $f) { |
|
| 456 | 456 | return \Modelarium\Frontend\Util::fieldShow($f) ? $f->toGraphqlQuery() : null; |
| 457 | 457 | } |
| 458 | 458 | ); |