@@ -8,32 +8,32 @@ discard block |
||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | |
| 11 | -$target = $this->config( 'admin/jsonadm/url/target' ); |
|
| 12 | -$cntl = $this->config( 'admin/jsonadm/url/controller', 'jsonadm' ); |
|
| 13 | -$action = $this->config( 'admin/jsonadm/url/action', 'get' ); |
|
| 14 | -$config = $this->config( 'admin/jsonadm/url/config', [] ); |
|
| 11 | +$target = $this->config('admin/jsonadm/url/target'); |
|
| 12 | +$cntl = $this->config('admin/jsonadm/url/controller', 'jsonadm'); |
|
| 13 | +$action = $this->config('admin/jsonadm/url/action', 'get'); |
|
| 14 | +$config = $this->config('admin/jsonadm/url/config', []); |
|
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | $resources = $attributes = []; |
| 18 | -$site = $this->param( 'site', 'default' ); |
|
| 18 | +$site = $this->param('site', 'default'); |
|
| 19 | 19 | |
| 20 | -foreach( $this->get( 'resources', [] ) as $resource ) { |
|
| 21 | - $resources[$resource] = $this->url( $target, $cntl, $action, ['site' => $site, 'resource' => $resource], [], $config ); |
|
| 20 | +foreach ($this->get('resources', []) as $resource) { |
|
| 21 | + $resources[$resource] = $this->url($target, $cntl, $action, ['site' => $site, 'resource' => $resource], [], $config); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | -foreach( $this->get( 'attributes', [] ) as $attr ) { |
|
| 25 | - $attributes[$attr->getCode()] = $attr->toArray( true ); |
|
| 24 | +foreach ($this->get('attributes', []) as $attr) { |
|
| 25 | + $attributes[$attr->getCode()] = $attr->toArray(true); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | ?> |
| 30 | 30 | { |
| 31 | 31 | "meta": { |
| 32 | - "prefix": <?= json_encode( $this->get( 'prefix' ) ); ?>, |
|
| 33 | - "resources": <?= json_encode( $resources ); ?>, |
|
| 34 | - "attributes": <?= json_encode( $attributes ); ?> |
|
| 32 | + "prefix": <?= json_encode($this->get('prefix')); ?>, |
|
| 33 | + "resources": <?= json_encode($resources); ?>, |
|
| 34 | + "attributes": <?= json_encode($attributes); ?> |
|
| 35 | 35 | |
| 36 | - <?php if( $this->csrf()->name() != '' ) : ?> |
|
| 36 | + <?php if ($this->csrf()->name() != '') : ?> |
|
| 37 | 37 | , "csrf": { |
| 38 | 38 | "name": "<?= $this->csrf()->name(); ?>", |
| 39 | 39 | "value": "<?= $this->csrf()->value(); ?>" |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | <?php endif; ?> |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - <?php if( isset( $this->errors ) ) : ?> |
|
| 44 | + <?php if (isset($this->errors)) : ?> |
|
| 45 | 45 | |
| 46 | - ,"errors": <?= $this->partial( $this->config( 'admin/jsonadm/partials/template-errors', 'partials/errors-standard.php' ), array( 'errors' => $this->errors ) ); ?> |
|
| 46 | + ,"errors": <?= $this->partial($this->config('admin/jsonadm/partials/template-errors', 'partials/errors-standard.php'), array('errors' => $this->errors)); ?> |
|
| 47 | 47 | |
| 48 | 48 | <?php endif; ?> |
| 49 | 49 | |