@@ -17,103 +17,103 @@ discard block |
||
17 | 17 | protected function setUp() |
18 | 18 | { |
19 | 19 | $this->context = \TestHelperJqadm::getContext(); |
20 | - $this->context->setView( \TestHelperJqadm::getView() ); |
|
20 | + $this->context->setView(\TestHelperJqadm::getView()); |
|
21 | 21 | |
22 | 22 | $config = $this->context->getConfig(); |
23 | - $config->set( 'admin/jqadm/common/decorators/default', array() ); |
|
24 | - $config->set( 'admin/jqadm/product/decorators/global', array() ); |
|
25 | - $config->set( 'admin/jqadm/product/decorators/local', array() ); |
|
23 | + $config->set('admin/jqadm/common/decorators/default', array()); |
|
24 | + $config->set('admin/jqadm/product/decorators/global', array()); |
|
25 | + $config->set('admin/jqadm/product/decorators/local', array()); |
|
26 | 26 | |
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | 30 | public function testInjectClient() |
31 | 31 | { |
32 | - $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
33 | - \Aimeos\Admin\JQAdm\Product\Factory::injectClient( '\\Aimeos\\Admin\\JQAdm\\Product\\Standard', $client ); |
|
32 | + $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
33 | + \Aimeos\Admin\JQAdm\Product\Factory::injectClient('\\Aimeos\\Admin\\JQAdm\\Product\\Standard', $client); |
|
34 | 34 | |
35 | - $iClient = \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
35 | + $iClient = \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
36 | 36 | |
37 | - $this->assertSame( $client, $iClient ); |
|
37 | + $this->assertSame($client, $iClient); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
41 | 41 | public function testInjectClientReset() |
42 | 42 | { |
43 | - $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
44 | - \Aimeos\Admin\JQAdm\Product\Factory::injectClient( '\\Aimeos\\Admin\\JQAdm\\Product\\Standard', $client ); |
|
45 | - \Aimeos\Admin\JQAdm\Product\Factory::injectClient( '\\Aimeos\\Admin\\JQAdm\\Product\\Standard', null ); |
|
43 | + $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
44 | + \Aimeos\Admin\JQAdm\Product\Factory::injectClient('\\Aimeos\\Admin\\JQAdm\\Product\\Standard', $client); |
|
45 | + \Aimeos\Admin\JQAdm\Product\Factory::injectClient('\\Aimeos\\Admin\\JQAdm\\Product\\Standard', null); |
|
46 | 46 | |
47 | - $new = \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
47 | + $new = \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
48 | 48 | |
49 | - $this->assertNotSame( $client, $new ); |
|
49 | + $this->assertNotSame($client, $new); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | |
53 | 53 | public function testAddDecorators() |
54 | 54 | { |
55 | - $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
55 | + $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
56 | 56 | |
57 | - $result = \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addDecoratorsPublic( $this->context, $client, |
|
58 | - array(), array( 'Cache' ), '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\' ); |
|
57 | + $result = \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addDecoratorsPublic($this->context, $client, |
|
58 | + array(), array('Cache'), '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\'); |
|
59 | 59 | |
60 | - $this->assertInstanceOf( '\Aimeos\Admin\JQAdm\Iface', $result ); |
|
60 | + $this->assertInstanceOf('\Aimeos\Admin\JQAdm\Iface', $result); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | |
64 | 64 | public function testAddDecoratorsInvalidName() |
65 | 65 | { |
66 | - $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
66 | + $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
67 | 67 | |
68 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
69 | - \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addDecoratorsPublic( $this->context, $client, array(), |
|
70 | - array( '$' ), 'Test' ); |
|
68 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
69 | + \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addDecoratorsPublic($this->context, $client, array(), |
|
70 | + array('$'), 'Test'); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | |
74 | 74 | public function testAddDecoratorsInvalidClass() |
75 | 75 | { |
76 | - $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
76 | + $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
77 | 77 | |
78 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
79 | - \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addDecoratorsPublic( $this->context, $client, array(), |
|
80 | - array( 'Test' ), 'TestDecorator' ); |
|
78 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
79 | + \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addDecoratorsPublic($this->context, $client, array(), |
|
80 | + array('Test'), 'TestDecorator'); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
84 | 84 | public function testAddDecoratorsInvalidInterface() |
85 | 85 | { |
86 | - $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
86 | + $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
87 | 87 | |
88 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
89 | - \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addDecoratorsPublic( $this->context, $client, array(), |
|
90 | - array( 'Test' ), '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\' ); |
|
88 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
89 | + \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addDecoratorsPublic($this->context, $client, array(), |
|
90 | + array('Test'), '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\'); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | |
94 | 94 | public function testAddClientDecoratorsExcludes() |
95 | 95 | { |
96 | - $this->context->getConfig()->set( 'admin/jqadm/decorators/excludes', array( 'TestDecorator' ) ); |
|
97 | - $this->context->getConfig()->set( 'admin/jqadm/common/decorators/default', array( 'TestDecorator' ) ); |
|
96 | + $this->context->getConfig()->set('admin/jqadm/decorators/excludes', array('TestDecorator')); |
|
97 | + $this->context->getConfig()->set('admin/jqadm/common/decorators/default', array('TestDecorator')); |
|
98 | 98 | |
99 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
100 | - \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
99 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
100 | + \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | |
104 | 104 | public function testAddClientDecoratorsEmptyPath() |
105 | 105 | { |
106 | - $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient( $this->context, array(), 'Standard' ); |
|
106 | + $client = \Aimeos\Admin\JQAdm\Product\Factory::createClient($this->context, array(), 'Standard'); |
|
107 | 107 | |
108 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
109 | - \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addClientDecoratorsPublic( $this->context, $client, array(), '' ); |
|
108 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
109 | + \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::addClientDecoratorsPublic($this->context, $client, array(), ''); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | |
113 | 113 | public function testCreateClientBase() |
114 | 114 | { |
115 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
116 | - \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::createClientBasePublic( $this->context, 'Test', 'Test', array() ); |
|
115 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
116 | + \Aimeos\Admin\JQAdm\Common\Factory\TestAbstract::createClientBasePublic($this->context, 'Test', 'Test', array()); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
@@ -121,22 +121,22 @@ discard block |
||
121 | 121 | class TestAbstract |
122 | 122 | extends \Aimeos\Admin\JQAdm\Common\Factory\Base |
123 | 123 | { |
124 | - public static function addDecoratorsPublic( \Aimeos\MShop\Context\Item\Iface $context, |
|
125 | - \Aimeos\Admin\JQAdm\Iface $client, $templatePaths, array $decorators, $classprefix ) |
|
124 | + public static function addDecoratorsPublic(\Aimeos\MShop\Context\Item\Iface $context, |
|
125 | + \Aimeos\Admin\JQAdm\Iface $client, $templatePaths, array $decorators, $classprefix) |
|
126 | 126 | { |
127 | - return self::addDecorators( $context, $client, $templatePaths, $decorators, $classprefix ); |
|
127 | + return self::addDecorators($context, $client, $templatePaths, $decorators, $classprefix); |
|
128 | 128 | } |
129 | 129 | |
130 | - public static function addClientDecoratorsPublic( \Aimeos\MShop\Context\Item\Iface $context, |
|
131 | - \Aimeos\Admin\JQAdm\Iface $client, $templatePaths, $path ) |
|
130 | + public static function addClientDecoratorsPublic(\Aimeos\MShop\Context\Item\Iface $context, |
|
131 | + \Aimeos\Admin\JQAdm\Iface $client, $templatePaths, $path) |
|
132 | 132 | { |
133 | - return self::addClientDecorators( $context, $client, $templatePaths, $path ); |
|
133 | + return self::addClientDecorators($context, $client, $templatePaths, $path); |
|
134 | 134 | } |
135 | 135 | |
136 | - public static function createClientBasePublic( \Aimeos\MShop\Context\Item\Iface $context, |
|
137 | - $classname, $interface, $templatePath ) |
|
136 | + public static function createClientBasePublic(\Aimeos\MShop\Context\Item\Iface $context, |
|
137 | + $classname, $interface, $templatePath) |
|
138 | 138 | { |
139 | - return self::createClientBase( $context, $classname, $interface, $templatePath ); |
|
139 | + return self::createClientBase($context, $classname, $interface, $templatePath); |
|
140 | 140 | } |
141 | 141 | } |
142 | 142 |
@@ -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 | ), |
@@ -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; |
@@ -28,14 +28,14 @@ discard block |
||
28 | 28 | { |
29 | 29 | $result = $this->getClient()->delete(); |
30 | 30 | |
31 | - $ids = (array) $this->getView()->param( 'id' ); |
|
32 | - $tags = array( 'product' ); |
|
31 | + $ids = (array) $this->getView()->param('id'); |
|
32 | + $tags = array('product'); |
|
33 | 33 | |
34 | - foreach( $ids as $id ) { |
|
34 | + foreach ($ids as $id) { |
|
35 | 35 | $tags[] = 'product-' . $id; |
36 | 36 | } |
37 | 37 | |
38 | - $this->getContext()->getCache()->deleteByTags( $tags ); |
|
38 | + $this->getContext()->getCache()->deleteByTags($tags); |
|
39 | 39 | |
40 | 40 | return $result; |
41 | 41 | } |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | $result = $this->getClient()->save(); |
52 | 52 | $item = $this->getView()->item; |
53 | 53 | |
54 | - if( $item->getId() !== null ) |
|
54 | + if ($item->getId() !== null) |
|
55 | 55 | { |
56 | 56 | $idtag = 'product-' . $item->getId(); |
57 | - $this->getContext()->getCache()->deleteByTags( array( 'product', $idtag ) ); |
|
57 | + $this->getContext()->getCache()->deleteByTags(array('product', $idtag)); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | return $result; |