@@ -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->treeBody = $html; |
| 82 | 82 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $tplconf = 'client/html/catalog/filter/tree/standard/template-body'; |
| 104 | 104 | $default = 'catalog/filter/tree-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->treeHeader = $html; |
| 127 | 127 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $tplconf = 'client/html/catalog/filter/tree/standard/template-header'; |
| 150 | 150 | $default = 'catalog/filter/tree-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/filter/tree/decorators/excludes |
| 166 | 166 | * Excludes decorators added by the "common" option from the catalog filter tree html client |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * @see client/html/catalog/filter/tree/decorators/global |
| 237 | 237 | */ |
| 238 | 238 | |
| 239 | - return $this->createSubClient( 'catalog/filter/tree/' . $type, $name ); |
|
| 239 | + return $this->createSubClient('catalog/filter/tree/'.$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,16 +259,16 @@ 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 | $catItems = array(); |
| 267 | 267 | $context = $this->getContext(); |
| 268 | - $controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' ); |
|
| 268 | + $controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog'); |
|
| 269 | 269 | |
| 270 | - $currentid = (string) $view->param( 'f_catid', '' ); |
|
| 271 | - $currentid = ( $currentid != '' ? $currentid : null ); |
|
| 270 | + $currentid = (string) $view->param('f_catid', ''); |
|
| 271 | + $currentid = ($currentid != '' ? $currentid : null); |
|
| 272 | 272 | |
| 273 | 273 | /** client/html/catalog/filter/tree/startid |
| 274 | 274 | * The ID of the category node that should be the root of the displayed category tree |
@@ -289,8 +289,8 @@ discard block |
||
| 289 | 289 | * @see client/html/catalog/filter/tree/levels-only |
| 290 | 290 | * @see client/html/catalog/filter/tree/domains |
| 291 | 291 | */ |
| 292 | - $startid = $view->config( 'client/html/catalog/filter/tree/startid', '' ); |
|
| 293 | - $startid = ( $startid != '' ? $startid : null ); |
|
| 292 | + $startid = $view->config('client/html/catalog/filter/tree/startid', ''); |
|
| 293 | + $startid = ($startid != '' ? $startid : null); |
|
| 294 | 294 | |
| 295 | 295 | /** client/html/catalog/filter/tree/domains |
| 296 | 296 | * List of domain names whose items should be fetched with the filter categories |
@@ -310,35 +310,35 @@ discard block |
||
| 310 | 310 | * @see client/html/catalog/filter/tree/levels-always |
| 311 | 311 | * @see client/html/catalog/filter/tree/levels-only |
| 312 | 312 | */ |
| 313 | - $ref = $view->config( 'client/html/catalog/filter/tree/domains', array( 'text', 'media' ) ); |
|
| 313 | + $ref = $view->config('client/html/catalog/filter/tree/domains', array('text', 'media')); |
|
| 314 | 314 | |
| 315 | 315 | |
| 316 | - if( $currentid ) |
|
| 316 | + if ($currentid) |
|
| 317 | 317 | { |
| 318 | - $catItems = $controller->getCatalogPath( $currentid ); |
|
| 318 | + $catItems = $controller->getCatalogPath($currentid); |
|
| 319 | 319 | |
| 320 | - if( $startid ) |
|
| 320 | + if ($startid) |
|
| 321 | 321 | { |
| 322 | - foreach( $catItems as $key => $item ) |
|
| 322 | + foreach ($catItems as $key => $item) |
|
| 323 | 323 | { |
| 324 | - if( $key == $startid ) { |
|
| 324 | + if ($key == $startid) { |
|
| 325 | 325 | break; |
| 326 | 326 | } |
| 327 | - unset( $catItems[$key] ); |
|
| 327 | + unset($catItems[$key]); |
|
| 328 | 328 | } |
| 329 | 329 | } |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | - if( ( $node = reset( $catItems ) ) === false ) |
|
| 332 | + if (($node = reset($catItems)) === false) |
|
| 333 | 333 | { |
| 334 | - $node = $controller->getCatalogTree( $startid, array(), \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ); |
|
| 335 | - $catItems = array( $node->getId() => $node ); |
|
| 334 | + $node = $controller->getCatalogTree($startid, array(), \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE); |
|
| 335 | + $catItems = array($node->getId() => $node); |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | |
| 339 | 339 | $search = $controller->createCatalogFilter(); |
| 340 | - $expr = $search->compare( '==', 'catalog.parentid', array_keys( $catItems ) ); |
|
| 341 | - $expr = $search->combine( '||', array( $expr, $search->compare( '==', 'catalog.id', $node->getId() ) ) ); |
|
| 340 | + $expr = $search->compare('==', 'catalog.parentid', array_keys($catItems)); |
|
| 341 | + $expr = $search->combine('||', array($expr, $search->compare('==', 'catalog.id', $node->getId()))); |
|
| 342 | 342 | |
| 343 | 343 | /** client/html/catalog/filter/tree/levels-always |
| 344 | 344 | * The number of levels in the category tree that should be always displayed |
@@ -364,8 +364,8 @@ discard block |
||
| 364 | 364 | * @see client/html/catalog/filter/tree/levels-only |
| 365 | 365 | * @see client/html/catalog/filter/tree/domains |
| 366 | 366 | */ |
| 367 | - if( ( $levels = $view->config( 'client/html/catalog/filter/tree/levels-always' ) ) != null ) { |
|
| 368 | - $expr = $search->combine( '||', array( $expr, $search->compare( '<=', 'catalog.level', $levels ) ) ); |
|
| 367 | + if (($levels = $view->config('client/html/catalog/filter/tree/levels-always')) != null) { |
|
| 368 | + $expr = $search->combine('||', array($expr, $search->compare('<=', 'catalog.level', $levels))); |
|
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | /** client/html/catalog/filter/tree/levels-only |
@@ -389,26 +389,26 @@ discard block |
||
| 389 | 389 | * @see client/html/catalog/filter/tree/levels-always |
| 390 | 390 | * @see client/html/catalog/filter/tree/domains |
| 391 | 391 | */ |
| 392 | - if( ( $levels = $view->config( 'client/html/catalog/filter/tree/levels-only' ) ) != null ) { |
|
| 393 | - $expr = $search->combine( '&&', array( $expr, $search->compare( '<=', 'catalog.level', $levels ) ) ); |
|
| 392 | + if (($levels = $view->config('client/html/catalog/filter/tree/levels-only')) != null) { |
|
| 393 | + $expr = $search->combine('&&', array($expr, $search->compare('<=', 'catalog.level', $levels))); |
|
| 394 | 394 | } |
| 395 | 395 | |
| 396 | - $search->setConditions( $expr ); |
|
| 396 | + $search->setConditions($expr); |
|
| 397 | 397 | |
| 398 | 398 | $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE; |
| 399 | 399 | |
| 400 | 400 | $view->treeCatalogPath = $catItems; |
| 401 | - $view->treeCatalogTree = $controller->getCatalogTree( $startid, $ref, $level, $search ); |
|
| 402 | - $view->treeCatalogIds = $this->getCatalogIds( $view->treeCatalogTree, $catItems, $currentid ); |
|
| 403 | - $view->treeFilterParams = $this->getClientParams( $view->param(), array( 'f' ) ); |
|
| 401 | + $view->treeCatalogTree = $controller->getCatalogTree($startid, $ref, $level, $search); |
|
| 402 | + $view->treeCatalogIds = $this->getCatalogIds($view->treeCatalogTree, $catItems, $currentid); |
|
| 403 | + $view->treeFilterParams = $this->getClientParams($view->param(), array('f')); |
|
| 404 | 404 | |
| 405 | - $this->addMetaItemCatalog( $view->treeCatalogTree, $this->expire, $this->tags ); |
|
| 405 | + $this->addMetaItemCatalog($view->treeCatalogTree, $this->expire, $this->tags); |
|
| 406 | 406 | |
| 407 | 407 | $this->cache = $view; |
| 408 | 408 | } |
| 409 | 409 | |
| 410 | - $expire = $this->expires( $this->expire, $expire ); |
|
| 411 | - $tags = array_merge( $tags, $this->tags ); |
|
| 410 | + $expire = $this->expires($this->expire, $expire); |
|
| 411 | + $tags = array_merge($tags, $this->tags); |
|
| 412 | 412 | |
| 413 | 413 | return $this->cache; |
| 414 | 414 | } |
@@ -425,22 +425,22 @@ discard block |
||
| 425 | 425 | * @param string $currentId Currently selected category |
| 426 | 426 | * @return array List of category IDs |
| 427 | 427 | */ |
| 428 | - protected function getCatalogIds( \Aimeos\MShop\Catalog\Item\Iface $tree, array $path, $currentId ) |
|
| 428 | + protected function getCatalogIds(\Aimeos\MShop\Catalog\Item\Iface $tree, array $path, $currentId) |
|
| 429 | 429 | { |
| 430 | - if( $tree->getId() == $currentId ) |
|
| 430 | + if ($tree->getId() == $currentId) |
|
| 431 | 431 | { |
| 432 | 432 | $ids = array(); |
| 433 | - foreach( $tree->getChildren() as $item ) { |
|
| 433 | + foreach ($tree->getChildren() as $item) { |
|
| 434 | 434 | $ids[] = $item->getId(); |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | return $ids; |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | - foreach( $tree->getChildren() as $child ) |
|
| 440 | + foreach ($tree->getChildren() as $child) |
|
| 441 | 441 | { |
| 442 | - if( isset( $path[$child->getId()] ) ) { |
|
| 443 | - return $this->getCatalogIds( $child, $path, $currentId ); |
|
| 442 | + if (isset($path[$child->getId()])) { |
|
| 443 | + return $this->getCatalogIds($child, $path, $currentId); |
|
| 444 | 444 | } |
| 445 | 445 | } |
| 446 | 446 | |
@@ -455,12 +455,12 @@ discard block |
||
| 455 | 455 | * @param string|null &$expire Expiration date that will be overwritten if an earlier date is found |
| 456 | 456 | * @param array &$tags List of tags the new tags will be added to |
| 457 | 457 | */ |
| 458 | - protected function addMetaItemCatalog( \Aimeos\MShop\Catalog\Item\Iface $tree, &$expire, array &$tags = array() ) |
|
| 458 | + protected function addMetaItemCatalog(\Aimeos\MShop\Catalog\Item\Iface $tree, &$expire, array &$tags = array()) |
|
| 459 | 459 | { |
| 460 | - $this->addMetaItem( $tree, 'catalog', $expire, $tags ); |
|
| 460 | + $this->addMetaItem($tree, 'catalog', $expire, $tags); |
|
| 461 | 461 | |
| 462 | - foreach( $tree->getChildren() as $child ) { |
|
| 463 | - $this->addMetaItemCatalog( $child, $expire, $tags ); |
|
| 462 | + foreach ($tree->getChildren() as $child) { |
|
| 463 | + $this->addMetaItemCatalog($child, $expire, $tags); |
|
| 464 | 464 | } |
| 465 | 465 | } |
| 466 | 466 | } |
@@ -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->searchBody = $html; |
| 79 | 79 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $tplconf = 'client/html/catalog/filter/search/standard/template-body'; |
| 101 | 101 | $default = 'catalog/filter/search-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->searchHeader = $html; |
| 124 | 124 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $tplconf = 'client/html/catalog/filter/search/standard/template-header'; |
| 147 | 147 | $default = 'catalog/filter/search-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/filter/search/decorators/excludes |
| 163 | 163 | * Excludes decorators added by the "common" option from the catalog filter search html client |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * @see client/html/catalog/filter/search/decorators/global |
| 234 | 234 | */ |
| 235 | 235 | |
| 236 | - return $this->createSubClient( 'catalog/filter/search/' . $type, $name ); |
|
| 236 | + return $this->createSubClient('catalog/filter/search/'.$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 |
@@ -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/filter/name |
| 37 | 37 | * Class name of the used catalog filter 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/filter/name', 'Standard' ); |
|
| 69 | + if ($name === null) { |
|
| 70 | + $name = $context->getConfig()->get('client/html/catalog/filter/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\\Filter\\' . $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\\Filter\\'.$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\\Filter\\' . $name; |
|
| 80 | + $classname = '\\Aimeos\\Client\\Html\\Catalog\\Filter\\'.$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/filter' ); |
|
| 84 | + return self::addClientDecorators($context, $client, $templatePaths, 'catalog/filter'); |
|
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @since 2014.03 |
| 92 | 92 | * @category Developer |
| 93 | 93 | */ |
| 94 | - private $subPartNames = array( 'search', 'tree', 'attribute' ); |
|
| 94 | + private $subPartNames = array('search', 'tree', 'attribute'); |
|
| 95 | 95 | private $cache; |
| 96 | 96 | |
| 97 | 97 | |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 104 | 104 | * @return string HTML code |
| 105 | 105 | */ |
| 106 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 106 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 107 | 107 | { |
| 108 | - $prefixes = array( 'f' ); |
|
| 108 | + $prefixes = array('f'); |
|
| 109 | 109 | $context = $this->getContext(); |
| 110 | 110 | |
| 111 | 111 | /** client/html/catalog/filter |
@@ -120,41 +120,41 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | $confkey = 'client/html/catalog/filter'; |
| 122 | 122 | |
| 123 | - if( $context->getUserId() != null || ( $html = $this->getCached( 'body', $uid, $prefixes, $confkey ) ) === null ) |
|
| 123 | + if ($context->getUserId() != null || ($html = $this->getCached('body', $uid, $prefixes, $confkey)) === null) |
|
| 124 | 124 | { |
| 125 | 125 | $view = $this->getView(); |
| 126 | 126 | |
| 127 | 127 | try |
| 128 | 128 | { |
| 129 | - $view = $this->setViewParams( $view, $tags, $expire ); |
|
| 129 | + $view = $this->setViewParams($view, $tags, $expire); |
|
| 130 | 130 | |
| 131 | 131 | $html = ''; |
| 132 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 133 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 132 | + foreach ($this->getSubClients() as $subclient) { |
|
| 133 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 134 | 134 | } |
| 135 | 135 | $view->filterBody = $html; |
| 136 | 136 | } |
| 137 | - catch( \Aimeos\Client\Html\Exception $e ) |
|
| 137 | + catch (\Aimeos\Client\Html\Exception $e) |
|
| 138 | 138 | { |
| 139 | - $error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) ); |
|
| 140 | - $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error; |
|
| 139 | + $error = array($context->getI18n()->dt('client', $e->getMessage())); |
|
| 140 | + $view->filterErrorList = $view->get('filterErrorList', array()) + $error; |
|
| 141 | 141 | } |
| 142 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 142 | + catch (\Aimeos\Controller\Frontend\Exception $e) |
|
| 143 | 143 | { |
| 144 | - $error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) ); |
|
| 145 | - $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error; |
|
| 144 | + $error = array($context->getI18n()->dt('controller/frontend', $e->getMessage())); |
|
| 145 | + $view->filterErrorList = $view->get('filterErrorList', array()) + $error; |
|
| 146 | 146 | } |
| 147 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 147 | + catch (\Aimeos\MShop\Exception $e) |
|
| 148 | 148 | { |
| 149 | - $error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
| 150 | - $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error; |
|
| 149 | + $error = array($context->getI18n()->dt('mshop', $e->getMessage())); |
|
| 150 | + $view->filterErrorList = $view->get('filterErrorList', array()) + $error; |
|
| 151 | 151 | } |
| 152 | - catch( \Exception $e ) |
|
| 152 | + catch (\Exception $e) |
|
| 153 | 153 | { |
| 154 | - $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() ); |
|
| 154 | + $context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString()); |
|
| 155 | 155 | |
| 156 | - $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) ); |
|
| 157 | - $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error; |
|
| 156 | + $error = array($context->getI18n()->dt('client', 'A non-recoverable error occured')); |
|
| 157 | + $view->filterErrorList = $view->get('filterErrorList', array()) + $error; |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | /** client/html/catalog/filter/standard/template-body |
@@ -180,13 +180,13 @@ discard block |
||
| 180 | 180 | $tplconf = 'client/html/catalog/filter/standard/template-body'; |
| 181 | 181 | $default = 'catalog/filter/body-default.php'; |
| 182 | 182 | |
| 183 | - $html = $view->render( $view->config( $tplconf, $default ) ); |
|
| 183 | + $html = $view->render($view->config($tplconf, $default)); |
|
| 184 | 184 | |
| 185 | - $this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire ); |
|
| 185 | + $this->setCached('body', $uid, $prefixes, $confkey, $html, $tags, $expire); |
|
| 186 | 186 | } |
| 187 | 187 | else |
| 188 | 188 | { |
| 189 | - $html = $this->modifyBody( $html, $uid ); |
|
| 189 | + $html = $this->modifyBody($html, $uid); |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | return $html; |
@@ -201,35 +201,35 @@ discard block |
||
| 201 | 201 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 202 | 202 | * @return string|null String including HTML tags for the header on error |
| 203 | 203 | */ |
| 204 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 204 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 205 | 205 | { |
| 206 | - if( self::$headerSingleton !== null ) { |
|
| 206 | + if (self::$headerSingleton !== null) { |
|
| 207 | 207 | return ''; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | self::$headerSingleton = true; |
| 211 | 211 | |
| 212 | - $prefixes = array( 'f' ); |
|
| 212 | + $prefixes = array('f'); |
|
| 213 | 213 | $context = $this->getContext(); |
| 214 | 214 | $confkey = 'client/html/catalog/filter'; |
| 215 | 215 | |
| 216 | - if( $context->getUserId() != null || ( $html = $this->getCached( 'header', $uid, $prefixes, $confkey ) ) === null ) |
|
| 216 | + if ($context->getUserId() != null || ($html = $this->getCached('header', $uid, $prefixes, $confkey)) === null) |
|
| 217 | 217 | { |
| 218 | 218 | $view = $this->getView(); |
| 219 | 219 | |
| 220 | 220 | try |
| 221 | 221 | { |
| 222 | - $view = $this->setViewParams( $view, $tags, $expire ); |
|
| 222 | + $view = $this->setViewParams($view, $tags, $expire); |
|
| 223 | 223 | |
| 224 | 224 | $html = ''; |
| 225 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 226 | - $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 225 | + foreach ($this->getSubClients() as $subclient) { |
|
| 226 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 227 | 227 | } |
| 228 | 228 | $view->filterHeader = $html; |
| 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 | 234 | |
| 235 | 235 | /** client/html/catalog/filter/standard/template-header |
@@ -256,13 +256,13 @@ discard block |
||
| 256 | 256 | $tplconf = 'client/html/catalog/filter/standard/template-header'; |
| 257 | 257 | $default = 'catalog/filter/header-default.php'; |
| 258 | 258 | |
| 259 | - $html = $view->render( $view->config( $tplconf, $default ) ); |
|
| 259 | + $html = $view->render($view->config($tplconf, $default)); |
|
| 260 | 260 | |
| 261 | - $this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire ); |
|
| 261 | + $this->setCached('header', $uid, $prefixes, $confkey, $html, $tags, $expire); |
|
| 262 | 262 | } |
| 263 | 263 | else |
| 264 | 264 | { |
| 265 | - $html = $this->modifyHeader( $html, $uid ); |
|
| 265 | + $html = $this->modifyHeader($html, $uid); |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | return $html; |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | * @param string|null $name Name of the sub-client (Default if null) |
| 277 | 277 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 278 | 278 | */ |
| 279 | - public function getSubClient( $type, $name = null ) |
|
| 279 | + public function getSubClient($type, $name = null) |
|
| 280 | 280 | { |
| 281 | 281 | /** client/html/catalog/filter/decorators/excludes |
| 282 | 282 | * Excludes decorators added by the "common" option from the catalog filter html client |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | * @see client/html/catalog/filter/decorators/global |
| 353 | 353 | */ |
| 354 | 354 | |
| 355 | - return $this->createSubClient( 'catalog/filter/' . $type, $name ); |
|
| 355 | + return $this->createSubClient('catalog/filter/'.$type, $name); |
|
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | |
@@ -363,11 +363,11 @@ discard block |
||
| 363 | 363 | * @param string $uid Unique identifier for the output if the content is placed more than once on the same page |
| 364 | 364 | * @return string Modified body content |
| 365 | 365 | */ |
| 366 | - public function modifyBody( $content, $uid ) |
|
| 366 | + public function modifyBody($content, $uid) |
|
| 367 | 367 | { |
| 368 | - $content = parent::modifyBody( $content, $uid ); |
|
| 368 | + $content = parent::modifyBody($content, $uid); |
|
| 369 | 369 | |
| 370 | - return $this->replaceSection( $content, $this->getView()->csrf()->formfield(), 'catalog.filter.csrf' ); |
|
| 370 | + return $this->replaceSection($content, $this->getView()->csrf()->formfield(), 'catalog.filter.csrf'); |
|
| 371 | 371 | } |
| 372 | 372 | |
| 373 | 373 | |
@@ -385,34 +385,34 @@ discard block |
||
| 385 | 385 | { |
| 386 | 386 | parent::process(); |
| 387 | 387 | } |
| 388 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 388 | + catch (\Aimeos\MShop\Exception $e) |
|
| 389 | 389 | { |
| 390 | - $error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
| 391 | - $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error; |
|
| 390 | + $error = array($context->getI18n()->dt('mshop', $e->getMessage())); |
|
| 391 | + $view->filterErrorList = $view->get('filterErrorList', array()) + $error; |
|
| 392 | 392 | } |
| 393 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 393 | + catch (\Aimeos\Controller\Frontend\Exception $e) |
|
| 394 | 394 | { |
| 395 | - $error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) ); |
|
| 396 | - $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error; |
|
| 395 | + $error = array($context->getI18n()->dt('controller/frontend', $e->getMessage())); |
|
| 396 | + $view->filterErrorList = $view->get('filterErrorList', array()) + $error; |
|
| 397 | 397 | } |
| 398 | - catch( \Aimeos\Client\Html\Exception $e ) |
|
| 398 | + catch (\Aimeos\Client\Html\Exception $e) |
|
| 399 | 399 | { |
| 400 | - $error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) ); |
|
| 401 | - $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error; |
|
| 400 | + $error = array($context->getI18n()->dt('client', $e->getMessage())); |
|
| 401 | + $view->filterErrorList = $view->get('filterErrorList', array()) + $error; |
|
| 402 | 402 | } |
| 403 | - catch( \Exception $e ) |
|
| 403 | + catch (\Exception $e) |
|
| 404 | 404 | { |
| 405 | - $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() ); |
|
| 405 | + $context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString()); |
|
| 406 | 406 | |
| 407 | - $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) ); |
|
| 408 | - $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error; |
|
| 407 | + $error = array($context->getI18n()->dt('client', 'A non-recoverable error occured')); |
|
| 408 | + $view->filterErrorList = $view->get('filterErrorList', array()) + $error; |
|
| 409 | 409 | } |
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | |
| 413 | 413 | protected function getSubClientNames() |
| 414 | 414 | { |
| 415 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 415 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 416 | 416 | } |
| 417 | 417 | |
| 418 | 418 | |
@@ -424,9 +424,9 @@ discard block |
||
| 424 | 424 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 425 | 425 | * @return \Aimeos\MW\View\Iface Modified view object |
| 426 | 426 | */ |
| 427 | - protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null ) |
|
| 427 | + protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null) |
|
| 428 | 428 | { |
| 429 | - if( !isset( $this->cache ) ) |
|
| 429 | + if (!isset($this->cache)) |
|
| 430 | 430 | { |
| 431 | 431 | $config = $this->getContext()->getConfig(); |
| 432 | 432 | |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | * @see client/html/catalog/count/url/action |
| 452 | 452 | * @see client/html/catalog/count/url/config |
| 453 | 453 | */ |
| 454 | - if( $config->get( 'client/html/catalog/count/enable', true ) == true ) |
|
| 454 | + if ($config->get('client/html/catalog/count/enable', true) == true) |
|
| 455 | 455 | { |
| 456 | 456 | /** client/html/catalog/count/url/target |
| 457 | 457 | * Destination of the URL where the controller specified in the URL is known |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | * @see client/html/catalog/count/url/action |
| 468 | 468 | * @see client/html/catalog/count/url/config |
| 469 | 469 | */ |
| 470 | - $target = $config->get( 'client/html/catalog/count/url/target' ); |
|
| 470 | + $target = $config->get('client/html/catalog/count/url/target'); |
|
| 471 | 471 | |
| 472 | 472 | /** client/html/catalog/count/url/controller |
| 473 | 473 | * Name of the controller whose action should be called |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | * @see client/html/catalog/count/url/action |
| 484 | 484 | * @see client/html/catalog/count/url/config |
| 485 | 485 | */ |
| 486 | - $controller = $config->get( 'client/html/catalog/count/url/controller', 'catalog' ); |
|
| 486 | + $controller = $config->get('client/html/catalog/count/url/controller', 'catalog'); |
|
| 487 | 487 | |
| 488 | 488 | /** client/html/catalog/count/url/action |
| 489 | 489 | * Name of the action that should create the output |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | * @see client/html/catalog/count/url/controller |
| 500 | 500 | * @see client/html/catalog/count/url/config |
| 501 | 501 | */ |
| 502 | - $action = $config->get( 'client/html/catalog/count/url/action', 'count' ); |
|
| 502 | + $action = $config->get('client/html/catalog/count/url/action', 'count'); |
|
| 503 | 503 | |
| 504 | 504 | /** client/html/catalog/count/url/config |
| 505 | 505 | * Associative list of configuration options used for generating the URL |
@@ -522,11 +522,11 @@ discard block |
||
| 522 | 522 | * @see client/html/catalog/count/url/action |
| 523 | 523 | * @see client/html/url/config |
| 524 | 524 | */ |
| 525 | - $config = $config->get( 'client/html/catalog/count/url/config', array() ); |
|
| 525 | + $config = $config->get('client/html/catalog/count/url/config', array()); |
|
| 526 | 526 | |
| 527 | - $params = $this->getClientParams( $view->param(), array( 'f' ) ); |
|
| 527 | + $params = $this->getClientParams($view->param(), array('f')); |
|
| 528 | 528 | |
| 529 | - $view->filterCountUrl = $view->url( $target, $controller, $action, $params, array(), $config ); |
|
| 529 | + $view->filterCountUrl = $view->url($target, $controller, $action, $params, array(), $config); |
|
| 530 | 530 | } |
| 531 | 531 | |
| 532 | 532 | $this->cache = $view; |
@@ -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->retryBody = $html; |
| 79 | 79 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $tplconf = 'client/html/checkout/confirm/retry/standard/template-body'; |
| 101 | 101 | $default = 'checkout/confirm/retry-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->retryHeader = $html; |
| 124 | 124 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $tplconf = 'client/html/checkout/confirm/retry/standard/template-header'; |
| 147 | 147 | $default = 'checkout/confirm/retry-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/checkout/confirm/retry/decorators/excludes |
| 163 | 163 | * Excludes decorators added by the "common" option from the checkout confirm retry html client |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * @see client/html/checkout/confirm/retry/decorators/global |
| 234 | 234 | */ |
| 235 | 235 | |
| 236 | - return $this->createSubClient( 'checkout/confirm/retry/' . $type, $name ); |
|
| 236 | + return $this->createSubClient('checkout/confirm/retry/'.$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 |
@@ -65,13 +65,13 @@ discard block |
||
| 65 | 65 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 66 | 66 | * @return string HTML code |
| 67 | 67 | */ |
| 68 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 68 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 69 | 69 | { |
| 70 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 70 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 71 | 71 | |
| 72 | 72 | $html = ''; |
| 73 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 74 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 73 | + foreach ($this->getSubClients() as $subclient) { |
|
| 74 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 75 | 75 | } |
| 76 | 76 | $view->serviceBody = $html; |
| 77 | 77 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $tplconf = 'client/html/checkout/confirm/order/service/standard/template-body'; |
| 100 | 100 | $default = 'common/summary/service-body-default.php'; |
| 101 | 101 | |
| 102 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 102 | + return $view->render($view->config($tplconf, $default)); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | |
@@ -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|null String including HTML tags for the header on error |
| 113 | 113 | */ |
| 114 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 114 | + public function getHeader($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 )->getHeader( $uid, $tags, $expire ); |
|
| 119 | + foreach ($this->getSubClients() as $subclient) { |
|
| 120 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 121 | 121 | } |
| 122 | 122 | $view->serviceHeader = $html; |
| 123 | 123 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $tplconf = 'client/html/checkout/confirm/order/service/standard/template-header'; |
| 147 | 147 | $default = 'common/summary/service-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/checkout/confirm/order/service/decorators/excludes |
| 163 | 163 | * Excludes decorators added by the "common" option from the checkout confirm order service html client |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * @see client/html/checkout/confirm/order/service/decorators/global |
| 234 | 234 | */ |
| 235 | 235 | |
| 236 | - return $this->createSubClient( 'checkout/confirm/order/service/' . $type, $name ); |
|
| 236 | + return $this->createSubClient('checkout/confirm/order/service/'.$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 |
@@ -65,13 +65,13 @@ discard block |
||
| 65 | 65 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 66 | 66 | * @return string HTML code |
| 67 | 67 | */ |
| 68 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 68 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 69 | 69 | { |
| 70 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 70 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 71 | 71 | |
| 72 | 72 | $html = ''; |
| 73 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 74 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 73 | + foreach ($this->getSubClients() as $subclient) { |
|
| 74 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 75 | 75 | } |
| 76 | 76 | $view->couponBody = $html; |
| 77 | 77 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $tplconf = 'client/html/checkout/confirm/order/coupon/standard/template-body'; |
| 100 | 100 | $default = 'common/summary/coupon-body-default.php'; |
| 101 | 101 | |
| 102 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 102 | + return $view->render($view->config($tplconf, $default)); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | |
@@ -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|null String including HTML tags for the header on error |
| 113 | 113 | */ |
| 114 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 114 | + public function getHeader($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 )->getHeader( $uid, $tags, $expire ); |
|
| 119 | + foreach ($this->getSubClients() as $subclient) { |
|
| 120 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 121 | 121 | } |
| 122 | 122 | $view->couponHeader = $html; |
| 123 | 123 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $tplconf = 'client/html/checkout/confirm/order/coupon/standard/template-header'; |
| 147 | 147 | $default = 'common/summary/coupon-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/checkout/confirm/order/coupon/decorators/excludes |
| 163 | 163 | * Excludes decorators added by the "common" option from the checkout confirm order coupon html client |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * @see client/html/checkout/confirm/order/coupon/decorators/global |
| 234 | 234 | */ |
| 235 | 235 | |
| 236 | - return $this->createSubClient( 'checkout/confirm/order/coupon/' . $type, $name ); |
|
| 236 | + return $this->createSubClient('checkout/confirm/order/coupon/'.$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 |
@@ -66,13 +66,13 @@ discard block |
||
| 66 | 66 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 67 | 67 | * @return string HTML code |
| 68 | 68 | */ |
| 69 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 69 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 70 | 70 | { |
| 71 | - $view = $this->setViewParams( $this->getView(), $tags, $expire ); |
|
| 71 | + $view = $this->setViewParams($this->getView(), $tags, $expire); |
|
| 72 | 72 | |
| 73 | 73 | $html = ''; |
| 74 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 75 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 74 | + foreach ($this->getSubClients() as $subclient) { |
|
| 75 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 76 | 76 | } |
| 77 | 77 | $view->detailBody = $html; |
| 78 | 78 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $tplconf = 'client/html/checkout/confirm/order/detail/standard/template-body'; |
| 101 | 101 | $default = 'common/summary/detail-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->detailHeader = $html; |
| 124 | 124 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $tplconf = 'client/html/checkout/confirm/order/detail/standard/template-header'; |
| 148 | 148 | $default = 'common/summary/detail-header-default.php'; |
| 149 | 149 | |
| 150 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 150 | + return $view->render($view->config($tplconf, $default)); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | * @param string|null $name Name of the sub-client (Default if null) |
| 159 | 159 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 160 | 160 | */ |
| 161 | - public function getSubClient( $type, $name = null ) |
|
| 161 | + public function getSubClient($type, $name = null) |
|
| 162 | 162 | { |
| 163 | 163 | /** client/html/checkout/confirm/order/detail/decorators/excludes |
| 164 | 164 | * Excludes decorators added by the "common" option from the checkout confirm order detail html client |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | * @see client/html/checkout/confirm/order/detail/decorators/global |
| 235 | 235 | */ |
| 236 | 236 | |
| 237 | - return $this->createSubClient( 'checkout/confirm/order/detail/' . $type, $name ); |
|
| 237 | + return $this->createSubClient('checkout/confirm/order/detail/'.$type, $name); |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | */ |
| 246 | 246 | protected function getSubClientNames() |
| 247 | 247 | { |
| 248 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 248 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | |
@@ -257,17 +257,17 @@ discard block |
||
| 257 | 257 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 258 | 258 | * @return \Aimeos\MW\View\Iface Modified view object |
| 259 | 259 | */ |
| 260 | - protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null ) |
|
| 260 | + protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null) |
|
| 261 | 261 | { |
| 262 | - if( !isset( $this->cache ) ) |
|
| 262 | + if (!isset($this->cache)) |
|
| 263 | 263 | { |
| 264 | - $view = parent::setViewParams( $view ); |
|
| 264 | + $view = parent::setViewParams($view); |
|
| 265 | 265 | |
| 266 | - if( $view->confirmOrderItem->getPaymentStatus() >= $this->getDownloadPaymentStatus() ) { |
|
| 266 | + if ($view->confirmOrderItem->getPaymentStatus() >= $this->getDownloadPaymentStatus()) { |
|
| 267 | 267 | $view->summaryShowDownloadAttributes = true; |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | - $view->summaryTaxRates = $this->getTaxRates( $view->summaryBasket ); |
|
| 270 | + $view->summaryTaxRates = $this->getTaxRates($view->summaryBasket); |
|
| 271 | 271 | |
| 272 | 272 | $this->cache = $view; |
| 273 | 273 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | * @since 2015.02 |
| 100 | 100 | * @category Developer |
| 101 | 101 | */ |
| 102 | - private $subPartNames = array( 'address', 'service', 'coupon', 'detail' ); |
|
| 102 | + private $subPartNames = array('address', 'service', 'coupon', 'detail'); |
|
| 103 | 103 | |
| 104 | 104 | private $cache; |
| 105 | 105 | |
@@ -112,14 +112,14 @@ 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 HTML code |
| 114 | 114 | */ |
| 115 | - public function getBody( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 115 | + public function getBody($uid = '', array &$tags = array(), &$expire = null) |
|
| 116 | 116 | { |
| 117 | 117 | $view = $this->getView(); |
| 118 | - $view = $this->setViewParams( $view, $tags, $expire ); |
|
| 118 | + $view = $this->setViewParams($view, $tags, $expire); |
|
| 119 | 119 | |
| 120 | 120 | $html = ''; |
| 121 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 122 | - $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire ); |
|
| 121 | + foreach ($this->getSubClients() as $subclient) { |
|
| 122 | + $html .= $subclient->setView($view)->getBody($uid, $tags, $expire); |
|
| 123 | 123 | } |
| 124 | 124 | $view->orderBody = $html; |
| 125 | 125 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $tplconf = 'client/html/checkout/confirm/order/standard/template-body'; |
| 147 | 147 | $default = 'checkout/confirm/order-body-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 | |
@@ -158,14 +158,14 @@ discard block |
||
| 158 | 158 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 159 | 159 | * @return string|null String including HTML tags for the header on error |
| 160 | 160 | */ |
| 161 | - public function getHeader( $uid = '', array &$tags = array(), &$expire = null ) |
|
| 161 | + public function getHeader($uid = '', array &$tags = array(), &$expire = null) |
|
| 162 | 162 | { |
| 163 | 163 | $view = $this->getView(); |
| 164 | - $view = $this->setViewParams( $view, $tags, $expire ); |
|
| 164 | + $view = $this->setViewParams($view, $tags, $expire); |
|
| 165 | 165 | |
| 166 | 166 | $html = ''; |
| 167 | - foreach( $this->getSubClients() as $subclient ) { |
|
| 168 | - $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire ); |
|
| 167 | + foreach ($this->getSubClients() as $subclient) { |
|
| 168 | + $html .= $subclient->setView($view)->getHeader($uid, $tags, $expire); |
|
| 169 | 169 | } |
| 170 | 170 | $view->orderHeader = $html; |
| 171 | 171 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $tplconf = 'client/html/checkout/confirm/order/standard/template-header'; |
| 194 | 194 | $default = 'checkout/confirm/order-header-default.php'; |
| 195 | 195 | |
| 196 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
| 196 | + return $view->render($view->config($tplconf, $default)); |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | * @param string|null $name Name of the sub-client (Default if null) |
| 205 | 205 | * @return \Aimeos\Client\Html\Iface Sub-client object |
| 206 | 206 | */ |
| 207 | - public function getSubClient( $type, $name = null ) |
|
| 207 | + public function getSubClient($type, $name = null) |
|
| 208 | 208 | { |
| 209 | 209 | /** client/html/checkout/confirm/order/decorators/excludes |
| 210 | 210 | * Excludes decorators added by the "common" option from the checkout confirm order html client |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | * @see client/html/checkout/confirm/order/decorators/global |
| 281 | 281 | */ |
| 282 | 282 | |
| 283 | - return $this->createSubClient( 'checkout/confirm/order/' . $type, $name ); |
|
| 283 | + return $this->createSubClient('checkout/confirm/order/'.$type, $name); |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | */ |
| 292 | 292 | protected function getSubClientNames() |
| 293 | 293 | { |
| 294 | - return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames ); |
|
| 294 | + return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames); |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | |
@@ -303,16 +303,16 @@ discard block |
||
| 303 | 303 | * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry) |
| 304 | 304 | * @return \Aimeos\MW\View\Iface Modified view object |
| 305 | 305 | */ |
| 306 | - protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null ) |
|
| 306 | + protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null) |
|
| 307 | 307 | { |
| 308 | - if( !isset( $this->cache ) ) |
|
| 308 | + if (!isset($this->cache)) |
|
| 309 | 309 | { |
| 310 | - if( isset( $view->confirmOrderItem ) ) |
|
| 310 | + if (isset($view->confirmOrderItem)) |
|
| 311 | 311 | { |
| 312 | 312 | $context = $this->getContext(); |
| 313 | - $manager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' ); |
|
| 313 | + $manager = \Aimeos\MShop\Factory::createManager($context, 'order/base'); |
|
| 314 | 314 | |
| 315 | - $view->summaryBasket = $manager->load( $view->confirmOrderItem->getBaseId() ); |
|
| 315 | + $view->summaryBasket = $manager->load($view->confirmOrderItem->getBaseId()); |
|
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | $this->cache = $view; |