@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @param string $classname Full name of the class for which the object should be returned |
32 | 32 | * @param \Aimeos\Admin\JsonAdm\Iface|null $client JSON API client object |
33 | 33 | */ |
34 | - public static function injectClient( $classname, \Aimeos\Admin\JsonAdm\Iface $client = null ) |
|
34 | + public static function injectClient($classname, \Aimeos\Admin\JsonAdm\Iface $client = null) |
|
35 | 35 | { |
36 | 36 | self::$objects[$classname] = $client; |
37 | 37 | } |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | * @param string $path Name of the client separated by slashes, e.g "product/stock" |
48 | 48 | * @return \Aimeos\Admin\JsonAdm\Common\Iface Client object |
49 | 49 | */ |
50 | - protected static function addClientDecorators( \Aimeos\Admin\JsonAdm\Iface $client, |
|
51 | - \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, array $templatePaths, $path ) |
|
50 | + protected static function addClientDecorators(\Aimeos\Admin\JsonAdm\Iface $client, |
|
51 | + \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, array $templatePaths, $path) |
|
52 | 52 | { |
53 | 53 | $config = $context->getConfig(); |
54 | 54 | |
@@ -74,35 +74,35 @@ discard block |
||
74 | 74 | * @since 2015.12 |
75 | 75 | * @category Developer |
76 | 76 | */ |
77 | - $decorators = $config->get( 'admin/jsonadm/common/decorators/default', array() ); |
|
77 | + $decorators = $config->get('admin/jsonadm/common/decorators/default', array()); |
|
78 | 78 | |
79 | 79 | $classprefix = '\\Aimeos\\Admin\\JsonAdm\\Common\\Decorator\\'; |
80 | - $client = self::addDecorators( $client, $decorators, $classprefix, $context, $view, $templatePaths, $path ); |
|
80 | + $client = self::addDecorators($client, $decorators, $classprefix, $context, $view, $templatePaths, $path); |
|
81 | 81 | |
82 | - if( $path !== null && is_string( $path ) ) |
|
82 | + if ($path !== null && is_string($path)) |
|
83 | 83 | { |
84 | - $dpath = trim( $path, '/' ); |
|
85 | - $dpath = ( $dpath !== '' ? $dpath . '/' : $dpath ); |
|
84 | + $dpath = trim($path, '/'); |
|
85 | + $dpath = ($dpath !== '' ? $dpath . '/' : $dpath); |
|
86 | 86 | |
87 | - $excludes = $config->get( 'admin/jsonadm/' . $dpath . 'decorators/excludes', array() ); |
|
88 | - $localClass = str_replace( ' ', '\\', ucwords( str_replace( '/', ' ', $path ) ) ); |
|
87 | + $excludes = $config->get('admin/jsonadm/' . $dpath . 'decorators/excludes', array()); |
|
88 | + $localClass = str_replace(' ', '\\', ucwords(str_replace('/', ' ', $path))); |
|
89 | 89 | |
90 | - foreach( $decorators as $key => $name ) |
|
90 | + foreach ($decorators as $key => $name) |
|
91 | 91 | { |
92 | - if( in_array( $name, $excludes ) ) { |
|
93 | - unset( $decorators[$key] ); |
|
92 | + if (in_array($name, $excludes)) { |
|
93 | + unset($decorators[$key]); |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
97 | 97 | $classprefix = '\\Aimeos\\Admin\\JsonAdm\\Common\\Decorator\\'; |
98 | - $decorators = $config->get( 'admin/jsonadm/' . $dpath . 'decorators/global', array() ); |
|
99 | - $client = self::addDecorators( $client, $decorators, $classprefix, $context, $view, $templatePaths, $path ); |
|
98 | + $decorators = $config->get('admin/jsonadm/' . $dpath . 'decorators/global', array()); |
|
99 | + $client = self::addDecorators($client, $decorators, $classprefix, $context, $view, $templatePaths, $path); |
|
100 | 100 | |
101 | - if( !empty( $path ) ) |
|
101 | + if (!empty($path)) |
|
102 | 102 | { |
103 | - $classprefix = '\\Aimeos\\Admin\\JsonAdm\\' . ucfirst( $localClass ) . '\\Decorator\\'; |
|
104 | - $decorators = $config->get( 'admin/jsonadm/' . $dpath . 'decorators/local', array() ); |
|
105 | - $client = self::addDecorators( $client, $decorators, $classprefix, $context, $view, $templatePaths, $path ); |
|
103 | + $classprefix = '\\Aimeos\\Admin\\JsonAdm\\' . ucfirst($localClass) . '\\Decorator\\'; |
|
104 | + $decorators = $config->get('admin/jsonadm/' . $dpath . 'decorators/local', array()); |
|
105 | + $client = self::addDecorators($client, $decorators, $classprefix, $context, $view, $templatePaths, $path); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
@@ -122,29 +122,29 @@ discard block |
||
122 | 122 | * @param string $path Name of the client separated by slashes, e.g "product/stock" |
123 | 123 | * @return \Aimeos\Admin\JsonAdm\Common\Iface Client object |
124 | 124 | */ |
125 | - protected static function addDecorators( \Aimeos\Admin\JsonAdm\Iface $client, array $decorators, $classprefix, |
|
126 | - \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, $templatePaths, $path ) |
|
125 | + protected static function addDecorators(\Aimeos\Admin\JsonAdm\Iface $client, array $decorators, $classprefix, |
|
126 | + \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, $templatePaths, $path) |
|
127 | 127 | { |
128 | 128 | $iface = '\\Aimeos\\Admin\\JsonAdm\\Common\\Decorator\\Iface'; |
129 | 129 | |
130 | - foreach( $decorators as $name ) |
|
130 | + foreach ($decorators as $name) |
|
131 | 131 | { |
132 | - if( ctype_alnum( $name ) === false ) |
|
132 | + if (ctype_alnum($name) === false) |
|
133 | 133 | { |
134 | - $classname = is_string( $name ) ? $classprefix . $name : '<not a string>'; |
|
135 | - throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid class name "%1$s"', $classname ), 404 ); |
|
134 | + $classname = is_string($name) ? $classprefix . $name : '<not a string>'; |
|
135 | + throw new \Aimeos\Admin\JsonAdm\Exception(sprintf('Invalid class name "%1$s"', $classname), 404); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | $classname = $classprefix . $name; |
139 | 139 | |
140 | - if( class_exists( $classname ) === false ) { |
|
141 | - throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Class "%1$s" not found', $classname ), 404 ); |
|
140 | + if (class_exists($classname) === false) { |
|
141 | + throw new \Aimeos\Admin\JsonAdm\Exception(sprintf('Class "%1$s" not found', $classname), 404); |
|
142 | 142 | } |
143 | 143 | |
144 | - $client = new $classname( $client, $context, $view, $templatePaths, $path ); |
|
144 | + $client = new $classname($client, $context, $view, $templatePaths, $path); |
|
145 | 145 | |
146 | - if( !( $client instanceof $iface ) ) { |
|
147 | - throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Class "%1$s" does not implement "%2$s"', $classname, $iface ), 404 ); |
|
146 | + if (!($client instanceof $iface)) { |
|
147 | + throw new \Aimeos\Admin\JsonAdm\Exception(sprintf('Class "%1$s" does not implement "%2$s"', $classname, $iface), 404); |
|
148 | 148 | } |
149 | 149 | } |
150 | 150 | |
@@ -163,21 +163,21 @@ discard block |
||
163 | 163 | * @param string $path Name of the client separated by slashes, e.g "product/stock" |
164 | 164 | * @return \Aimeos\Admin\JsonAdm\Common\Iface Client object |
165 | 165 | */ |
166 | - protected static function createClientBase( $classname, $interface, \Aimeos\MShop\Context\Item\Iface $context, |
|
167 | - \Aimeos\MW\View\Iface $view, array $templatePaths, $path ) |
|
166 | + protected static function createClientBase($classname, $interface, \Aimeos\MShop\Context\Item\Iface $context, |
|
167 | + \Aimeos\MW\View\Iface $view, array $templatePaths, $path) |
|
168 | 168 | { |
169 | - if( isset( self::$objects[$classname] ) ) { |
|
169 | + if (isset(self::$objects[$classname])) { |
|
170 | 170 | return self::$objects[$classname]; |
171 | 171 | } |
172 | 172 | |
173 | - if( class_exists( $classname ) === false ) { |
|
174 | - throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Class "%1$s" not found', $classname ), 404 ); |
|
173 | + if (class_exists($classname) === false) { |
|
174 | + throw new \Aimeos\Admin\JsonAdm\Exception(sprintf('Class "%1$s" not found', $classname), 404); |
|
175 | 175 | } |
176 | 176 | |
177 | - $client = new $classname( $context, $view, $templatePaths, $path ); |
|
177 | + $client = new $classname($context, $view, $templatePaths, $path); |
|
178 | 178 | |
179 | - if( !( $client instanceof $interface ) ) { |
|
180 | - throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Class "%1$s" does not implement "%2$s"', $classname, $interface ), 500 ); |
|
179 | + if (!($client instanceof $interface)) { |
|
180 | + throw new \Aimeos\Admin\JsonAdm\Exception(sprintf('Class "%1$s" does not implement "%2$s"', $classname, $interface), 500); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | return $client; |
@@ -30,6 +30,6 @@ |
||
30 | 30 | * @param string $path Name of the client separated by slashes, e.g "product/stock" |
31 | 31 | * @return void |
32 | 32 | */ |
33 | - public function __construct( \Aimeos\Admin\JsonAdm\Iface $client, |
|
34 | - \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, array $templatePaths, $path ); |
|
33 | + public function __construct(\Aimeos\Admin\JsonAdm\Iface $client, |
|
34 | + \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, array $templatePaths, $path); |
|
35 | 35 | } |
36 | 36 | \ No newline at end of file |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | * @param array $templatePaths List of file system paths where the templates are stored |
34 | 34 | * @param string $path Name of the client separated by slashes, e.g "product/stock" |
35 | 35 | */ |
36 | - public function __construct( \Aimeos\Admin\JsonAdm\Iface $client, |
|
37 | - \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, array $templatePaths, $path ) |
|
36 | + public function __construct(\Aimeos\Admin\JsonAdm\Iface $client, |
|
37 | + \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MW\View\Iface $view, array $templatePaths, $path) |
|
38 | 38 | { |
39 | - parent::__construct( $context, $view, $templatePaths, $path ); |
|
39 | + parent::__construct($context, $view, $templatePaths, $path); |
|
40 | 40 | |
41 | 41 | $this->client = $client; |
42 | 42 | } |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | * @return mixed Returns the value of the called method |
51 | 51 | * @throws \Aimeos\Admin\JsonAdm\Exception If method call failed |
52 | 52 | */ |
53 | - public function __call( $name, array $param ) |
|
53 | + public function __call($name, array $param) |
|
54 | 54 | { |
55 | - if( ( $result = call_user_func_array( array( $this->client, $name ), $param ) ) === false ) { |
|
56 | - throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Unable to call method "%1$s"', $name ) ); |
|
55 | + if (($result = call_user_func_array(array($this->client, $name), $param)) === false) { |
|
56 | + throw new \Aimeos\Admin\JsonAdm\Exception(sprintf('Unable to call method "%1$s"', $name)); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | return $result; |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | * @param integer &$status Variable which contains the HTTP status afterwards |
69 | 69 | * @return string Content for response body |
70 | 70 | */ |
71 | - public function delete( $body, array &$header, &$status ) |
|
71 | + public function delete($body, array &$header, &$status) |
|
72 | 72 | { |
73 | - return $this->client->delete( $body, $header, $status ); |
|
73 | + return $this->client->delete($body, $header, $status); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | * @param integer &$status Variable which contains the HTTP status afterwards |
83 | 83 | * @return string Content for response body |
84 | 84 | */ |
85 | - public function get( $body, array &$header, &$status ) |
|
85 | + public function get($body, array &$header, &$status) |
|
86 | 86 | { |
87 | - return $this->client->get( $body, $header, $status ); |
|
87 | + return $this->client->get($body, $header, $status); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | * @param integer &$status Variable which contains the HTTP status afterwards |
98 | 98 | * @return string Content for response body |
99 | 99 | */ |
100 | - public function patch( $body, array &$header, &$status ) |
|
100 | + public function patch($body, array &$header, &$status) |
|
101 | 101 | { |
102 | - return $this->client->patch( $body, $header, $status ); |
|
102 | + return $this->client->patch($body, $header, $status); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | * @param integer &$status Variable which contains the HTTP status afterwards |
113 | 113 | * @return string Content for response body |
114 | 114 | */ |
115 | - public function post( $body, array &$header, &$status ) |
|
115 | + public function post($body, array &$header, &$status) |
|
116 | 116 | { |
117 | - return $this->client->post( $body, $header, $status ); |
|
117 | + return $this->client->post($body, $header, $status); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | |
@@ -127,9 +127,9 @@ discard block |
||
127 | 127 | * @param integer &$status Variable which contains the HTTP status afterwards |
128 | 128 | * @return string Content for response body |
129 | 129 | */ |
130 | - public function put( $body, array &$header, &$status ) |
|
130 | + public function put($body, array &$header, &$status) |
|
131 | 131 | { |
132 | - return $this->client->put( $body, $header, $status ); |
|
132 | + return $this->client->put($body, $header, $status); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | |
@@ -142,8 +142,8 @@ discard block |
||
142 | 142 | * @param integer &$status Variable which contains the HTTP status afterwards |
143 | 143 | * @return string Content for response body |
144 | 144 | */ |
145 | - public function options( $body, array &$header, &$status ) |
|
145 | + public function options($body, array &$header, &$status) |
|
146 | 146 | { |
147 | - return $this->client->options( $body, $header, $status ); |
|
147 | + return $this->client->options($body, $header, $status); |
|
148 | 148 | } |
149 | 149 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * @param integer &$status Variable which contains the HTTP status afterwards |
109 | 109 | * @return string Content for response body |
110 | 110 | */ |
111 | - public function get( $body, array &$header, &$status ) |
|
111 | + public function get($body, array &$header, &$status) |
|
112 | 112 | { |
113 | 113 | /** admin/jsonadm/partials/order/template-data |
114 | 114 | * Relative path to the data partial template file for the order client |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | * @since 2016.01 |
126 | 126 | * @category Developer |
127 | 127 | */ |
128 | - $this->getView()->assign( array( 'partial-data' => 'admin/jsonadm/partials/order/template-data' ) ); |
|
128 | + $this->getView()->assign(array('partial-data' => 'admin/jsonadm/partials/order/template-data')); |
|
129 | 129 | |
130 | - return parent::get( $body, $header, $status ); |
|
130 | + return parent::get($body, $header, $status); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | |
@@ -138,35 +138,35 @@ discard block |
||
138 | 138 | * @param array $include List of resource types that should be fetched |
139 | 139 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Iface |
140 | 140 | */ |
141 | - protected function getChildItems( array $items, array $include ) |
|
141 | + protected function getChildItems(array $items, array $include) |
|
142 | 142 | { |
143 | 143 | $list = array(); |
144 | 144 | |
145 | - if( in_array( 'order/base', $include ) ) |
|
145 | + if (in_array('order/base', $include)) |
|
146 | 146 | { |
147 | 147 | $ids = array(); |
148 | 148 | |
149 | - foreach( $items as $item ) { |
|
149 | + foreach ($items as $item) { |
|
150 | 150 | $ids[] = $item->getBaseId(); |
151 | 151 | } |
152 | 152 | |
153 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'order/base' ); |
|
153 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'order/base'); |
|
154 | 154 | |
155 | 155 | $search = $manager->createSearch(); |
156 | - $search->setConditions( $search->compare( '==', 'order.base.id', $ids ) ); |
|
156 | + $search->setConditions($search->compare('==', 'order.base.id', $ids)); |
|
157 | 157 | |
158 | - $list = array_merge( $list, $manager->searchItems( $search ) ); |
|
158 | + $list = array_merge($list, $manager->searchItems($search)); |
|
159 | 159 | } |
160 | 160 | |
161 | - if( in_array( 'order/status', $include ) ) |
|
161 | + if (in_array('order/status', $include)) |
|
162 | 162 | { |
163 | - $ids = array_keys( $items ); |
|
164 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'order/status' ); |
|
163 | + $ids = array_keys($items); |
|
164 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'order/status'); |
|
165 | 165 | |
166 | 166 | $search = $manager->createSearch(); |
167 | - $search->setConditions( $search->compare( '==', 'order.status.parentid', $ids ) ); |
|
167 | + $search->setConditions($search->compare('==', 'order.status.parentid', $ids)); |
|
168 | 168 | |
169 | - $list = array_merge( $list, $manager->searchItems( $search ) ); |
|
169 | + $list = array_merge($list, $manager->searchItems($search)); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | return $list; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * @param integer &$status Variable which contains the HTTP status afterwards |
109 | 109 | * @return string Content for response body |
110 | 110 | */ |
111 | - public function get( $body, array &$header, &$status ) |
|
111 | + public function get($body, array &$header, &$status) |
|
112 | 112 | { |
113 | 113 | /** admin/jsonadm/partials/order/base/template-data |
114 | 114 | * Relative path to the data partial template file for the order base client |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | * @since 2016.01 |
126 | 126 | * @category Developer |
127 | 127 | */ |
128 | - $this->getView()->assign( array( 'partial-data' => 'admin/jsonadm/partials/order/base/template-data' ) ); |
|
128 | + $this->getView()->assign(array('partial-data' => 'admin/jsonadm/partials/order/base/template-data')); |
|
129 | 129 | |
130 | - return parent::get( $body, $header, $status ); |
|
130 | + return parent::get($body, $header, $status); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | |
@@ -138,21 +138,21 @@ discard block |
||
138 | 138 | * @param array $include List of resource types that should be fetched |
139 | 139 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Iface |
140 | 140 | */ |
141 | - protected function getChildItems( array $items, array $include ) |
|
141 | + protected function getChildItems(array $items, array $include) |
|
142 | 142 | { |
143 | 143 | $list = array(); |
144 | - $ids = array_keys( $items ); |
|
145 | - $keys = array( 'order/base/address', 'order/base/coupon', 'order/base/product', 'order/base/service' ); |
|
146 | - $include = array_intersect( $include, $keys ); |
|
144 | + $ids = array_keys($items); |
|
145 | + $keys = array('order/base/address', 'order/base/coupon', 'order/base/product', 'order/base/service'); |
|
146 | + $include = array_intersect($include, $keys); |
|
147 | 147 | |
148 | - foreach( $include as $type ) |
|
148 | + foreach ($include as $type) |
|
149 | 149 | { |
150 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), $type ); |
|
150 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), $type); |
|
151 | 151 | |
152 | 152 | $search = $manager->createSearch(); |
153 | - $search->setConditions( $search->compare( '==', str_replace( '/', '.', $type ) . '.baseid', $ids ) ); |
|
153 | + $search->setConditions($search->compare('==', str_replace('/', '.', $type) . '.baseid', $ids)); |
|
154 | 154 | |
155 | - $list = array_merge( $list, $manager->searchItems( $search ) ); |
|
155 | + $list = array_merge($list, $manager->searchItems($search)); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | return $list; |
@@ -107,17 +107,17 @@ |
||
107 | 107 | * @param array $include List of resource types that should be fetched |
108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
109 | 109 | */ |
110 | - protected function getListItems( array $items, array $include ) |
|
110 | + protected function getListItems(array $items, array $include) |
|
111 | 111 | { |
112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'text/lists' ); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'text/lists'); |
|
113 | 113 | |
114 | 114 | $search = $manager->createSearch(); |
115 | 115 | $expr = array( |
116 | - $search->compare( '==', 'text.lists.parentid', array_keys( $items ) ), |
|
117 | - $search->compare( '==', 'text.lists.domain', $include ), |
|
116 | + $search->compare('==', 'text.lists.parentid', array_keys($items)), |
|
117 | + $search->compare('==', 'text.lists.domain', $include), |
|
118 | 118 | ); |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | 120 | |
121 | - return $manager->searchItems( $search ); |
|
121 | + return $manager->searchItems($search); |
|
122 | 122 | } |
123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
107 | 107 | * @param array $include List of resource types that should be fetched |
108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
109 | 109 | */ |
110 | - protected function getListItems( array $items, array $include ) |
|
110 | + protected function getListItems(array $items, array $include) |
|
111 | 111 | { |
112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'price/lists' ); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'price/lists'); |
|
113 | 113 | |
114 | 114 | $search = $manager->createSearch(); |
115 | 115 | $expr = array( |
116 | - $search->compare( '==', 'price.lists.parentid', array_keys( $items ) ), |
|
117 | - $search->compare( '==', 'price.lists.domain', $include ), |
|
116 | + $search->compare('==', 'price.lists.parentid', array_keys($items)), |
|
117 | + $search->compare('==', 'price.lists.domain', $include), |
|
118 | 118 | ); |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | 120 | |
121 | - return $manager->searchItems( $search ); |
|
121 | + return $manager->searchItems($search); |
|
122 | 122 | } |
123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
107 | 107 | * @param array $include List of resource types that should be fetched |
108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
109 | 109 | */ |
110 | - protected function getListItems( array $items, array $include ) |
|
110 | + protected function getListItems(array $items, array $include) |
|
111 | 111 | { |
112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute/lists' ); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute/lists'); |
|
113 | 113 | |
114 | 114 | $search = $manager->createSearch(); |
115 | 115 | $expr = array( |
116 | - $search->compare( '==', 'attribute.lists.parentid', array_keys( $items ) ), |
|
117 | - $search->compare( '==', 'attribute.lists.domain', $include ), |
|
116 | + $search->compare('==', 'attribute.lists.parentid', array_keys($items)), |
|
117 | + $search->compare('==', 'attribute.lists.domain', $include), |
|
118 | 118 | ); |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | 120 | |
121 | - return $manager->searchItems( $search ); |
|
121 | + return $manager->searchItems($search); |
|
122 | 122 | } |
123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
107 | 107 | * @param array $include List of resource types that should be fetched |
108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
109 | 109 | */ |
110 | - protected function getListItems( array $items, array $include ) |
|
110 | + protected function getListItems(array $items, array $include) |
|
111 | 111 | { |
112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service/lists' ); |
|
112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service/lists'); |
|
113 | 113 | |
114 | 114 | $search = $manager->createSearch(); |
115 | 115 | $expr = array( |
116 | - $search->compare( '==', 'service.lists.parentid', array_keys( $items ) ), |
|
117 | - $search->compare( '==', 'service.lists.domain', $include ), |
|
116 | + $search->compare('==', 'service.lists.parentid', array_keys($items)), |
|
117 | + $search->compare('==', 'service.lists.domain', $include), |
|
118 | 118 | ); |
119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
119 | + $search->setConditions($search->combine('&&', $expr)); |
|
120 | 120 | |
121 | - return $manager->searchItems( $search ); |
|
121 | + return $manager->searchItems($search); |
|
122 | 122 | } |
123 | 123 | } |