@@ -25,15 +25,15 @@ discard block |
||
25 | 25 | * @param \Aimeos\MW\View\Iface $view The view object which generates the admin output |
26 | 26 | * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls |
27 | 27 | */ |
28 | - public function setView( \Aimeos\MW\View\Iface $view ) |
|
28 | + public function setView(\Aimeos\MW\View\Iface $view) |
|
29 | 29 | { |
30 | - $extdir = dirname( dirname( dirname( dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) ) ) ); |
|
31 | - $aimeos = new \Aimeos\Bootstrap( array( $extdir ) ); |
|
30 | + $extdir = dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__DIR__)))))))); |
|
31 | + $aimeos = new \Aimeos\Bootstrap(array($extdir)); |
|
32 | 32 | |
33 | 33 | $view->pageSites = $this->getSites(); |
34 | - $view->pageLanguages = $aimeos->getI18nList( 'admin' ); |
|
34 | + $view->pageLanguages = $aimeos->getI18nList('admin'); |
|
35 | 35 | |
36 | - $this->getClient()->setView( $view ); |
|
36 | + $this->getClient()->setView($view); |
|
37 | 37 | return $this; |
38 | 38 | } |
39 | 39 | |
@@ -46,12 +46,12 @@ discard block |
||
46 | 46 | protected function getSites() |
47 | 47 | { |
48 | 48 | $list = array(); |
49 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'locale/site' ); |
|
49 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'locale/site'); |
|
50 | 50 | |
51 | 51 | $search = $manager->createSearch(); |
52 | - $search->setSortations( array( $search->sort( '+', 'locale.site.label' ) ) ); |
|
52 | + $search->setSortations(array($search->sort('+', 'locale.site.label'))); |
|
53 | 53 | |
54 | - foreach( $manager->searchItems( $search ) as $item ) { |
|
54 | + foreach ($manager->searchItems($search) as $item) { |
|
55 | 55 | $list[$item->getCode()] = $item->getLabel(); |
56 | 56 | } |
57 | 57 |
@@ -8,30 +8,30 @@ discard block |
||
8 | 8 | $enc = $this->encoder(); |
9 | 9 | |
10 | 10 | $target = $this->request()->getTarget(); |
11 | -$cntl = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
12 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
13 | -$config = $this->config( 'admin/jqadm/url/search/config', array() ); |
|
11 | +$cntl = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
12 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
13 | +$config = $this->config('admin/jqadm/url/search/config', array()); |
|
14 | 14 | |
15 | -$jsonTarget = $this->config( 'admin/jsonadm/url/options/target' ); |
|
16 | -$jsonCntl = $this->config( 'admin/jsonadm/url/options/controller', 'Jsonadm' ); |
|
17 | -$jsonAction = $this->config( 'admin/jsonadm/url/options/action', 'options' ); |
|
18 | -$jsonConfig = $this->config( 'admin/jsonadm/url/options/config', array() ); |
|
15 | +$jsonTarget = $this->config('admin/jsonadm/url/options/target'); |
|
16 | +$jsonCntl = $this->config('admin/jsonadm/url/options/controller', 'Jsonadm'); |
|
17 | +$jsonAction = $this->config('admin/jsonadm/url/options/action', 'options'); |
|
18 | +$jsonConfig = $this->config('admin/jsonadm/url/options/config', array()); |
|
19 | 19 | |
20 | -$extTarget = $this->config( 'admin/extjs/url/target' ); |
|
21 | -$extCntl = $this->config( 'admin/extjs/url/controller', 'Extadm' ); |
|
22 | -$extAction = $this->config( 'admin/extjs/url/action', 'index' ); |
|
23 | -$extConfig = $this->config( 'admin/extjs/url/config', array() ); |
|
20 | +$extTarget = $this->config('admin/extjs/url/target'); |
|
21 | +$extCntl = $this->config('admin/extjs/url/controller', 'Extadm'); |
|
22 | +$extAction = $this->config('admin/extjs/url/action', 'index'); |
|
23 | +$extConfig = $this->config('admin/extjs/url/config', array()); |
|
24 | 24 | |
25 | -$sites = $this->get( 'pageSites', array() ); |
|
26 | -$site = $this->param( 'site' ); |
|
25 | +$sites = $this->get('pageSites', array()); |
|
26 | +$site = $this->param('site'); |
|
27 | 27 | |
28 | -$extParams = array( 'site' => $site, 'lang' => $this->param( 'lang' ) ); |
|
28 | +$extParams = array('site' => $site, 'lang' => $this->param('lang')); |
|
29 | 29 | |
30 | -$params = $this->get( 'pageParams', array() ); |
|
31 | -$params['id'] = $this->param( 'id', '' ); |
|
30 | +$params = $this->get('pageParams', array()); |
|
31 | +$params['id'] = $this->param('id', ''); |
|
32 | 32 | |
33 | 33 | ?> |
34 | -<div class="aimeos" data-url="<?php echo $enc->attr( $this->url( $jsonTarget, $jsonCntl, $jsonAction, array( 'site' => $site, 'resource' => '', 'id' => '' ), array(), $jsonConfig ) ); ?>"> |
|
34 | +<div class="aimeos" data-url="<?php echo $enc->attr($this->url($jsonTarget, $jsonCntl, $jsonAction, array('site' => $site, 'resource' => '', 'id' => ''), array(), $jsonConfig)); ?>"> |
|
35 | 35 | |
36 | 36 | <nav class="navbar navbar-full"> |
37 | 37 | <a class="navbar-brand" href="https://aimeos.org/update/?type={type}&version={version}"> |
@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | |
43 | 43 | <div class="collapse navbar-toggleable-xs" id="collapse-navbar"> |
44 | 44 | <ul class="nav navbar-nav"> |
45 | -<?php if( $this->access( 'admin' ) ) : ?> |
|
45 | +<?php if ($this->access('admin')) : ?> |
|
46 | 46 | <li class="nav-item mode active"> |
47 | - <a class="nav-link" href="<?php echo $enc->attr( $this->url( $extTarget, $extCntl, $extAction, $extParams, array(), $extConfig ) ); ?>"> |
|
48 | - <?php echo $enc->html( $this->translate( 'admin', 'Expert mode' ) ); ?> |
|
47 | + <a class="nav-link" href="<?php echo $enc->attr($this->url($extTarget, $extCntl, $extAction, $extParams, array(), $extConfig)); ?>"> |
|
48 | + <?php echo $enc->html($this->translate('admin', 'Expert mode')); ?> |
|
49 | 49 | </a> |
50 | 50 | </li> |
51 | 51 | <?php endif; ?> |
@@ -53,30 +53,30 @@ discard block |
||
53 | 53 | |
54 | 54 | <div class="btn-group"> |
55 | 55 | <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
56 | - <?php echo $enc->attr( $this->param( 'lang', $this->translate( 'admin', 'Language' ) ) ); ?> |
|
56 | + <?php echo $enc->attr($this->param('lang', $this->translate('admin', 'Language'))); ?> |
|
57 | 57 | </button> |
58 | 58 | <div class="dropdown-menu"> |
59 | -<?php foreach( $this->get( 'pageLanguages', array() ) as $langid ) : ?> |
|
59 | +<?php foreach ($this->get('pageLanguages', array()) as $langid) : ?> |
|
60 | 60 | <a class="dropdown-item" |
61 | - href="<?php echo $enc->attr( $this->url( $target, $cntl, $action, array( 'lang' => $langid ) + $params, array(), $config ) ); ?>"> |
|
62 | - <?php echo $enc->html( $langid ); ?> |
|
61 | + href="<?php echo $enc->attr($this->url($target, $cntl, $action, array('lang' => $langid) + $params, array(), $config)); ?>"> |
|
62 | + <?php echo $enc->html($langid); ?> |
|
63 | 63 | </a> |
64 | 64 | <?php endforeach; ?> |
65 | 65 | </div> |
66 | 66 | </div> |
67 | 67 | |
68 | 68 | </li> |
69 | -<?php if( $this->access( 'admin' ) ) : ?> |
|
69 | +<?php if ($this->access('admin')) : ?> |
|
70 | 70 | <li class="nav-item site"> |
71 | 71 | <div class="btn-group"> |
72 | 72 | <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
73 | - <?php echo $enc->attr( $this->value( $sites, $site, $this->translate( 'admin', 'Site' ) ) ); ?> |
|
73 | + <?php echo $enc->attr($this->value($sites, $site, $this->translate('admin', 'Site'))); ?> |
|
74 | 74 | </button> |
75 | 75 | <div class="dropdown-menu"> |
76 | -<?php foreach( $sites as $code => $label ) : ?> |
|
76 | +<?php foreach ($sites as $code => $label) : ?> |
|
77 | 77 | <a class="dropdown-item" |
78 | - href="<?php echo $enc->attr( $this->url( $target, $cntl, $action, array( 'site' => $code ) + $params, array(), $config ) ); ?>"> |
|
79 | - <?php echo $enc->html( $label ); ?> |
|
78 | + href="<?php echo $enc->attr($this->url($target, $cntl, $action, array('site' => $code) + $params, array(), $config)); ?>"> |
|
79 | + <?php echo $enc->html($label); ?> |
|
80 | 80 | </a> |
81 | 81 | <?php endforeach; ?> |
82 | 82 | </div> |
@@ -90,12 +90,12 @@ discard block |
||
90 | 90 | |
91 | 91 | <div class="container"> |
92 | 92 | |
93 | -<?php echo $this->partial( $this->config( 'admin/jqadm/partial/error', 'common/partials/error-default.php' ), array( 'errors' => $this->get( 'errors', array() ) ) ); ?> |
|
93 | +<?php echo $this->partial($this->config('admin/jqadm/partial/error', 'common/partials/error-default.php'), array('errors' => $this->get('errors', array()))); ?> |
|
94 | 94 | |
95 | -<?php echo $this->block()->get( 'jqadm_content' ); ?> |
|
95 | +<?php echo $this->block()->get('jqadm_content'); ?> |
|
96 | 96 | |
97 | 97 | </div> |
98 | 98 | |
99 | -<?php echo $this->partial( $this->config( 'admin/jqadm/partial/confirm', 'common/partials/confirm-default.php' ) ); ?> |
|
99 | +<?php echo $this->partial($this->config('admin/jqadm/partial/confirm', 'common/partials/confirm-default.php')); ?> |
|
100 | 100 | |
101 | 101 | </div> |
102 | 102 | \ No newline at end of file |