@@ -70,13 +70,13 @@ discard block |
||
| 70 | 70 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 71 | 71 | * @return string HTML code |
| 72 | 72 | */ |
| 73 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 73 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 74 | 74 | { |
| 75 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 75 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 76 | 76 | |
| 77 | 77 | $html = ''; |
| 78 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 79 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 78 | + foreach ($this->getSubClients() as $subclient) { |
|
| 79 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 80 | 80 | } |
| 81 | 81 | $view->attributeBody = $html; |
| 82 | 82 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $tplconf = 'client/html/catalog/detail/additional/attribute/standard/template-body'; |
| 104 | 104 | $default = 'catalog/detail/additional-attribute-body-default.php'; |
| 105 | 105 | |
| 106 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 106 | + return $view->render($view->config($tplconf, $default)); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | |
@@ -115,13 +115,13 @@ discard block |
||
| 115 | 115 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 116 | 116 | * @return string|null String including HTML tags for the header on error |
| 117 | 117 | */ |
| 118 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 118 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 119 | 119 | { |
| 120 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 120 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 121 | 121 | |
| 122 | 122 | $html = ''; |
| 123 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 124 | - $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 123 | + foreach ($this->getSubClients() as $subclient) { |
|
| 124 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 125 | 125 | } |
| 126 | 126 | $view->attributeHeader = $html; |
| 127 | 127 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $tplconf = 'client/html/catalog/detail/additional/attribute/standard/template-header'; |
| 150 | 150 | $default = 'catalog/detail/additional-attribute-header-default.php'; |
| 151 | 151 | |
| 152 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 152 | + return $view->render($view->config($tplconf, $default)); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @param string|null $name Name of the sub-client (Default if null) |
| 161 | 161 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 162 | 162 | */ |
| 163 | - public function getSubClient( $type, $name = null ) |
|
| 163 | + public function getSubClient($type, $name = null) |
|
| 164 | 164 | { |
| 165 | 165 | /** client/html/catalog/detail/additional/attribute/decorators/excludes |
| 166 | 166 | * Excludes decorators added by the "common" option from the catalog detail additional attribute html client |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * @see client/html/catalog/detail/additional/attribute/decorators/global |
| 237 | 237 | */ |
| 238 | 238 | |
| 239 | - return $this->createSubClient( 'catalog/detail/additional/attribute/' . $type, $name ); |
|
| 239 | + return $this->createSubClient('catalog/detail/additional/attribute/'.$type, $name); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | */ |
| 248 | 248 | protected function getSubClientNames() |
| 249 | 249 | { |
| 250 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 250 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | |
@@ -259,9 +259,9 @@ discard block |
||
| 259 | 259 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 260 | 260 | * @return \Aimeos\MW\View\Iface Modified view object |
| 261 | 261 | */ |
| 262 | - protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null ) |
|
| 262 | + protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null) |
|
| 263 | 263 | { |
| 264 | - if( !isset( $this->cache ) ) |
|
| 264 | + if (!isset($this->cache)) |
|
| 265 | 265 | { |
| 266 | 266 | $context = $this->getContext(); |
| 267 | 267 | $config = $context->getConfig(); |
@@ -283,19 +283,19 @@ discard block |
||
| 283 | 283 | * @since 2016.05 |
| 284 | 284 | * @category Developer |
| 285 | 285 | */ |
| 286 | - $variants = (bool) $config->get( 'client/html/catalog/detail/additional/attribute/variants', true ); |
|
| 286 | + $variants = (bool) $config->get('client/html/catalog/detail/additional/attribute/variants', true); |
|
| 287 | 287 | |
| 288 | - if( isset( $view->detailProductItem ) ) |
|
| 288 | + if (isset($view->detailProductItem)) |
|
| 289 | 289 | { |
| 290 | - $attrIds = array_keys( $view->detailProductItem->getRefItems( 'attribute', null, 'default' ) ); |
|
| 290 | + $attrIds = array_keys($view->detailProductItem->getRefItems('attribute', null, 'default')); |
|
| 291 | 291 | |
| 292 | - if( $variants === true ) { |
|
| 293 | - $attrIds += array_keys( $view->detailProductItem->getRefItems( 'attribute', null, 'variant' ) ); |
|
| 292 | + if ($variants === true) { |
|
| 293 | + $attrIds += array_keys($view->detailProductItem->getRefItems('attribute', null, 'variant')); |
|
| 294 | 294 | } |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | |
| 298 | - $products = $view->detailProductItem->getRefItems( 'product', 'default', 'default' ); |
|
| 298 | + $products = $view->detailProductItem->getRefItems('product', 'default', 'default'); |
|
| 299 | 299 | |
| 300 | 300 | /** client/html/catalog/detail/additional/attribute/domains |
| 301 | 301 | * A list of domain names whose items should be available in the additional attribute part of the catalog detail view templates |
@@ -313,39 +313,39 @@ discard block |
||
| 313 | 313 | * @category Developer |
| 314 | 314 | * @see client/html/catalog/detail/basket/selection/domains-attributes |
| 315 | 315 | */ |
| 316 | - $domains = $config->get( 'client/html/catalog/detail/basket/selection/domains', array( 'attribute' ) ); |
|
| 316 | + $domains = $config->get('client/html/catalog/detail/basket/selection/domains', array('attribute')); |
|
| 317 | 317 | |
| 318 | 318 | // find regular attributes from sub-products |
| 319 | - $controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' ); |
|
| 320 | - $products = $controller->getProductItems( array_keys( $products ), $domains ); |
|
| 319 | + $controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog'); |
|
| 320 | + $products = $controller->getProductItems(array_keys($products), $domains); |
|
| 321 | 321 | |
| 322 | - foreach( $products as $subProdId => $subProduct ) |
|
| 322 | + foreach ($products as $subProdId => $subProduct) |
|
| 323 | 323 | { |
| 324 | - $subItems = $subProduct->getRefItems( 'attribute', null, 'default' ); |
|
| 324 | + $subItems = $subProduct->getRefItems('attribute', null, 'default'); |
|
| 325 | 325 | |
| 326 | - if( $variants === true ) { |
|
| 327 | - $subItems += $subProduct->getRefItems( 'attribute', null, 'variant' ); |
|
| 326 | + if ($variants === true) { |
|
| 327 | + $subItems += $subProduct->getRefItems('attribute', null, 'variant'); |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - foreach( $subItems as $attrId => $attrItem ) |
|
| 330 | + foreach ($subItems as $attrId => $attrItem) |
|
| 331 | 331 | { |
| 332 | 332 | $subAttrDeps[$attrId][] = $subProdId; |
| 333 | 333 | $attrIds[] = $attrId; |
| 334 | 334 | } |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | - $this->addMetaItem( $products, 'product', $this->expire, $this->tags ); |
|
| 338 | - $this->addMetaList( array_keys( $products ), 'product', $this->expire ); |
|
| 337 | + $this->addMetaItem($products, 'product', $this->expire, $this->tags); |
|
| 338 | + $this->addMetaList(array_keys($products), 'product', $this->expire); |
|
| 339 | 339 | |
| 340 | 340 | |
| 341 | - $attrManager = $controller->createManager( 'attribute' ); |
|
| 341 | + $attrManager = $controller->createManager('attribute'); |
|
| 342 | 342 | |
| 343 | - $search = $attrManager->createSearch( true ); |
|
| 343 | + $search = $attrManager->createSearch(true); |
|
| 344 | 344 | $expr = array( |
| 345 | - $search->compare( '==', 'attribute.id', $attrIds ), |
|
| 345 | + $search->compare('==', 'attribute.id', $attrIds), |
|
| 346 | 346 | $search->getConditions(), |
| 347 | 347 | ); |
| 348 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 348 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 349 | 349 | |
| 350 | 350 | |
| 351 | 351 | /** client/html/catalog/detail/basket/selection/domains-attributes |
@@ -365,16 +365,16 @@ discard block |
||
| 365 | 365 | * @category Developer |
| 366 | 366 | * @see client/html/catalog/detail/basket/selection/domains |
| 367 | 367 | */ |
| 368 | - $domains = $config->get( 'client/html/catalog/detail/basket/selection/domains-attributes', array( 'text', 'media' ) ); |
|
| 368 | + $domains = $config->get('client/html/catalog/detail/basket/selection/domains-attributes', array('text', 'media')); |
|
| 369 | 369 | |
| 370 | - $attributes = $attrManager->searchItems( $search, $domains ); |
|
| 370 | + $attributes = $attrManager->searchItems($search, $domains); |
|
| 371 | 371 | |
| 372 | - foreach( $attributes as $id => $item ) { |
|
| 372 | + foreach ($attributes as $id => $item) { |
|
| 373 | 373 | $attributeMap[$item->getType()][$id] = $item; |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | - $this->addMetaItem( $attributes, 'attribute', $this->expire, $this->tags ); |
|
| 377 | - $this->addMetaList( array_keys( $attributes ), 'attribute', $this->expire ); |
|
| 376 | + $this->addMetaItem($attributes, 'attribute', $this->expire, $this->tags); |
|
| 377 | + $this->addMetaList(array_keys($attributes), 'attribute', $this->expire); |
|
| 378 | 378 | |
| 379 | 379 | |
| 380 | 380 | $view->attributeMap = $attributeMap; |
@@ -383,8 +383,8 @@ discard block |
||
| 383 | 383 | $this->cache = $view; |
| 384 | 384 | } |
| 385 | 385 | |
| 386 | - $expire = $this->expires( $this->expire, $expire ); |
|
| 387 | - $tags = array_merge( $tags, $this->tags ); |
|
| 386 | + $expire = $this->expires($this->expire, $expire); |
|
| 387 | + $tags = array_merge($tags, $this->tags); |
|
| 388 | 388 | |
| 389 | 389 | return $this->cache; |
| 390 | 390 | } |
@@ -67,13 +67,13 @@ discard block |
||
| 67 | 67 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 68 | 68 | * @return string HTML code |
| 69 | 69 | */ |
| 70 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 70 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 71 | 71 | { |
| 72 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 72 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 73 | 73 | |
| 74 | 74 | $html = ''; |
| 75 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 76 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 75 | + foreach ($this->getSubClients() as $subclient) { |
|
| 76 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 77 | 77 | } |
| 78 | 78 | $view->downloadBody = $html; |
| 79 | 79 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $tplconf = 'client/html/catalog/detail/additional/download/standard/template-body'; |
| 101 | 101 | $default = 'catalog/detail/additional-download-body-default.php'; |
| 102 | 102 | |
| 103 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 103 | + return $view->render($view->config($tplconf, $default)); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | |
@@ -112,13 +112,13 @@ discard block |
||
| 112 | 112 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 113 | 113 | * @return string|null String including HTML tags for the header on error |
| 114 | 114 | */ |
| 115 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 115 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 116 | 116 | { |
| 117 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 117 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 118 | 118 | |
| 119 | 119 | $html = ''; |
| 120 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 121 | - $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 120 | + foreach ($this->getSubClients() as $subclient) { |
|
| 121 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 122 | 122 | } |
| 123 | 123 | $view->downloadHeader = $html; |
| 124 | 124 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $tplconf = 'client/html/catalog/detail/additional/download/standard/template-header'; |
| 147 | 147 | $default = 'catalog/detail/additional-download-header-default.php'; |
| 148 | 148 | |
| 149 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 149 | + return $view->render($view->config($tplconf, $default)); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * @param string|null $name Name of the sub-client (Default if null) |
| 158 | 158 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 159 | 159 | */ |
| 160 | - public function getSubClient( $type, $name = null ) |
|
| 160 | + public function getSubClient($type, $name = null) |
|
| 161 | 161 | { |
| 162 | 162 | /** client/html/catalog/detail/additional/download/decorators/excludes |
| 163 | 163 | * Excludes decorators added by the "common" option from the catalog detail additional download html client |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * @see client/html/catalog/detail/additional/download/decorators/global |
| 234 | 234 | */ |
| 235 | 235 | |
| 236 | - return $this->createSubClient( 'catalog/detail/additional/download/' . $type, $name ); |
|
| 236 | + return $this->createSubClient('catalog/detail/additional/download/'.$type, $name); |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | |
@@ -244,6 +244,6 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | protected function getSubClientNames() |
| 246 | 246 | { |
| 247 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 247 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 248 | 248 | } |
| 249 | 249 | } |
| 250 | 250 | \ No newline at end of file |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @since 2014.03 |
| 101 | 101 | * @category Developer |
| 102 | 102 | */ |
| 103 | - private $subPartNames = array( 'text', 'attribute', 'property', 'download' ); |
|
| 103 | + private $subPartNames = array('text', 'attribute', 'property', 'download'); |
|
| 104 | 104 | |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -111,13 +111,13 @@ discard block |
||
| 111 | 111 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 112 | 112 | * @return string HTML code |
| 113 | 113 | */ |
| 114 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 114 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 115 | 115 | { |
| 116 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 116 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 117 | 117 | |
| 118 | 118 | $html = ''; |
| 119 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 120 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 119 | + foreach ($this->getSubClients() as $subclient) { |
|
| 120 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 121 | 121 | } |
| 122 | 122 | $view->additionalBody = $html; |
| 123 | 123 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $tplconf = 'client/html/catalog/detail/additional/standard/template-body'; |
| 145 | 145 | $default = 'catalog/detail/additional-body-default.php'; |
| 146 | 146 | |
| 147 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 147 | + return $view->render($view->config($tplconf, $default)); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | |
@@ -156,13 +156,13 @@ discard block |
||
| 156 | 156 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 157 | 157 | * @return string|null String including HTML tags for the header on error |
| 158 | 158 | */ |
| 159 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 159 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 160 | 160 | { |
| 161 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 161 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 162 | 162 | |
| 163 | 163 | $html = ''; |
| 164 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 165 | - $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 164 | + foreach ($this->getSubClients() as $subclient) { |
|
| 165 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 166 | 166 | } |
| 167 | 167 | $view->additionalHeader = $html; |
| 168 | 168 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $tplconf = 'client/html/catalog/detail/additional/standard/template-header'; |
| 191 | 191 | $default = 'catalog/detail/additional-header-default.php'; |
| 192 | 192 | |
| 193 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 193 | + return $view->render($view->config($tplconf, $default)); |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * @param string|null $name Name of the sub-client (Default if null) |
| 202 | 202 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 203 | 203 | */ |
| 204 | - public function getSubClient( $type, $name = null ) |
|
| 204 | + public function getSubClient($type, $name = null) |
|
| 205 | 205 | { |
| 206 | 206 | /** client/html/catalog/detail/additional/decorators/excludes |
| 207 | 207 | * Excludes decorators added by the "common" option from the catalog detail additional html client |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | * @see client/html/catalog/detail/additional/decorators/global |
| 278 | 278 | */ |
| 279 | 279 | |
| 280 | - return $this->createSubClient( 'catalog/detail/additional/' . $type, $name ); |
|
| 280 | + return $this->createSubClient('catalog/detail/additional/'.$type, $name); |
|
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | |
@@ -288,6 +288,6 @@ discard block |
||
| 288 | 288 | */ |
| 289 | 289 | protected function getSubClientNames() |
| 290 | 290 | { |
| 291 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 291 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 292 | 292 | } |
| 293 | 293 | } |
| 294 | 294 | \ No newline at end of file |
@@ -67,13 +67,13 @@ discard block |
||
| 67 | 67 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 68 | 68 | * @return string HTML code |
| 69 | 69 | */ |
| 70 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 70 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 71 | 71 | { |
| 72 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 72 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 73 | 73 | |
| 74 | 74 | $html = ''; |
| 75 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 76 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 75 | + foreach ($this->getSubClients() as $subclient) { |
|
| 76 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 77 | 77 | } |
| 78 | 78 | $view->textBody = $html; |
| 79 | 79 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $tplconf = 'client/html/catalog/detail/additional/text/standard/template-body'; |
| 101 | 101 | $default = 'catalog/detail/additional-text-body-default.php'; |
| 102 | 102 | |
| 103 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 103 | + return $view->render($view->config($tplconf, $default)); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | |
@@ -112,13 +112,13 @@ discard block |
||
| 112 | 112 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 113 | 113 | * @return string|null String including HTML tags for the header on error |
| 114 | 114 | */ |
| 115 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 115 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 116 | 116 | { |
| 117 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 117 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 118 | 118 | |
| 119 | 119 | $html = ''; |
| 120 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 121 | - $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 120 | + foreach ($this->getSubClients() as $subclient) { |
|
| 121 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 122 | 122 | } |
| 123 | 123 | $view->textHeader = $html; |
| 124 | 124 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $tplconf = 'client/html/catalog/detail/additional/text/standard/template-header'; |
| 147 | 147 | $default = 'catalog/detail/additional-text-header-default.php'; |
| 148 | 148 | |
| 149 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 149 | + return $view->render($view->config($tplconf, $default)); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * @param string|null $name Name of the sub-client (Default if null) |
| 158 | 158 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 159 | 159 | */ |
| 160 | - public function getSubClient( $type, $name = null ) |
|
| 160 | + public function getSubClient($type, $name = null) |
|
| 161 | 161 | { |
| 162 | 162 | /** client/html/catalog/detail/additional/text/decorators/excludes |
| 163 | 163 | * Excludes decorators added by the "common" option from the catalog detail additional text html client |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * @see client/html/catalog/detail/additional/text/decorators/global |
| 234 | 234 | */ |
| 235 | 235 | |
| 236 | - return $this->createSubClient( 'catalog/detail/additional/text/' . $type, $name ); |
|
| 236 | + return $this->createSubClient('catalog/detail/additional/text/'.$type, $name); |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | |
@@ -244,6 +244,6 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | protected function getSubClientNames() |
| 246 | 246 | { |
| 247 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 247 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 248 | 248 | } |
| 249 | 249 | } |
| 250 | 250 | \ No newline at end of file |
@@ -69,13 +69,13 @@ discard block |
||
| 69 | 69 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 70 | 70 | * @return string HTML code |
| 71 | 71 | */ |
| 72 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 72 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 73 | 73 | { |
| 74 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 74 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 75 | 75 | |
| 76 | 76 | $html = ''; |
| 77 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 78 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 77 | + foreach ($this->getSubClients() as $subclient) { |
|
| 78 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 79 | 79 | } |
| 80 | 80 | $view->bundleBody = $html; |
| 81 | 81 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $tplconf = 'client/html/catalog/detail/bundle/standard/template-body'; |
| 103 | 103 | $default = 'catalog/detail/bundle-body-default.php'; |
| 104 | 104 | |
| 105 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 105 | + return $view->render($view->config($tplconf, $default)); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | |
@@ -114,13 +114,13 @@ discard block |
||
| 114 | 114 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 115 | 115 | * @return string|null String including HTML tags for the header on error |
| 116 | 116 | */ |
| 117 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 117 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 118 | 118 | { |
| 119 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 119 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 120 | 120 | |
| 121 | 121 | $html = ''; |
| 122 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 123 | - $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 122 | + foreach ($this->getSubClients() as $subclient) { |
|
| 123 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 124 | 124 | } |
| 125 | 125 | $view->bundleHeader = $html; |
| 126 | 126 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | $tplconf = 'client/html/catalog/detail/bundle/standard/template-header'; |
| 149 | 149 | $default = 'catalog/detail/bundle-header-default.php'; |
| 150 | 150 | |
| 151 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 151 | + return $view->render($view->config($tplconf, $default)); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * @param string|null $name Name of the sub-client (Default if null) |
| 160 | 160 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 161 | 161 | */ |
| 162 | - public function getSubClient( $type, $name = null ) |
|
| 162 | + public function getSubClient($type, $name = null) |
|
| 163 | 163 | { |
| 164 | 164 | /** client/html/catalog/detail/bundle/decorators/excludes |
| 165 | 165 | * Excludes decorators added by the "common" option from the catalog detail bundle html client |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | * @see client/html/catalog/detail/bundle/decorators/global |
| 236 | 236 | */ |
| 237 | 237 | |
| 238 | - return $this->createSubClient( 'catalog/detail/bundle/' . $type, $name ); |
|
| 238 | + return $this->createSubClient('catalog/detail/bundle/'.$type, $name); |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | */ |
| 247 | 247 | protected function getSubClientNames() |
| 248 | 248 | { |
| 249 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 249 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | |
@@ -258,23 +258,23 @@ discard block |
||
| 258 | 258 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 259 | 259 | * @return \Aimeos\MW\View\Iface Modified view object |
| 260 | 260 | */ |
| 261 | - protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null ) |
|
| 261 | + protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null) |
|
| 262 | 262 | { |
| 263 | - if( !isset( $this->cache ) ) |
|
| 263 | + if (!isset($this->cache)) |
|
| 264 | 264 | { |
| 265 | - if( isset( $view->detailProductItem ) && $view->detailProductItem->getType() === 'bundle' ) |
|
| 265 | + if (isset($view->detailProductItem) && $view->detailProductItem->getType() === 'bundle') |
|
| 266 | 266 | { |
| 267 | 267 | $context = $this->getContext(); |
| 268 | 268 | $config = $context->getConfig(); |
| 269 | - $domains = array( 'text', 'price', 'media' ); |
|
| 270 | - $products = $view->detailProductItem->getRefItems( 'product', null, 'default' ); |
|
| 269 | + $domains = array('text', 'price', 'media'); |
|
| 270 | + $products = $view->detailProductItem->getRefItems('product', null, 'default'); |
|
| 271 | 271 | |
| 272 | 272 | /** client/html/catalog/detail/domains |
| 273 | 273 | * A list of domain names whose items should be available in the catalog view templates |
| 274 | 274 | * |
| 275 | 275 | * @see client/html/catalog/detail/domains |
| 276 | 276 | */ |
| 277 | - $domains = $config->get( 'client/html/catalog/detail/domains', $domains ); |
|
| 277 | + $domains = $config->get('client/html/catalog/detail/domains', $domains); |
|
| 278 | 278 | |
| 279 | 279 | /** client/html/catalog/detail/bundle/domains |
| 280 | 280 | * A list of domain names whose items should be available in the bundle part of the catalog detail view templates |
@@ -297,22 +297,22 @@ discard block |
||
| 297 | 297 | * @category Developer |
| 298 | 298 | * @see client/html/catalog/detail/domains |
| 299 | 299 | */ |
| 300 | - $domains = $config->get( 'client/html/catalog/detail/bundle/domains', $domains ); |
|
| 300 | + $domains = $config->get('client/html/catalog/detail/bundle/domains', $domains); |
|
| 301 | 301 | |
| 302 | - $controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' ); |
|
| 302 | + $controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog'); |
|
| 303 | 303 | |
| 304 | - $view->bundleItems = $controller->getProductItems( array_keys( $products ), $domains ); |
|
| 304 | + $view->bundleItems = $controller->getProductItems(array_keys($products), $domains); |
|
| 305 | 305 | $view->bundlePosItems = $products; |
| 306 | 306 | |
| 307 | - $this->addMetaItem( $view->bundleItems, 'product', $this->expire, $this->tags ); |
|
| 308 | - $this->addMetaList( array_keys( $view->bundleItems ), 'product', $this->expire ); |
|
| 307 | + $this->addMetaItem($view->bundleItems, 'product', $this->expire, $this->tags); |
|
| 308 | + $this->addMetaList(array_keys($view->bundleItems), 'product', $this->expire); |
|
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | $this->cache = $view; |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | - $expire = $this->expires( $this->expire, $expire ); |
|
| 315 | - $tags = array_merge( $tags, $this->tags ); |
|
| 314 | + $expire = $this->expires($this->expire, $expire); |
|
| 315 | + $tags = array_merge($tags, $this->tags); |
|
| 316 | 316 | |
| 317 | 317 | return $this->cache; |
| 318 | 318 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @return \Aimeos\Client\Html\Iface Filter part implementing \Aimeos\Client\Html\Iface |
| 32 | 32 | * @throws \Aimeos\Client\Html\Exception If requested client implementation couldn't be found or initialisation fails |
| 33 | 33 | */ |
| 34 | - public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null ) |
|
| 34 | + public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null) |
|
| 35 | 35 | { |
| 36 | 36 | /** client/html/catalog/detail/name |
| 37 | 37 | * Class name of the used catalog detail client implementation |
@@ -66,22 +66,22 @@ discard block |
||
| 66 | 66 | * @since 2014.03 |
| 67 | 67 | * @category Developer |
| 68 | 68 | */ |
| 69 | - if( $name === null ) { |
|
| 70 | - $name = $context->getConfig()->get( 'client/html/catalog/detail/name', 'Standard' ); |
|
| 69 | + if ($name === null) { |
|
| 70 | + $name = $context->getConfig()->get('client/html/catalog/detail/name', 'Standard'); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - if( ctype_alnum( $name ) === false ) |
|
| 73 | + if (ctype_alnum($name) === false) |
|
| 74 | 74 | { |
| 75 | - $classname = is_string( $name ) ? '\\Aimeos\\Client\\Html\\Catalog\\Detail\\' . $name : '<not a string>'; |
|
| 76 | - throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
|
| 75 | + $classname = is_string($name) ? '\\Aimeos\\Client\\Html\\Catalog\\Detail\\'.$name : '<not a string>'; |
|
| 76 | + throw new \Aimeos\Client\Html\Exception(sprintf('Invalid characters in class name "%1$s"', $classname)); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | $iface = '\\Aimeos\\Client\\Html\\Iface'; |
| 80 | - $classname = '\\Aimeos\\Client\\Html\\Catalog\\Detail\\' . $name; |
|
| 80 | + $classname = '\\Aimeos\\Client\\Html\\Catalog\\Detail\\'.$name; |
|
| 81 | 81 | |
| 82 | - $client = self::createClientBase( $context, $classname, $iface, $templatePaths ); |
|
| 82 | + $client = self::createClientBase($context, $classname, $iface, $templatePaths); |
|
| 83 | 83 | |
| 84 | - return self::addClientDecorators( $context, $client, $templatePaths, 'catalog/detail' ); |
|
| 84 | + return self::addClientDecorators($context, $client, $templatePaths, 'catalog/detail'); |
|
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | * @since 2014.03 |
| 167 | 167 | * @category Developer |
| 168 | 168 | */ |
| 169 | - private $subPartNames = array( 'image', 'basic', 'basket', 'actions', 'social', 'bundle', 'additional', 'suggest', 'bought', 'seen' ); |
|
| 169 | + private $subPartNames = array('image', 'basic', 'basket', 'actions', 'social', 'bundle', 'additional', 'suggest', 'bought', 'seen'); |
|
| 170 | 170 | |
| 171 | 171 | private $tags = array(); |
| 172 | 172 | private $expire; |
@@ -181,9 +181,9 @@ discard block |
||
| 181 | 181 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 182 | 182 | * @return string HTML code |
| 183 | 183 | */ |
| 184 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 184 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 185 | 185 | { |
| 186 | - $prefixes = array( 'd' ); |
|
| 186 | + $prefixes = array('d'); |
|
| 187 | 187 | $context = $this->getContext(); |
| 188 | 188 | |
| 189 | 189 | /** client/html/catalog/detail |
@@ -198,41 +198,41 @@ discard block |
||
| 198 | 198 | */ |
| 199 | 199 | $confkey = 'client/html/catalog/detail'; |
| 200 | 200 | |
| 201 | - if( $context->getUserId() != null || ( $html = $this->getCached( 'body', $uid, $prefixes, $confkey ) ) === null ) |
|
| 201 | + if ($context->getUserId() != null || ($html = $this->getCached('body', $uid, $prefixes, $confkey)) === null) |
|
| 202 | 202 | { |
| 203 | 203 | $view = $this->getView(); |
| 204 | 204 | |
| 205 | 205 | try |
| 206 | 206 | { |
| 207 | - $view = $this->setViewParams( $view, $tags, $expire ); |
|
| 207 | + $view = $this->setViewParams($view, $tags, $expire); |
|
| 208 | 208 | |
| 209 | 209 | $output = ''; |
| 210 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 211 | - $output .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 210 | + foreach ($this->getSubClients() as $subclient) { |
|
| 211 | + $output .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 212 | 212 | } |
| 213 | 213 | $view->detailBody = $output; |
| 214 | 214 | } |
| 215 | - catch( \Aimeos\Client\Html\Exception $e ) |
|
| 215 | + catch (\Aimeos\Client\Html\Exception $e) |
|
| 216 | 216 | { |
| 217 | - $error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) ); |
|
| 218 | - $view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error; |
|
| 217 | + $error = array($context->getI18n()->dt('client', $e->getMessage())); |
|
| 218 | + $view->detailErrorList = $view->get('detailErrorList', array()) + $error; |
|
| 219 | 219 | } |
| 220 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 220 | + catch (\Aimeos\Controller\Frontend\Exception $e) |
|
| 221 | 221 | { |
| 222 | - $error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) ); |
|
| 223 | - $view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error; |
|
| 222 | + $error = array($context->getI18n()->dt('controller/frontend', $e->getMessage())); |
|
| 223 | + $view->detailErrorList = $view->get('detailErrorList', array()) + $error; |
|
| 224 | 224 | } |
| 225 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 225 | + catch (\Aimeos\MShop\Exception $e) |
|
| 226 | 226 | { |
| 227 | - $error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
| 228 | - $view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error; |
|
| 227 | + $error = array($context->getI18n()->dt('mshop', $e->getMessage())); |
|
| 228 | + $view->detailErrorList = $view->get('detailErrorList', array()) + $error; |
|
| 229 | 229 | } |
| 230 | - catch( \Exception $e ) |
|
| 230 | + catch (\Exception $e) |
|
| 231 | 231 | { |
| 232 | - $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() ); |
|
| 232 | + $context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString()); |
|
| 233 | 233 | |
| 234 | - $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) ); |
|
| 235 | - $view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error; |
|
| 234 | + $error = array($context->getI18n()->dt('client', 'A non-recoverable error occured')); |
|
| 235 | + $view->detailErrorList = $view->get('detailErrorList', array()) + $error; |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | /** client/html/catalog/detail/standard/template-body |
@@ -258,13 +258,13 @@ discard block |
||
| 258 | 258 | $tplconf = 'client/html/catalog/detail/standard/template-body'; |
| 259 | 259 | $default = 'catalog/detail/body-default.php'; |
| 260 | 260 | |
| 261 | - $html = $view->render( $view->config( $tplconf, $default ) ); |
|
| 261 | + $html = $view->render($view->config($tplconf, $default)); |
|
| 262 | 262 | |
| 263 | - $this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire ); |
|
| 263 | + $this->setCached('body', $uid, $prefixes, $confkey, $html, $tags, $expire); |
|
| 264 | 264 | } |
| 265 | 265 | else |
| 266 | 266 | { |
| 267 | - $html = $this->modifyBody( $html, $uid ); |
|
| 267 | + $html = $this->modifyBody($html, $uid); |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | return $html; |
@@ -279,30 +279,30 @@ discard block |
||
| 279 | 279 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 280 | 280 | * @return string|null String including HTML tags for the header on error |
| 281 | 281 | */ |
| 282 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 282 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 283 | 283 | { |
| 284 | - $prefixes = array( 'd' ); |
|
| 284 | + $prefixes = array('d'); |
|
| 285 | 285 | $context = $this->getContext(); |
| 286 | 286 | $confkey = 'client/html/catalog/detail'; |
| 287 | 287 | |
| 288 | 288 | |
| 289 | - if( $context->getUserId() != null || ( $html = $this->getCached( 'header', $uid, $prefixes, $confkey ) ) === null ) |
|
| 289 | + if ($context->getUserId() != null || ($html = $this->getCached('header', $uid, $prefixes, $confkey)) === null) |
|
| 290 | 290 | { |
| 291 | 291 | $view = $this->getView(); |
| 292 | 292 | |
| 293 | 293 | try |
| 294 | 294 | { |
| 295 | - $view = $this->setViewParams( $view, $tags, $expire ); |
|
| 295 | + $view = $this->setViewParams($view, $tags, $expire); |
|
| 296 | 296 | |
| 297 | 297 | $output = ''; |
| 298 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 299 | - $output .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 298 | + foreach ($this->getSubClients() as $subclient) { |
|
| 299 | + $output .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 300 | 300 | } |
| 301 | 301 | $view->detailHeader = $output; |
| 302 | 302 | } |
| 303 | - catch( \Exception $e ) |
|
| 303 | + catch (\Exception $e) |
|
| 304 | 304 | { |
| 305 | - $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() ); |
|
| 305 | + $context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString()); |
|
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | /** client/html/catalog/detail/standard/template-header |
@@ -329,13 +329,13 @@ discard block |
||
| 329 | 329 | $tplconf = 'client/html/catalog/detail/standard/template-header'; |
| 330 | 330 | $default = 'catalog/detail/header-default.php'; |
| 331 | 331 | |
| 332 | - $html = $view->render( $view->config( $tplconf, $default ) ); |
|
| 332 | + $html = $view->render($view->config($tplconf, $default)); |
|
| 333 | 333 | |
| 334 | - $this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire ); |
|
| 334 | + $this->setCached('header', $uid, $prefixes, $confkey, $html, $tags, $expire); |
|
| 335 | 335 | } |
| 336 | 336 | else |
| 337 | 337 | { |
| 338 | - $html = $this->modifyHeader( $html, $uid ); |
|
| 338 | + $html = $this->modifyHeader($html, $uid); |
|
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | return $html; |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | * @param string|null $name Name of the sub-client (Default if null) |
| 350 | 350 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 351 | 351 | */ |
| 352 | - public function getSubClient( $type, $name = null ) |
|
| 352 | + public function getSubClient($type, $name = null) |
|
| 353 | 353 | { |
| 354 | 354 | /** client/html/catalog/detail/decorators/excludes |
| 355 | 355 | * Excludes decorators added by the "common" option from the catalog detail html client |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | * @see client/html/catalog/detail/decorators/global |
| 426 | 426 | */ |
| 427 | 427 | |
| 428 | - return $this->createSubClient( 'catalog/detail/' . $type, $name ); |
|
| 428 | + return $this->createSubClient('catalog/detail/'.$type, $name); |
|
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | |
@@ -442,32 +442,32 @@ discard block |
||
| 442 | 442 | try |
| 443 | 443 | { |
| 444 | 444 | $site = $context->getLocale()->getSite()->getCode(); |
| 445 | - $params = $this->getClientParams( $view->param() ); |
|
| 446 | - $context->getSession()->set( 'aimeos/catalog/detail/params/last' . $site, $params ); |
|
| 445 | + $params = $this->getClientParams($view->param()); |
|
| 446 | + $context->getSession()->set('aimeos/catalog/detail/params/last'.$site, $params); |
|
| 447 | 447 | |
| 448 | 448 | parent::process(); |
| 449 | 449 | } |
| 450 | - catch( \Aimeos\Client\Html\Exception $e ) |
|
| 450 | + catch (\Aimeos\Client\Html\Exception $e) |
|
| 451 | 451 | { |
| 452 | - $error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) ); |
|
| 453 | - $view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error; |
|
| 452 | + $error = array($context->getI18n()->dt('client', $e->getMessage())); |
|
| 453 | + $view->detailErrorList = $view->get('detailErrorList', array()) + $error; |
|
| 454 | 454 | } |
| 455 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 455 | + catch (\Aimeos\Controller\Frontend\Exception $e) |
|
| 456 | 456 | { |
| 457 | - $error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) ); |
|
| 458 | - $view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error; |
|
| 457 | + $error = array($context->getI18n()->dt('controller/frontend', $e->getMessage())); |
|
| 458 | + $view->detailErrorList = $view->get('detailErrorList', array()) + $error; |
|
| 459 | 459 | } |
| 460 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 460 | + catch (\Aimeos\MShop\Exception $e) |
|
| 461 | 461 | { |
| 462 | - $error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
| 463 | - $view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error; |
|
| 462 | + $error = array($context->getI18n()->dt('mshop', $e->getMessage())); |
|
| 463 | + $view->detailErrorList = $view->get('detailErrorList', array()) + $error; |
|
| 464 | 464 | } |
| 465 | - catch( \Exception $e ) |
|
| 465 | + catch (\Exception $e) |
|
| 466 | 466 | { |
| 467 | - $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() ); |
|
| 467 | + $context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString()); |
|
| 468 | 468 | |
| 469 | - $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) ); |
|
| 470 | - $view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error; |
|
| 469 | + $error = array($context->getI18n()->dt('client', 'A non-recoverable error occured')); |
|
| 470 | + $view->detailErrorList = $view->get('detailErrorList', array()) + $error; |
|
| 471 | 471 | } |
| 472 | 472 | } |
| 473 | 473 | |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | */ |
| 480 | 480 | protected function getSubClientNames() |
| 481 | 481 | { |
| 482 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 482 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 483 | 483 | } |
| 484 | 484 | |
| 485 | 485 | |
@@ -491,52 +491,52 @@ discard block |
||
| 491 | 491 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 492 | 492 | * @return \Aimeos\MW\View\Iface Modified view object |
| 493 | 493 | */ |
| 494 | - protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null ) |
|
| 494 | + protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null) |
|
| 495 | 495 | { |
| 496 | - if( !isset( $this->cache ) ) |
|
| 496 | + if (!isset($this->cache)) |
|
| 497 | 497 | { |
| 498 | 498 | $context = $this->getContext(); |
| 499 | - $domains = array( 'media', 'price', 'text', 'attribute', 'product' ); |
|
| 500 | - $productItem = $this->getProductItem( $view->param( 'd_prodid' ), $domains ); |
|
| 501 | - $controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' ); |
|
| 499 | + $domains = array('media', 'price', 'text', 'attribute', 'product'); |
|
| 500 | + $productItem = $this->getProductItem($view->param('d_prodid'), $domains); |
|
| 501 | + $controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog'); |
|
| 502 | 502 | |
| 503 | 503 | |
| 504 | - $attrManager = $controller->createManager( 'attribute' ); |
|
| 505 | - $attrSearch = $attrManager->createSearch( true ); |
|
| 504 | + $attrManager = $controller->createManager('attribute'); |
|
| 505 | + $attrSearch = $attrManager->createSearch(true); |
|
| 506 | 506 | $expr = array( |
| 507 | - $attrSearch->compare( '==', 'attribute.id', array_keys( $productItem->getRefItems( 'attribute' ) ) ), |
|
| 507 | + $attrSearch->compare('==', 'attribute.id', array_keys($productItem->getRefItems('attribute'))), |
|
| 508 | 508 | $attrSearch->getConditions(), |
| 509 | 509 | ); |
| 510 | - $attrSearch->setConditions( $attrSearch->combine( '&&', $expr ) ); |
|
| 511 | - $attributes = $attrManager->searchItems( $attrSearch, $domains ); |
|
| 510 | + $attrSearch->setConditions($attrSearch->combine('&&', $expr)); |
|
| 511 | + $attributes = $attrManager->searchItems($attrSearch, $domains); |
|
| 512 | 512 | |
| 513 | - $this->addMetaItem( $attributes, 'attribute', $this->expire, $this->tags ); |
|
| 514 | - $this->addMetaList( array_keys( $attributes ), 'attribute', $this->expire ); |
|
| 513 | + $this->addMetaItem($attributes, 'attribute', $this->expire, $this->tags); |
|
| 514 | + $this->addMetaList(array_keys($attributes), 'attribute', $this->expire); |
|
| 515 | 515 | |
| 516 | 516 | |
| 517 | - $mediaManager = $controller->createManager( 'media' ); |
|
| 518 | - $mediaSearch = $mediaManager->createSearch( true ); |
|
| 517 | + $mediaManager = $controller->createManager('media'); |
|
| 518 | + $mediaSearch = $mediaManager->createSearch(true); |
|
| 519 | 519 | $expr = array( |
| 520 | - $mediaSearch->compare( '==', 'media.id', array_keys( $productItem->getRefItems( 'media' ) ) ), |
|
| 520 | + $mediaSearch->compare('==', 'media.id', array_keys($productItem->getRefItems('media'))), |
|
| 521 | 521 | $mediaSearch->getConditions(), |
| 522 | 522 | ); |
| 523 | - $mediaSearch->setConditions( $mediaSearch->combine( '&&', $expr ) ); |
|
| 524 | - $media = $mediaManager->searchItems( $mediaSearch, $domains ); |
|
| 523 | + $mediaSearch->setConditions($mediaSearch->combine('&&', $expr)); |
|
| 524 | + $media = $mediaManager->searchItems($mediaSearch, $domains); |
|
| 525 | 525 | |
| 526 | - $this->addMetaItem( $media, 'media', $this->expire, $this->tags ); |
|
| 527 | - $this->addMetaList( array_keys( $media ), 'media', $this->expire ); |
|
| 526 | + $this->addMetaItem($media, 'media', $this->expire, $this->tags); |
|
| 527 | + $this->addMetaList(array_keys($media), 'media', $this->expire); |
|
| 528 | 528 | |
| 529 | 529 | |
| 530 | 530 | $view->detailProductItem = $productItem; |
| 531 | 531 | $view->detailProductAttributeItems = $attributes; |
| 532 | 532 | $view->detailProductMediaItems = $media; |
| 533 | - $view->detailParams = $this->getClientParams( $view->param() ); |
|
| 533 | + $view->detailParams = $this->getClientParams($view->param()); |
|
| 534 | 534 | |
| 535 | 535 | $this->cache = $view; |
| 536 | 536 | } |
| 537 | 537 | |
| 538 | - $expire = $this->expires( $this->expire, $expire ); |
|
| 539 | - $tags = array_merge( $tags, $this->tags ); |
|
| 538 | + $expire = $this->expires($this->expire, $expire); |
|
| 539 | + $tags = array_merge($tags, $this->tags); |
|
| 540 | 540 | |
| 541 | 541 | return $this->cache; |
| 542 | 542 | } |
@@ -550,12 +550,12 @@ discard block |
||
| 550 | 550 | * @throws \Aimeos\Client\Html\Exception If no product item was found |
| 551 | 551 | * @return \Aimeos\MShop\Product\Item\Iface Product item object |
| 552 | 552 | */ |
| 553 | - protected function getProductItem( $prodid, array $domains ) |
|
| 553 | + protected function getProductItem($prodid, array $domains) |
|
| 554 | 554 | { |
| 555 | 555 | $context = $this->getContext(); |
| 556 | 556 | $config = $context->getConfig(); |
| 557 | 557 | |
| 558 | - if( $prodid == '' ) |
|
| 558 | + if ($prodid == '') |
|
| 559 | 559 | { |
| 560 | 560 | /** client/html/catalog/detail/prodid-default |
| 561 | 561 | * The default product ID used if none is given as parameter |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | * @category Developer |
| 572 | 572 | * @see client/html/catalog/lists/catid-default |
| 573 | 573 | */ |
| 574 | - $prodid = $config->get( 'client/html/catalog/detail/prodid-default', '' ); |
|
| 574 | + $prodid = $config->get('client/html/catalog/detail/prodid-default', ''); |
|
| 575 | 575 | } |
| 576 | 576 | |
| 577 | 577 | /** client/html/catalog/domains |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | * |
| 580 | 580 | * @see client/html/catalog/detail/domains |
| 581 | 581 | */ |
| 582 | - $domains = $config->get( 'client/html/catalog/domains', $domains ); |
|
| 582 | + $domains = $config->get('client/html/catalog/domains', $domains); |
|
| 583 | 583 | |
| 584 | 584 | /** client/html/catalog/detail/domains |
| 585 | 585 | * A list of domain names whose items should be available in the product detail view template |
@@ -602,17 +602,17 @@ discard block |
||
| 602 | 602 | * @see client/html/catalog/domains |
| 603 | 603 | * @see client/html/catalog/lists/domains |
| 604 | 604 | */ |
| 605 | - $domains = $config->get( 'client/html/catalog/detail/domains', $domains ); |
|
| 605 | + $domains = $config->get('client/html/catalog/detail/domains', $domains); |
|
| 606 | 606 | |
| 607 | - $controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' ); |
|
| 608 | - $items = $controller->getProductItems( array( $prodid ), $domains ); |
|
| 607 | + $controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog'); |
|
| 608 | + $items = $controller->getProductItems(array($prodid), $domains); |
|
| 609 | 609 | |
| 610 | - if( ( $item = reset( $items ) ) === false ) { |
|
| 611 | - throw new \Aimeos\Client\Html\Exception( sprintf( 'No product with ID "%1$s" found', $prodid ) ); |
|
| 610 | + if (($item = reset($items)) === false) { |
|
| 611 | + throw new \Aimeos\Client\Html\Exception(sprintf('No product with ID "%1$s" found', $prodid)); |
|
| 612 | 612 | } |
| 613 | 613 | |
| 614 | - $this->addMetaItem( $item, 'product', $this->expire, $this->tags ); |
|
| 615 | - $this->addMetaList( $prodid, 'product', $this->expire ); |
|
| 614 | + $this->addMetaItem($item, 'product', $this->expire, $this->tags); |
|
| 615 | + $this->addMetaList($prodid, 'product', $this->expire); |
|
| 616 | 616 | |
| 617 | 617 | return $item; |
| 618 | 618 | } |
@@ -67,13 +67,13 @@ discard block |
||
| 67 | 67 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 68 | 68 | * @return string HTML code |
| 69 | 69 | */ |
| 70 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 70 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 71 | 71 | { |
| 72 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 72 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 73 | 73 | |
| 74 | 74 | $html = ''; |
| 75 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 76 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 75 | + foreach ($this->getSubClients() as $subclient) { |
|
| 76 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 77 | 77 | } |
| 78 | 78 | $view->basicBody = $html; |
| 79 | 79 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $tplconf = 'client/html/catalog/detail/basic/standard/template-body'; |
| 101 | 101 | $default = 'catalog/detail/basic-body-default.php'; |
| 102 | 102 | |
| 103 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 103 | + return $view->render($view->config($tplconf, $default)); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | |
@@ -112,13 +112,13 @@ discard block |
||
| 112 | 112 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 113 | 113 | * @return string|null String including HTML tags for the header on error |
| 114 | 114 | */ |
| 115 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 115 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 116 | 116 | { |
| 117 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 117 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 118 | 118 | |
| 119 | 119 | $html = ''; |
| 120 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 121 | - $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 120 | + foreach ($this->getSubClients() as $subclient) { |
|
| 121 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 122 | 122 | } |
| 123 | 123 | $view->basicHeader = $html; |
| 124 | 124 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $tplconf = 'client/html/catalog/detail/basic/standard/template-header'; |
| 147 | 147 | $default = 'catalog/detail/basic-header-default.php'; |
| 148 | 148 | |
| 149 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 149 | + return $view->render($view->config($tplconf, $default)); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * @param string|null $name Name of the sub-client (Default if null) |
| 158 | 158 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 159 | 159 | */ |
| 160 | - public function getSubClient( $type, $name = null ) |
|
| 160 | + public function getSubClient($type, $name = null) |
|
| 161 | 161 | { |
| 162 | 162 | /** client/html/catalog/detail/basic/decorators/excludes |
| 163 | 163 | * Excludes decorators added by the "common" option from the catalog detail basic html client |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * @see client/html/catalog/detail/basic/decorators/global |
| 234 | 234 | */ |
| 235 | 235 | |
| 236 | - return $this->createSubClient( 'catalog/detail/basic/' . $type, $name ); |
|
| 236 | + return $this->createSubClient('catalog/detail/basic/'.$type, $name); |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | |
@@ -244,6 +244,6 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | protected function getSubClientNames() |
| 246 | 246 | { |
| 247 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 247 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 248 | 248 | } |
| 249 | 249 | } |
| 250 | 250 | \ No newline at end of file |
@@ -70,13 +70,13 @@ discard block |
||
| 70 | 70 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 71 | 71 | * @return string HTML code |
| 72 | 72 | */ |
| 73 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 73 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 74 | 74 | { |
| 75 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 75 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 76 | 76 | |
| 77 | 77 | $html = ''; |
| 78 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 79 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 78 | + foreach ($this->getSubClients() as $subclient) { |
|
| 79 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 80 | 80 | } |
| 81 | 81 | $view->serviceBody = $html; |
| 82 | 82 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $tplconf = 'client/html/catalog/detail/basket/service/standard/template-body'; |
| 104 | 104 | $default = 'catalog/detail/basket-service-body-default.php'; |
| 105 | 105 | |
| 106 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 106 | + return $view->render($view->config($tplconf, $default)); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | |
@@ -115,13 +115,13 @@ discard block |
||
| 115 | 115 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 116 | 116 | * @return string|null String including HTML tags for the header on error |
| 117 | 117 | */ |
| 118 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 118 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 119 | 119 | { |
| 120 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 120 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 121 | 121 | |
| 122 | 122 | $html = ''; |
| 123 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 124 | - $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 123 | + foreach ($this->getSubClients() as $subclient) { |
|
| 124 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 125 | 125 | } |
| 126 | 126 | $view->serviceHeader = $html; |
| 127 | 127 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $tplconf = 'client/html/catalog/detail/basket/service/standard/template-header'; |
| 150 | 150 | $default = 'catalog/detail/basket-service-header-default.php'; |
| 151 | 151 | |
| 152 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 152 | + return $view->render($view->config($tplconf, $default)); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @param string|null $name Name of the sub-client (Default if null) |
| 161 | 161 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 162 | 162 | */ |
| 163 | - public function getSubClient( $type, $name = null ) |
|
| 163 | + public function getSubClient($type, $name = null) |
|
| 164 | 164 | { |
| 165 | 165 | /** client/html/catalog/detail/basket/service/decorators/excludes |
| 166 | 166 | * Excludes decorators added by the "common" option from the catalog detail basket service html client |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * @see client/html/catalog/detail/basket/service/service/decorators/global |
| 237 | 237 | */ |
| 238 | 238 | |
| 239 | - return $this->createSubClient( 'catalog/detail/basket/service/' . $type, $name ); |
|
| 239 | + return $this->createSubClient('catalog/detail/basket/service/'.$type, $name); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | */ |
| 248 | 248 | protected function getSubClientNames() |
| 249 | 249 | { |
| 250 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 250 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | |
@@ -259,9 +259,9 @@ discard block |
||
| 259 | 259 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 260 | 260 | * @return \Aimeos\MW\View\Iface Modified view object |
| 261 | 261 | */ |
| 262 | - protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null ) |
|
| 262 | + protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null) |
|
| 263 | 263 | { |
| 264 | - if( !isset( $this->cache ) ) |
|
| 264 | + if (!isset($this->cache)) |
|
| 265 | 265 | { |
| 266 | 266 | $context = $this->getContext(); |
| 267 | 267 | $config = $context->getConfig(); |
@@ -277,22 +277,22 @@ discard block |
||
| 277 | 277 | * @category Developer |
| 278 | 278 | * @see client/html/catalog/detail/basket/service/domains |
| 279 | 279 | */ |
| 280 | - $types = $config->get( 'client/html/catalog/detail/basket/service/types', array( 'delivery' ) ); |
|
| 280 | + $types = $config->get('client/html/catalog/detail/basket/service/types', array('delivery')); |
|
| 281 | 281 | |
| 282 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'service' ); |
|
| 283 | - $search = $manager->createSearch( true ); |
|
| 282 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'service'); |
|
| 283 | + $search = $manager->createSearch(true); |
|
| 284 | 284 | |
| 285 | 285 | $expr = array( |
| 286 | - $search->compare( '==', 'service.type.code', $types ), |
|
| 286 | + $search->compare('==', 'service.type.code', $types), |
|
| 287 | 287 | $search->getConditions(), |
| 288 | 288 | ); |
| 289 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 289 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 290 | 290 | |
| 291 | 291 | $sortation = array( |
| 292 | - $search->sort( '+', 'service.type.code' ), |
|
| 293 | - $search->sort( '+', 'service.position' ), |
|
| 292 | + $search->sort('+', 'service.type.code'), |
|
| 293 | + $search->sort('+', 'service.position'), |
|
| 294 | 294 | ); |
| 295 | - $search->setSortations( $sortation ); |
|
| 295 | + $search->setSortations($sortation); |
|
| 296 | 296 | |
| 297 | 297 | /** client/html/catalog/detail/basket/service/domains |
| 298 | 298 | * A list of domain names whose items should be available for the services |
@@ -309,20 +309,20 @@ discard block |
||
| 309 | 309 | * @category Developer |
| 310 | 310 | * @see client/html/catalog/detail/basket/service/types |
| 311 | 311 | */ |
| 312 | - $domains = $config->get( 'client/html/catalog/detail/basket/service/domains', array( 'text', 'price' ) ); |
|
| 312 | + $domains = $config->get('client/html/catalog/detail/basket/service/domains', array('text', 'price')); |
|
| 313 | 313 | |
| 314 | - $services = $manager->searchItems( $search, $domains ); |
|
| 314 | + $services = $manager->searchItems($search, $domains); |
|
| 315 | 315 | |
| 316 | - $this->addMetaItem( $services, 'service', $this->expire, $this->tags ); |
|
| 317 | - $this->addMetaList( array_keys( $services ), 'service', $this->expire ); |
|
| 316 | + $this->addMetaItem($services, 'service', $this->expire, $this->tags); |
|
| 317 | + $this->addMetaList(array_keys($services), 'service', $this->expire); |
|
| 318 | 318 | |
| 319 | 319 | $view->serviceItems = $services; |
| 320 | 320 | |
| 321 | 321 | $this->cache = $view; |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | - $expire = $this->expires( $this->expire, $expire ); |
|
| 325 | - $tags = array_merge( $tags, $this->tags ); |
|
| 324 | + $expire = $this->expires($this->expire, $expire); |
|
| 325 | + $tags = array_merge($tags, $this->tags); |
|
| 326 | 326 | |
| 327 | 327 | return $this->cache; |
| 328 | 328 | } |