@@ -13,51 +13,51 @@ discard block |
||
13 | 13 | public static function bootstrap() |
14 | 14 | { |
15 | 15 | self::getAimeos(); |
16 | - \Aimeos\MShop\Factory::setCache( false ); |
|
16 | + \Aimeos\MShop\Factory::setCache(false); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | |
20 | - public static function getContext( $site = 'unittest' ) |
|
20 | + public static function getContext($site = 'unittest') |
|
21 | 21 | { |
22 | - if( !isset( self::$context[$site] ) ) { |
|
23 | - self::$context[$site] = self::createContext( $site ); |
|
22 | + if (!isset(self::$context[$site])) { |
|
23 | + self::$context[$site] = self::createContext($site); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | return clone self::$context[$site]; |
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | - public static function getView( $site = 'unittest', \Aimeos\MW\Config\Iface $config = null ) |
|
30 | + public static function getView($site = 'unittest', \Aimeos\MW\Config\Iface $config = null) |
|
31 | 31 | { |
32 | - if( $config === null ) { |
|
33 | - $config = self::getContext( $site )->getConfig(); |
|
32 | + if ($config === null) { |
|
33 | + $config = self::getContext($site)->getConfig(); |
|
34 | 34 | } |
35 | 35 | |
36 | - $view = new \Aimeos\MW\View\Standard( self::getTemplatePaths() ); |
|
36 | + $view = new \Aimeos\MW\View\Standard(self::getTemplatePaths()); |
|
37 | 37 | |
38 | - $trans = new \Aimeos\MW\Translation\None( 'de_DE' ); |
|
39 | - $helper = new \Aimeos\MW\View\Helper\Translate\Standard( $view, $trans ); |
|
40 | - $view->addHelper( 'translate', $helper ); |
|
38 | + $trans = new \Aimeos\MW\Translation\None('de_DE'); |
|
39 | + $helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $trans); |
|
40 | + $view->addHelper('translate', $helper); |
|
41 | 41 | |
42 | - $helper = new \Aimeos\MW\View\Helper\Url\Standard( $view, 'http://baseurl' ); |
|
43 | - $view->addHelper( 'url', $helper ); |
|
42 | + $helper = new \Aimeos\MW\View\Helper\Url\Standard($view, 'http://baseurl'); |
|
43 | + $view->addHelper('url', $helper); |
|
44 | 44 | |
45 | - $helper = new \Aimeos\MW\View\Helper\Number\Standard( $view, '.', '' ); |
|
46 | - $view->addHelper( 'number', $helper ); |
|
45 | + $helper = new \Aimeos\MW\View\Helper\Number\Standard($view, '.', ''); |
|
46 | + $view->addHelper('number', $helper); |
|
47 | 47 | |
48 | - $helper = new \Aimeos\MW\View\Helper\Date\Standard( $view, 'Y-m-d' ); |
|
49 | - $view->addHelper( 'date', $helper ); |
|
48 | + $helper = new \Aimeos\MW\View\Helper\Date\Standard($view, 'Y-m-d'); |
|
49 | + $view->addHelper('date', $helper); |
|
50 | 50 | |
51 | - $config = new \Aimeos\MW\Config\Decorator\Protect( $config, array( 'admin', 'client/html', 'controller/jsonadm' ) ); |
|
52 | - $helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $config ); |
|
53 | - $view->addHelper( 'config', $helper ); |
|
51 | + $config = new \Aimeos\MW\Config\Decorator\Protect($config, array('admin', 'client/html', 'controller/jsonadm')); |
|
52 | + $helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config); |
|
53 | + $view->addHelper('config', $helper); |
|
54 | 54 | |
55 | - $helper = new \Aimeos\MW\View\Helper\Csrf\Standard( $view, '_csrf_token', '_csrf_value' ); |
|
56 | - $view->addHelper( 'csrf', $helper ); |
|
55 | + $helper = new \Aimeos\MW\View\Helper\Csrf\Standard($view, '_csrf_token', '_csrf_value'); |
|
56 | + $view->addHelper('csrf', $helper); |
|
57 | 57 | |
58 | - $fcn = function() { return array( 'admin' ); }; |
|
59 | - $helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, $fcn ); |
|
60 | - $view->addHelper( 'access', $helper ); |
|
58 | + $fcn = function() { return array('admin'); }; |
|
59 | + $helper = new \Aimeos\MW\View\Helper\Access\Standard($view, $fcn); |
|
60 | + $view->addHelper('access', $helper); |
|
61 | 61 | |
62 | 62 | return $view; |
63 | 63 | } |
@@ -65,19 +65,19 @@ discard block |
||
65 | 65 | |
66 | 66 | public static function getTemplatePaths() |
67 | 67 | { |
68 | - return self::getAimeos()->getCustomPaths( 'admin/jqadm/templates' ); |
|
68 | + return self::getAimeos()->getCustomPaths('admin/jqadm/templates'); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
72 | 72 | private static function getAimeos() |
73 | 73 | { |
74 | - if( !isset( self::$aimeos ) ) |
|
74 | + if (!isset(self::$aimeos)) |
|
75 | 75 | { |
76 | 76 | require_once 'Bootstrap.php'; |
77 | - spl_autoload_register( 'Aimeos\\Bootstrap::autoload' ); |
|
77 | + spl_autoload_register('Aimeos\\Bootstrap::autoload'); |
|
78 | 78 | |
79 | - $extdir = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ); |
|
80 | - self::$aimeos = new \Aimeos\Bootstrap( array( $extdir ), false ); |
|
79 | + $extdir = dirname(dirname(dirname(dirname(__FILE__)))); |
|
80 | + self::$aimeos = new \Aimeos\Bootstrap(array($extdir), false); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | return self::$aimeos; |
@@ -87,53 +87,53 @@ discard block |
||
87 | 87 | /** |
88 | 88 | * @param string $site |
89 | 89 | */ |
90 | - private static function createContext( $site ) |
|
90 | + private static function createContext($site) |
|
91 | 91 | { |
92 | 92 | $ctx = new \Aimeos\MShop\Context\Item\Standard(); |
93 | 93 | $aimeos = self::getAimeos(); |
94 | 94 | |
95 | 95 | |
96 | - $paths = $aimeos->getConfigPaths( 'mysql' ); |
|
96 | + $paths = $aimeos->getConfigPaths('mysql'); |
|
97 | 97 | $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config'; |
98 | 98 | $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser'; |
99 | - $local = array( 'resource' => array( 'fs' => array( 'adapter' => 'Standard', 'basedir' => __DIR__ . '/tmp' ) ) ); |
|
99 | + $local = array('resource' => array('fs' => array('adapter' => 'Standard', 'basedir' => __DIR__ . '/tmp'))); |
|
100 | 100 | |
101 | - $conf = new \Aimeos\MW\Config\PHPArray( $local, $paths ); |
|
102 | - $conf = new \Aimeos\MW\Config\Decorator\Memory( $conf ); |
|
103 | - $conf = new \Aimeos\MW\Config\Decorator\Documentor( $conf, $file ); |
|
104 | - $ctx->setConfig( $conf ); |
|
101 | + $conf = new \Aimeos\MW\Config\PHPArray($local, $paths); |
|
102 | + $conf = new \Aimeos\MW\Config\Decorator\Memory($conf); |
|
103 | + $conf = new \Aimeos\MW\Config\Decorator\Documentor($conf, $file); |
|
104 | + $ctx->setConfig($conf); |
|
105 | 105 | |
106 | 106 | |
107 | - $dbm = new \Aimeos\MW\DB\Manager\PDO( $conf ); |
|
108 | - $ctx->setDatabaseManager( $dbm ); |
|
107 | + $dbm = new \Aimeos\MW\DB\Manager\PDO($conf); |
|
108 | + $ctx->setDatabaseManager($dbm); |
|
109 | 109 | |
110 | 110 | |
111 | - $fs = new \Aimeos\MW\Filesystem\Manager\Standard( $conf ); |
|
112 | - $ctx->setFilesystemManager( $fs ); |
|
111 | + $fs = new \Aimeos\MW\Filesystem\Manager\Standard($conf); |
|
112 | + $ctx->setFilesystemManager($fs); |
|
113 | 113 | |
114 | 114 | |
115 | - $logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG ); |
|
116 | - $ctx->setLogger( $logger ); |
|
115 | + $logger = new \Aimeos\MW\Logger\File($site . '.log', \Aimeos\MW\Logger\Base::DEBUG); |
|
116 | + $ctx->setLogger($logger); |
|
117 | 117 | |
118 | 118 | |
119 | 119 | $cache = new \Aimeos\MW\Cache\None(); |
120 | - $ctx->setCache( $cache ); |
|
120 | + $ctx->setCache($cache); |
|
121 | 121 | |
122 | 122 | |
123 | - $i18n = new \Aimeos\MW\Translation\None( 'de' ); |
|
124 | - $ctx->setI18n( array( 'de' => $i18n ) ); |
|
123 | + $i18n = new \Aimeos\MW\Translation\None('de'); |
|
124 | + $ctx->setI18n(array('de' => $i18n)); |
|
125 | 125 | |
126 | 126 | |
127 | 127 | $session = new \Aimeos\MW\Session\None(); |
128 | - $ctx->setSession( $session ); |
|
128 | + $ctx->setSession($session); |
|
129 | 129 | |
130 | 130 | |
131 | - $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $ctx ); |
|
132 | - $locale = $localeManager->bootstrap( $site, '', '', false ); |
|
133 | - $ctx->setLocale( $locale ); |
|
131 | + $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx); |
|
132 | + $locale = $localeManager->bootstrap($site, '', '', false); |
|
133 | + $ctx->setLocale($locale); |
|
134 | 134 | |
135 | 135 | |
136 | - $ctx->setEditor( 'core:admin/jqadm' ); |
|
136 | + $ctx->setEditor('core:admin/jqadm'); |
|
137 | 137 | |
138 | 138 | return $ctx; |
139 | 139 | } |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | $this->context = \TestHelperJqadm::getContext(); |
21 | 21 | $templatePaths = \TestHelperJqadm::getTemplatePaths(); |
22 | 22 | |
23 | - $client = new \Aimeos\Admin\JQAdm\Product\Standard( $this->context, $templatePaths ); |
|
24 | - $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Languages( $client, $this->context, $templatePaths ); |
|
23 | + $client = new \Aimeos\Admin\JQAdm\Product\Standard($this->context, $templatePaths); |
|
24 | + $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Languages($client, $this->context, $templatePaths); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | 28 | protected function tearDown() |
29 | 29 | { |
30 | - unset( $this->object, $this->context ); |
|
30 | + unset($this->object, $this->context); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | { |
36 | 36 | $view = \TestHelperJqadm::getView(); |
37 | 37 | |
38 | - $this->object->setView( $view ); |
|
38 | + $this->object->setView($view); |
|
39 | 39 | |
40 | - $this->assertInternalType( 'array', $view->languagesList ); |
|
40 | + $this->assertInternalType('array', $view->languagesList); |
|
41 | 41 | } |
42 | 42 | } |
@@ -17,83 +17,83 @@ |
||
17 | 17 | |
18 | 18 | protected function setUp() |
19 | 19 | { |
20 | - $this->mock = $this->getMockBuilder( 'Aimeos\Admin\JQAdm\Product\Standard' ) |
|
21 | - ->setMethods( array( 'copy', 'create', 'delete', 'get', 'save', 'search', 'getSubClient' ) ) |
|
20 | + $this->mock = $this->getMockBuilder('Aimeos\Admin\JQAdm\Product\Standard') |
|
21 | + ->setMethods(array('copy', 'create', 'delete', 'get', 'save', 'search', 'getSubClient')) |
|
22 | 22 | ->disableOriginalConstructor() |
23 | 23 | ->getMock(); |
24 | 24 | |
25 | 25 | $templatePaths = \TestHelperJqadm::getTemplatePaths(); |
26 | 26 | $context = \TestHelperJqadm::getContext(); |
27 | 27 | |
28 | - $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Sites( $this->mock, $context, $templatePaths ); |
|
28 | + $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Sites($this->mock, $context, $templatePaths); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
32 | 32 | protected function tearDown() |
33 | 33 | { |
34 | - unset( $this->object, $this->mock ); |
|
34 | + unset($this->object, $this->mock); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
38 | 38 | public function testCallInvalid() |
39 | 39 | { |
40 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
40 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
41 | 41 | $this->object->invalidMethod(); |
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function testCopy() |
46 | 46 | { |
47 | - $this->mock->expects( $this->once() )->method( 'copy' )->will( $this->returnValue( 'test' ) ); |
|
47 | + $this->mock->expects($this->once())->method('copy')->will($this->returnValue('test')); |
|
48 | 48 | |
49 | - $this->assertEquals( 'test', $this->object->copy() ); |
|
49 | + $this->assertEquals('test', $this->object->copy()); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | |
53 | 53 | public function testCreate() |
54 | 54 | { |
55 | - $this->mock->expects( $this->once() )->method( 'create' )->will( $this->returnValue( 'test' ) ); |
|
55 | + $this->mock->expects($this->once())->method('create')->will($this->returnValue('test')); |
|
56 | 56 | |
57 | - $this->assertEquals( 'test', $this->object->create() ); |
|
57 | + $this->assertEquals('test', $this->object->create()); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | |
61 | 61 | public function testDelete() |
62 | 62 | { |
63 | - $this->mock->expects( $this->once() )->method( 'delete' )->will( $this->returnValue( 'test' ) ); |
|
63 | + $this->mock->expects($this->once())->method('delete')->will($this->returnValue('test')); |
|
64 | 64 | |
65 | - $this->assertEquals( 'test', $this->object->delete() ); |
|
65 | + $this->assertEquals('test', $this->object->delete()); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | |
69 | 69 | public function testGet() |
70 | 70 | { |
71 | - $this->mock->expects( $this->once() )->method( 'get' )->will( $this->returnValue( 'test' ) ); |
|
71 | + $this->mock->expects($this->once())->method('get')->will($this->returnValue('test')); |
|
72 | 72 | |
73 | - $this->assertEquals( 'test', $this->object->get() ); |
|
73 | + $this->assertEquals('test', $this->object->get()); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | |
77 | 77 | public function testSave() |
78 | 78 | { |
79 | - $this->mock->expects( $this->once() )->method( 'save' )->will( $this->returnValue( 'test' ) ); |
|
79 | + $this->mock->expects($this->once())->method('save')->will($this->returnValue('test')); |
|
80 | 80 | |
81 | - $this->assertEquals( 'test', $this->object->save() ); |
|
81 | + $this->assertEquals('test', $this->object->save()); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | |
85 | 85 | public function testSearch() |
86 | 86 | { |
87 | - $this->mock->expects( $this->once() )->method( 'search' )->will( $this->returnValue( 'test' ) ); |
|
87 | + $this->mock->expects($this->once())->method('search')->will($this->returnValue('test')); |
|
88 | 88 | |
89 | - $this->assertEquals( 'test', $this->object->search() ); |
|
89 | + $this->assertEquals('test', $this->object->search()); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | |
93 | 93 | public function testGetSubClient() |
94 | 94 | { |
95 | - $this->mock->expects( $this->once() )->method( 'getSubClient' )->will( $this->returnValue( 'test' ) ); |
|
95 | + $this->mock->expects($this->once())->method('getSubClient')->will($this->returnValue('test')); |
|
96 | 96 | |
97 | - $this->assertEquals( 'test', $this->object->getSubClient( 'invalid' ) ); |
|
97 | + $this->assertEquals('test', $this->object->getSubClient('invalid')); |
|
98 | 98 | } |
99 | 99 | } |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | $this->context = \TestHelperJqadm::getContext(); |
21 | 21 | $templatePaths = \TestHelperJqadm::getTemplatePaths(); |
22 | 22 | |
23 | - $client = new \Aimeos\Admin\JQAdm\Product\Standard( $this->context, $templatePaths ); |
|
24 | - $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Sites( $client, $this->context, $templatePaths ); |
|
23 | + $client = new \Aimeos\Admin\JQAdm\Product\Standard($this->context, $templatePaths); |
|
24 | + $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Sites($client, $this->context, $templatePaths); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | 28 | protected function tearDown() |
29 | 29 | { |
30 | - unset( $this->object, $this->context ); |
|
30 | + unset($this->object, $this->context); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | { |
36 | 36 | $view = \TestHelperJqadm::getView(); |
37 | 37 | |
38 | - $this->object->setView( $view ); |
|
38 | + $this->object->setView($view); |
|
39 | 39 | |
40 | - $this->assertInternalType( 'array', $view->sitesList ); |
|
40 | + $this->assertInternalType('array', $view->sitesList); |
|
41 | 41 | } |
42 | 42 | } |
@@ -4,17 +4,17 @@ |
||
4 | 4 | 'jqadm' => array( |
5 | 5 | 'common' => array( |
6 | 6 | 'decorators' => array( |
7 | - 'default' => array( 'Languages', 'Sites' ), |
|
7 | + 'default' => array('Languages', 'Sites'), |
|
8 | 8 | ), |
9 | 9 | ), |
10 | 10 | 'product' => array( |
11 | 11 | 'decorators' => array( |
12 | - 'global' => array( 'Index', 'Cache' ), |
|
12 | + 'global' => array('Index', 'Cache'), |
|
13 | 13 | ), |
14 | 14 | ), |
15 | 15 | 'product/category' => array( |
16 | 16 | 'decorators' => array( |
17 | - 'local' => array( 'Cache' ), |
|
17 | + 'local' => array('Cache'), |
|
18 | 18 | ), |
19 | 19 | ), |
20 | 20 | ), |
@@ -8,28 +8,28 @@ 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 | -$site = $this->param( 'site' ); |
|
26 | -$extParams = array( 'site' => $site, 'lang' => $this->param( 'lang' ) ); |
|
25 | +$site = $this->param('site'); |
|
26 | +$extParams = array('site' => $site, 'lang' => $this->param('lang')); |
|
27 | 27 | |
28 | -$params = $this->get( 'pageParams', array() ); |
|
29 | -$params['id'] = $this->param( 'id', '' ); |
|
28 | +$params = $this->get('pageParams', array()); |
|
29 | +$params['id'] = $this->param('id', ''); |
|
30 | 30 | |
31 | 31 | ?> |
32 | -<div class="aimeos" data-url="<?php echo $enc->attr( $this->url( $jsonTarget, $jsonCntl, $jsonAction, array( 'site' => $site, 'resource' => '', 'id' => '' ), array(), $jsonConfig ) ); ?>"> |
|
32 | +<div class="aimeos" data-url="<?php echo $enc->attr($this->url($jsonTarget, $jsonCntl, $jsonAction, array('site' => $site, 'resource' => '', 'id' => ''), array(), $jsonConfig)); ?>"> |
|
33 | 33 | |
34 | 34 | <nav class="navbar navbar-full"> |
35 | 35 | <a class="navbar-brand" href="https://aimeos.org/update/?type={type}&version={version}"> |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | |
41 | 41 | <div class="collapse navbar-toggleable-xs" id="collapse-navbar"> |
42 | 42 | <ul class="nav navbar-nav"> |
43 | -<?php if( $this->access( 'admin' ) ) : ?> |
|
43 | +<?php if ($this->access('admin')) : ?> |
|
44 | 44 | <li class="nav-item mode active"> |
45 | - <a class="nav-link" href="<?php echo $enc->attr( $this->url( $extTarget, $extCntl, $extAction, $extParams, array(), $extConfig ) ); ?>"> |
|
46 | - <?php echo $enc->html( $this->translate( 'admin', 'Expert mode' ) ); ?> |
|
45 | + <a class="nav-link" href="<?php echo $enc->attr($this->url($extTarget, $extCntl, $extAction, $extParams, array(), $extConfig)); ?>"> |
|
46 | + <?php echo $enc->html($this->translate('admin', 'Expert mode')); ?> |
|
47 | 47 | </a> |
48 | 48 | </li> |
49 | 49 | <?php endif; ?> |
@@ -51,31 +51,31 @@ discard block |
||
51 | 51 | |
52 | 52 | <div class="btn-group"> |
53 | 53 | <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
54 | - <?php echo $enc->attr( $this->param( 'lang', $this->translate( 'admin', 'Language' ) ) ); ?> |
|
54 | + <?php echo $enc->attr($this->param('lang', $this->translate('admin', 'Language'))); ?> |
|
55 | 55 | </button> |
56 | 56 | <div class="dropdown-menu"> |
57 | -<?php foreach( $this->get( 'languagesList', array() ) as $langid ) : ?> |
|
57 | +<?php foreach ($this->get('languagesList', array()) as $langid) : ?> |
|
58 | 58 | <a class="dropdown-item" |
59 | - href="<?php echo $enc->attr( $this->url( $target, $cntl, $action, array( 'lang' => $langid ) + $params, array(), $config ) ); ?>"> |
|
60 | - <?php echo $enc->html( $langid ); ?> |
|
59 | + href="<?php echo $enc->attr($this->url($target, $cntl, $action, array('lang' => $langid) + $params, array(), $config)); ?>"> |
|
60 | + <?php echo $enc->html($langid); ?> |
|
61 | 61 | </a> |
62 | 62 | <?php endforeach; ?> |
63 | 63 | </div> |
64 | 64 | </div> |
65 | 65 | |
66 | 66 | </li> |
67 | -<?php if( $this->access( 'admin' ) ) : ?> |
|
68 | -<?php $sites = $this->get( 'sitesList', array() ); ?> |
|
67 | +<?php if ($this->access('admin')) : ?> |
|
68 | +<?php $sites = $this->get('sitesList', array()); ?> |
|
69 | 69 | <li class="nav-item site"> |
70 | 70 | <div class="btn-group"> |
71 | 71 | <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
72 | - <?php echo $enc->attr( $this->value( $sites, $site, $this->translate( 'admin', 'Site' ) ) ); ?> |
|
72 | + <?php echo $enc->attr($this->value($sites, $site, $this->translate('admin', 'Site'))); ?> |
|
73 | 73 | </button> |
74 | 74 | <div class="dropdown-menu"> |
75 | -<?php foreach( $sites as $code => $label ) : ?> |
|
75 | +<?php foreach ($sites as $code => $label) : ?> |
|
76 | 76 | <a class="dropdown-item" |
77 | - href="<?php echo $enc->attr( $this->url( $target, $cntl, $action, array( 'site' => $code ) + $params, array(), $config ) ); ?>"> |
|
78 | - <?php echo $enc->html( $label ); ?> |
|
77 | + href="<?php echo $enc->attr($this->url($target, $cntl, $action, array('site' => $code) + $params, array(), $config)); ?>"> |
|
78 | + <?php echo $enc->html($label); ?> |
|
79 | 79 | </a> |
80 | 80 | <?php endforeach; ?> |
81 | 81 | </div> |
@@ -89,12 +89,12 @@ discard block |
||
89 | 89 | |
90 | 90 | <div class="container"> |
91 | 91 | |
92 | -<?php echo $this->partial( $this->config( 'admin/jqadm/partial/error', 'common/partials/error-default.php' ), array( 'errors' => $this->get( 'errors', array() ) ) ); ?> |
|
92 | +<?php echo $this->partial($this->config('admin/jqadm/partial/error', 'common/partials/error-default.php'), array('errors' => $this->get('errors', array()))); ?> |
|
93 | 93 | |
94 | -<?php echo $this->block()->get( 'jqadm_content' ); ?> |
|
94 | +<?php echo $this->block()->get('jqadm_content'); ?> |
|
95 | 95 | |
96 | 96 | </div> |
97 | 97 | |
98 | -<?php echo $this->partial( $this->config( 'admin/jqadm/partial/confirm', 'common/partials/confirm-default.php' ) ); ?> |
|
98 | +<?php echo $this->partial($this->config('admin/jqadm/partial/confirm', 'common/partials/confirm-default.php')); ?> |
|
99 | 99 | |
100 | 100 | </div> |
101 | 101 | \ No newline at end of file |
@@ -25,14 +25,14 @@ |
||
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 | - $view->languagesList = $aimeos->getI18nList( 'admin' ); |
|
33 | + $view->languagesList = $aimeos->getI18nList('admin'); |
|
34 | 34 | |
35 | - $this->getClient()->setView( $view ); |
|
35 | + $this->getClient()->setView($view); |
|
36 | 36 | return $this; |
37 | 37 | } |
38 | 38 | } |
@@ -25,21 +25,21 @@ |
||
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 | 30 | $list = array(); |
31 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'locale/site' ); |
|
31 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'locale/site'); |
|
32 | 32 | |
33 | 33 | $search = $manager->createSearch(); |
34 | - $search->setSortations( array( $search->sort( '+', 'locale.site.label' ) ) ); |
|
34 | + $search->setSortations(array($search->sort('+', 'locale.site.label'))); |
|
35 | 35 | |
36 | - foreach( $manager->searchItems( $search ) as $item ) { |
|
36 | + foreach ($manager->searchItems($search) as $item) { |
|
37 | 37 | $list[$item->getCode()] = $item->getLabel(); |
38 | 38 | } |
39 | 39 | |
40 | 40 | $view->sitesList = $list; |
41 | 41 | |
42 | - $this->getClient()->setView( $view ); |
|
42 | + $this->getClient()->setView($view); |
|
43 | 43 | return $this; |
44 | 44 | } |
45 | 45 | } |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | { |
29 | 29 | $result = $this->getClient()->delete(); |
30 | 30 | |
31 | - $ids = (array) $this->getView()->param( 'id' ); |
|
32 | - \Aimeos\MShop\Factory::createManager( $this->getContext(), 'index' )->deleteItems( $ids ); |
|
31 | + $ids = (array) $this->getView()->param('id'); |
|
32 | + \Aimeos\MShop\Factory::createManager($this->getContext(), 'index')->deleteItems($ids); |
|
33 | 33 | |
34 | 34 | return $result; |
35 | 35 | } |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | $result = $this->getClient()->save(); |
46 | 46 | $item = $this->getView()->item; |
47 | 47 | |
48 | - if( $item->getId() !== null ) { |
|
49 | - \Aimeos\MShop\Factory::createManager( $this->getContext(), 'index' )->saveItem( $item ); |
|
48 | + if ($item->getId() !== null) { |
|
49 | + \Aimeos\MShop\Factory::createManager($this->getContext(), 'index')->saveItem($item); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | return $result; |