Completed
Push — master ( 37ef18...cbde41 )
by Aimeos
06:05
created
client/html/src/Client/Html/Catalog/Stage/Standard.php 4 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
201 201
 	 * @param array &$tags Result array for the list of tags that are associated to the output
202 202
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
203
-	 * @return string|null String including HTML tags for the header on error
203
+	 * @return string String including HTML tags for the header on error
204 204
 	 */
205 205
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
206 206
 	{
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 	 * Returns the parameters used by the html client.
394 394
 	 *
395 395
 	 * @param array $params Associative list of all parameters
396
-	 * @param array $prefixes List of prefixes the parameters must start with
396
+	 * @param string[] $prefixes List of prefixes the parameters must start with
397 397
 	 * @return array Associative list of parameters used by the html client
398 398
 	 */
399 399
 	protected function getClientParams( array $params, array $prefixes = array( 'f', 'l', 'd', 'a' ) )
Please login to merge, or discard this patch.
Indentation   +475 added lines, -475 removed lines patch added patch discarded remove patch
@@ -19,480 +19,480 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	/** client/html/catalog/stage/standard/subparts
26
-	 * List of HTML sub-clients rendered within the catalog stage section
27
-	 *
28
-	 * The output of the frontend is composed of the code generated by the HTML
29
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
30
-	 * that are responsible for rendering certain sub-parts of the output. The
31
-	 * sub-clients can contain HTML clients themselves and therefore a
32
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
33
-	 * the output that is placed inside the container of its parent.
34
-	 *
35
-	 * At first, always the HTML code generated by the parent is printed, then
36
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
37
-	 * determines the order of the output of these sub-clients inside the parent
38
-	 * container. If the configured list of clients is
39
-	 *
40
-	 *  array( "subclient1", "subclient2" )
41
-	 *
42
-	 * you can easily change the order of the output by reordering the subparts:
43
-	 *
44
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
45
-	 *
46
-	 * You can also remove one or more parts if they shouldn't be rendered:
47
-	 *
48
-	 *  client/html/<clients>/subparts = array( "subclient1" )
49
-	 *
50
-	 * As the clients only generates structural HTML, the layout defined via CSS
51
-	 * should support adding, removing or reordering content by a fluid like
52
-	 * design.
53
-	 *
54
-	 * @param array List of sub-client names
55
-	 * @since 2014.03
56
-	 * @category Developer
57
-	 */
58
-	private $subPartPath = 'client/html/catalog/stage/standard/subparts';
59
-
60
-	/** client/html/catalog/stage/image/name
61
-	 * Name of the image part used by the catalog stage client implementation
62
-	 *
63
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Stage\Image\Myname".
64
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
65
-	 *
66
-	 * @param string Last part of the client class name
67
-	 * @since 2014.03
68
-	 * @category Developer
69
-	 */
70
-
71
-	/** client/html/catalog/stage/breadcrumb/name
72
-	 * Name of the breadcrumb part used by the catalog stage client implementation
73
-	 *
74
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Stage\Breadcrumb\Myname".
75
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
76
-	 *
77
-	 * @param string Last part of the client class name
78
-	 * @since 2014.03
79
-	 * @category Developer
80
-	 */
81
-
82
-	/** client/html/catalog/stage/navigator/name
83
-	 * Name of the navigator part used by the catalog stage client implementation
84
-	 *
85
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Stage\Breadcrumb\Myname".
86
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
87
-	 *
88
-	 * @param string Last part of the client class name
89
-	 * @since 2014.09
90
-	 * @category Developer
91
-	 */
92
-	private $subPartNames = array( 'image', 'breadcrumb', 'navigator' );
93
-
94
-	private $tags = array();
95
-	private $expire;
96
-	private $cache;
97
-
98
-
99
-	/**
100
-	 * Returns the HTML code for insertion into the body.
101
-	 *
102
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
103
-	 * @param array &$tags Result array for the list of tags that are associated to the output
104
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
105
-	 * @return string HTML code
106
-	 */
107
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
108
-	{
109
-		$prefixes = array( 'f' );
110
-		$context = $this->getContext();
111
-
112
-		/** client/html/catalog/stage
113
-		 * All parameters defined for the catalog stage component and its subparts
114
-		 *
115
-		 * This returns all settings related to the stage component.
116
-		 * Please refer to the single settings for details.
117
-		 *
118
-		 * @param array Associative list of name/value settings
119
-		 * @category Developer
120
-		 * @see client/html/catalog#stage
121
-		 */
122
-		$confkey = 'client/html/catalog/stage';
123
-
124
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'body', $uid, $prefixes, $confkey ) ) === null )
125
-		{
126
-			$view = $this->getView();
127
-
128
-			try
129
-			{
130
-				$view = $this->setViewParams( $view, $tags, $expire );
131
-
132
-				$output = '';
133
-				foreach( $this->getSubClients() as $subclient ) {
134
-					$output .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
135
-				}
136
-				$view->stageBody = $output;
137
-			}
138
-			catch( \Aimeos\Client\Html\Exception $e )
139
-			{
140
-				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
141
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
142
-			}
143
-			catch( \Aimeos\Controller\Frontend\Exception $e )
144
-			{
145
-				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
146
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
147
-			}
148
-			catch( \Aimeos\MShop\Exception $e )
149
-			{
150
-				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
151
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
152
-			}
153
-			catch( \Exception $e )
154
-			{
155
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
156
-
157
-				$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
158
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
159
-			}
160
-
161
-			/** client/html/catalog/stage/standard/template-body
162
-			 * Relative path to the HTML body template of the catalog stage client.
163
-			 *
164
-			 * The template file contains the HTML code and processing instructions
165
-			 * to generate the result shown in the body of the frontend. The
166
-			 * configuration string is the path to the template file relative
167
-			 * to the templates directory (usually in client/html/templates).
168
-			 *
169
-			 * You can overwrite the template file configuration in extensions and
170
-			 * provide alternative templates. These alternative templates should be
171
-			 * named like the default one but with the string "standard" replaced by
172
-			 * an unique name. You may use the name of your project for this. If
173
-			 * you've implemented an alternative client class as well, "standard"
174
-			 * should be replaced by the name of the new class.
175
-			 *
176
-			 * @param string Relative path to the template creating code for the HTML page body
177
-			 * @since 2014.03
178
-			 * @category Developer
179
-			 * @see client/html/catalog/stage/standard/template-header
180
-			 */
181
-			$tplconf = 'client/html/catalog/stage/standard/template-body';
182
-			$default = 'catalog/stage/body-default.php';
183
-
184
-			$html = $view->render( $view->config( $tplconf, $default ) );
185
-
186
-			$this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
187
-		}
188
-		else
189
-		{
190
-			$html = $this->modifyBody( $html, $uid );
191
-		}
192
-
193
-		return $html;
194
-	}
195
-
196
-
197
-	/**
198
-	 * Returns the HTML string for insertion into the header.
199
-	 *
200
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
201
-	 * @param array &$tags Result array for the list of tags that are associated to the output
202
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
203
-	 * @return string|null String including HTML tags for the header on error
204
-	 */
205
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
206
-	{
207
-		$prefixes = array( 'f' );
208
-		$context = $this->getContext();
209
-		$confkey = 'client/html/catalog/stage';
210
-
211
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'header', $uid, $prefixes, $confkey ) ) === null )
212
-		{
213
-			$view = $this->getView();
214
-
215
-			try
216
-			{
217
-				$view = $this->setViewParams( $view, $tags, $expire );
218
-
219
-				$html = '';
220
-				foreach( $this->getSubClients() as $subclient ) {
221
-					$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
222
-				}
223
-				$view->stageHeader = $html;
224
-			}
225
-			catch( \Exception $e )
226
-			{
227
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
228
-			}
229
-
230
-			/** client/html/catalog/stage/standard/template-header
231
-			 * Relative path to the HTML header template of the catalog stage client.
232
-			 *
233
-			 * The template file contains the HTML code and processing instructions
234
-			 * to generate the HTML code that is inserted into the HTML page header
235
-			 * of the rendered page in the frontend. The configuration string is the
236
-			 * path to the template file relative to the templates directory (usually
237
-			 * in client/html/templates).
238
-			 *
239
-			 * You can overwrite the template file configuration in extensions and
240
-			 * provide alternative templates. These alternative templates should be
241
-			 * named like the default one but with the string "standard" replaced by
242
-			 * an unique name. You may use the name of your project for this. If
243
-			 * you've implemented an alternative client class as well, "standard"
244
-			 * should be replaced by the name of the new class.
245
-			 *
246
-			 * @param string Relative path to the template creating code for the HTML page head
247
-			 * @since 2014.03
248
-			 * @category Developer
249
-			 * @see client/html/catalog/stage/standard/template-body
250
-			 */
251
-			$tplconf = 'client/html/catalog/stage/standard/template-header';
252
-			$default = 'catalog/stage/header-default.php';
253
-
254
-			$html = $view->render( $view->config( $tplconf, $default ) );
255
-
256
-			$this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
257
-		}
258
-		else
259
-		{
260
-			$html = $this->modifyHeader( $html, $uid );
261
-		}
262
-
263
-		return $html;
264
-	}
265
-
266
-
267
-	/**
268
-	 * Returns the sub-client given by its name.
269
-	 *
270
-	 * @param string $type Name of the client type
271
-	 * @param string|null $name Name of the sub-client (Default if null)
272
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
273
-	 */
274
-	public function getSubClient( $type, $name = null )
275
-	{
276
-		/** client/html/catalog/stage/decorators/excludes
277
-		 * Excludes decorators added by the "common" option from the catalog stage html client
278
-		 *
279
-		 * Decorators extend the functionality of a class by adding new aspects
280
-		 * (e.g. log what is currently done), executing the methods of the underlying
281
-		 * class only in certain conditions (e.g. only for logged in users) or
282
-		 * modify what is returned to the caller.
283
-		 *
284
-		 * This option allows you to remove a decorator added via
285
-		 * "client/html/common/decorators/default" before they are wrapped
286
-		 * around the html client.
287
-		 *
288
-		 *  client/html/catalog/stage/decorators/excludes = array( 'decorator1' )
289
-		 *
290
-		 * This would remove the decorator named "decorator1" from the list of
291
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
292
-		 * "client/html/common/decorators/default" to the html client.
293
-		 *
294
-		 * @param array List of decorator names
295
-		 * @since 2014.05
296
-		 * @category Developer
297
-		 * @see client/html/common/decorators/default
298
-		 * @see client/html/catalog/stage/decorators/global
299
-		 * @see client/html/catalog/stage/decorators/local
300
-		 */
301
-
302
-		/** client/html/catalog/stage/decorators/global
303
-		 * Adds a list of globally available decorators only to the catalog stage html client
304
-		 *
305
-		 * Decorators extend the functionality of a class by adding new aspects
306
-		 * (e.g. log what is currently done), executing the methods of the underlying
307
-		 * class only in certain conditions (e.g. only for logged in users) or
308
-		 * modify what is returned to the caller.
309
-		 *
310
-		 * This option allows you to wrap global decorators
311
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
312
-		 *
313
-		 *  client/html/catalog/stage/decorators/global = array( 'decorator1' )
314
-		 *
315
-		 * This would add the decorator named "decorator1" defined by
316
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
317
-		 *
318
-		 * @param array List of decorator names
319
-		 * @since 2014.05
320
-		 * @category Developer
321
-		 * @see client/html/common/decorators/default
322
-		 * @see client/html/catalog/stage/decorators/excludes
323
-		 * @see client/html/catalog/stage/decorators/local
324
-		 */
325
-
326
-		/** client/html/catalog/stage/decorators/local
327
-		 * Adds a list of local decorators only to the catalog stage html client
328
-		 *
329
-		 * Decorators extend the functionality of a class by adding new aspects
330
-		 * (e.g. log what is currently done), executing the methods of the underlying
331
-		 * class only in certain conditions (e.g. only for logged in users) or
332
-		 * modify what is returned to the caller.
333
-		 *
334
-		 * This option allows you to wrap local decorators
335
-		 * ("\Aimeos\Client\Html\Catalog\Decorator\*") around the html client.
336
-		 *
337
-		 *  client/html/catalog/stage/decorators/local = array( 'decorator2' )
338
-		 *
339
-		 * This would add the decorator named "decorator2" defined by
340
-		 * "\Aimeos\Client\Html\Catalog\Decorator\Decorator2" only to the html client.
341
-		 *
342
-		 * @param array List of decorator names
343
-		 * @since 2014.05
344
-		 * @category Developer
345
-		 * @see client/html/common/decorators/default
346
-		 * @see client/html/catalog/stage/decorators/excludes
347
-		 * @see client/html/catalog/stage/decorators/global
348
-		 */
349
-		return $this->createSubClient( 'catalog/stage/' . $type, $name );
350
-	}
351
-
352
-
353
-	/**
354
-	 * Processes the input, e.g. store given values.
355
-	 * A view must be available and this method doesn't generate any output
356
-	 * besides setting view variables.
357
-	 */
358
-	public function process()
359
-	{
360
-		$view = $this->getView();
361
-
362
-		try
363
-		{
364
-			parent::process();
365
-		}
366
-		catch( \Aimeos\Client\Html\Exception $e )
367
-		{
368
-			$error = array( $this->getContext()->getI18n()->dt( 'client', $e->getMessage() ) );
369
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
370
-		}
371
-		catch( \Aimeos\Controller\Frontend\Exception $e )
372
-		{
373
-			$error = array( $this->getContext()->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
374
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
375
-		}
376
-		catch( \Aimeos\MShop\Exception $e )
377
-		{
378
-			$error = array( $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
379
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
380
-		}
381
-		catch( \Exception $e )
382
-		{
383
-			$context = $this->getContext();
384
-			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
385
-
386
-			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
387
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
388
-		}
389
-	}
390
-
391
-
392
-	/**
393
-	 * Returns the parameters used by the html client.
394
-	 *
395
-	 * @param array $params Associative list of all parameters
396
-	 * @param array $prefixes List of prefixes the parameters must start with
397
-	 * @return array Associative list of parameters used by the html client
398
-	 */
399
-	protected function getClientParams( array $params, array $prefixes = array( 'f', 'l', 'd', 'a' ) )
400
-	{
401
-		$list = parent::getClientParams( $params, array_merge( $prefixes, array( 'l', 'd' ) ) );
402
-
403
-		if( isset( $list['l_pos'] ) && isset( $list['d_prodid'] ) )
404
-		{
405
-			$context = $this->getContext();
406
-			$site = $context->getLocale()->getSite()->getCode();
407
-			$list += (array) $context->getSession()->get( 'aimeos/catalog/lists/params/last/' . $site, array() );
408
-		}
409
-
410
-		return $list;
411
-	}
412
-
413
-
414
-	/**
415
-	 * Returns the list of sub-client names configured for the client.
416
-	 *
417
-	 * @return array List of HTML client names
418
-	 */
419
-	protected function getSubClientNames()
420
-	{
421
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
422
-	}
423
-
424
-
425
-	/**
426
-	 * Sets the necessary parameter values in the view.
427
-	 *
428
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
429
-	 * @param array &$tags Result array for the list of tags that are associated to the output
430
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
431
-	 * @return \Aimeos\MW\View\Iface Modified view object
432
-	 */
433
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
434
-	{
435
-		if( !isset( $this->cache ) )
436
-		{
437
-			$params = $this->getClientParams( $view->param(), array( 'f' ) );
438
-
439
-			if( isset( $params['f_catid'] ) && $params['f_catid'] != '' )
440
-			{
441
-				$context = $this->getContext();
442
-				$config = $context->getConfig();
443
-				$controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' );
444
-
445
-				$default = array( 'attribute', 'media', 'text' );
446
-
447
-				/** client/html/catalog/domains
448
-				 * A list of domain names whose items should be available in the catalog view templates
449
-				 *
450
-				 * @see client/html/catalog/stage/domains
451
-				 */
452
-				$domains = $config->get( 'client/html/catalog/domains', $default );
453
-
454
-				/** client/html/catalog/stage/standard/domains
455
-				 * A list of domain names whose items should be available in the catalog stage view template
456
-				 *
457
-				 * The templates rendering the catalog stage section use the texts and
458
-				 * maybe images and attributes associated to the categories. You can
459
-				 * configure your own list of domains (attribute, media, price, product,
460
-				 * text, etc. are domains) whose items are fetched from the storage.
461
-				 * Please keep in mind that the more domains you add to the configuration,
462
-				 * the more time is required for fetching the content!
463
-				 *
464
-				 * This configuration option overwrites the "client/html/catalog/domains"
465
-				 * option that allows to configure the domain names of the items fetched
466
-				 * for all catalog related data.
467
-				 *
468
-				 * @param array List of domain names
469
-				 * @since 2014.03
470
-				 * @category Developer
471
-				 * @see client/html/catalog/domains
472
-				 * @see client/html/catalog/detail/domains
473
-				 * @see client/html/catalog/lists/domains
474
-				 */
475
-				$domains = $config->get( 'client/html/catalog/stage/standard/domains', $domains );
476
-				$stageCatPath = $controller->getCatalogPath( $params['f_catid'], $domains );
477
-
478
-				if( ( $categoryItem = end( $stageCatPath ) ) !== false ) {
479
-					$view->stageCurrentCatItem = $categoryItem;
480
-				}
481
-
482
-				$this->addMetaItem( $stageCatPath, 'catalog', $this->expire, $this->tags );
483
-				$this->addMetaList( array_keys( $stageCatPath ), 'catalog', $this->expire );
484
-
485
-				$view->stageCatPath = $stageCatPath;
486
-			}
487
-
488
-			$view->stageParams = $params;
489
-
490
-			$this->cache = $view;
491
-		}
492
-
493
-		$expire = $this->expires( $this->expire, $expire );
494
-		$tags = array_merge( $tags, $this->tags );
495
-
496
-		return $this->cache;
497
-	}
25
+    /** client/html/catalog/stage/standard/subparts
26
+     * List of HTML sub-clients rendered within the catalog stage section
27
+     *
28
+     * The output of the frontend is composed of the code generated by the HTML
29
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
30
+     * that are responsible for rendering certain sub-parts of the output. The
31
+     * sub-clients can contain HTML clients themselves and therefore a
32
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
33
+     * the output that is placed inside the container of its parent.
34
+     *
35
+     * At first, always the HTML code generated by the parent is printed, then
36
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
37
+     * determines the order of the output of these sub-clients inside the parent
38
+     * container. If the configured list of clients is
39
+     *
40
+     *  array( "subclient1", "subclient2" )
41
+     *
42
+     * you can easily change the order of the output by reordering the subparts:
43
+     *
44
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
45
+     *
46
+     * You can also remove one or more parts if they shouldn't be rendered:
47
+     *
48
+     *  client/html/<clients>/subparts = array( "subclient1" )
49
+     *
50
+     * As the clients only generates structural HTML, the layout defined via CSS
51
+     * should support adding, removing or reordering content by a fluid like
52
+     * design.
53
+     *
54
+     * @param array List of sub-client names
55
+     * @since 2014.03
56
+     * @category Developer
57
+     */
58
+    private $subPartPath = 'client/html/catalog/stage/standard/subparts';
59
+
60
+    /** client/html/catalog/stage/image/name
61
+     * Name of the image part used by the catalog stage client implementation
62
+     *
63
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Stage\Image\Myname".
64
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
65
+     *
66
+     * @param string Last part of the client class name
67
+     * @since 2014.03
68
+     * @category Developer
69
+     */
70
+
71
+    /** client/html/catalog/stage/breadcrumb/name
72
+     * Name of the breadcrumb part used by the catalog stage client implementation
73
+     *
74
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Stage\Breadcrumb\Myname".
75
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
76
+     *
77
+     * @param string Last part of the client class name
78
+     * @since 2014.03
79
+     * @category Developer
80
+     */
81
+
82
+    /** client/html/catalog/stage/navigator/name
83
+     * Name of the navigator part used by the catalog stage client implementation
84
+     *
85
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Stage\Breadcrumb\Myname".
86
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
87
+     *
88
+     * @param string Last part of the client class name
89
+     * @since 2014.09
90
+     * @category Developer
91
+     */
92
+    private $subPartNames = array( 'image', 'breadcrumb', 'navigator' );
93
+
94
+    private $tags = array();
95
+    private $expire;
96
+    private $cache;
97
+
98
+
99
+    /**
100
+     * Returns the HTML code for insertion into the body.
101
+     *
102
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
103
+     * @param array &$tags Result array for the list of tags that are associated to the output
104
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
105
+     * @return string HTML code
106
+     */
107
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
108
+    {
109
+        $prefixes = array( 'f' );
110
+        $context = $this->getContext();
111
+
112
+        /** client/html/catalog/stage
113
+         * All parameters defined for the catalog stage component and its subparts
114
+         *
115
+         * This returns all settings related to the stage component.
116
+         * Please refer to the single settings for details.
117
+         *
118
+         * @param array Associative list of name/value settings
119
+         * @category Developer
120
+         * @see client/html/catalog#stage
121
+         */
122
+        $confkey = 'client/html/catalog/stage';
123
+
124
+        if( $context->getUserId() != null || ( $html = $this->getCached( 'body', $uid, $prefixes, $confkey ) ) === null )
125
+        {
126
+            $view = $this->getView();
127
+
128
+            try
129
+            {
130
+                $view = $this->setViewParams( $view, $tags, $expire );
131
+
132
+                $output = '';
133
+                foreach( $this->getSubClients() as $subclient ) {
134
+                    $output .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
135
+                }
136
+                $view->stageBody = $output;
137
+            }
138
+            catch( \Aimeos\Client\Html\Exception $e )
139
+            {
140
+                $error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
141
+                $view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
142
+            }
143
+            catch( \Aimeos\Controller\Frontend\Exception $e )
144
+            {
145
+                $error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
146
+                $view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
147
+            }
148
+            catch( \Aimeos\MShop\Exception $e )
149
+            {
150
+                $error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
151
+                $view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
152
+            }
153
+            catch( \Exception $e )
154
+            {
155
+                $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
156
+
157
+                $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
158
+                $view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
159
+            }
160
+
161
+            /** client/html/catalog/stage/standard/template-body
162
+             * Relative path to the HTML body template of the catalog stage client.
163
+             *
164
+             * The template file contains the HTML code and processing instructions
165
+             * to generate the result shown in the body of the frontend. The
166
+             * configuration string is the path to the template file relative
167
+             * to the templates directory (usually in client/html/templates).
168
+             *
169
+             * You can overwrite the template file configuration in extensions and
170
+             * provide alternative templates. These alternative templates should be
171
+             * named like the default one but with the string "standard" replaced by
172
+             * an unique name. You may use the name of your project for this. If
173
+             * you've implemented an alternative client class as well, "standard"
174
+             * should be replaced by the name of the new class.
175
+             *
176
+             * @param string Relative path to the template creating code for the HTML page body
177
+             * @since 2014.03
178
+             * @category Developer
179
+             * @see client/html/catalog/stage/standard/template-header
180
+             */
181
+            $tplconf = 'client/html/catalog/stage/standard/template-body';
182
+            $default = 'catalog/stage/body-default.php';
183
+
184
+            $html = $view->render( $view->config( $tplconf, $default ) );
185
+
186
+            $this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
187
+        }
188
+        else
189
+        {
190
+            $html = $this->modifyBody( $html, $uid );
191
+        }
192
+
193
+        return $html;
194
+    }
195
+
196
+
197
+    /**
198
+     * Returns the HTML string for insertion into the header.
199
+     *
200
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
201
+     * @param array &$tags Result array for the list of tags that are associated to the output
202
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
203
+     * @return string|null String including HTML tags for the header on error
204
+     */
205
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
206
+    {
207
+        $prefixes = array( 'f' );
208
+        $context = $this->getContext();
209
+        $confkey = 'client/html/catalog/stage';
210
+
211
+        if( $context->getUserId() != null || ( $html = $this->getCached( 'header', $uid, $prefixes, $confkey ) ) === null )
212
+        {
213
+            $view = $this->getView();
214
+
215
+            try
216
+            {
217
+                $view = $this->setViewParams( $view, $tags, $expire );
218
+
219
+                $html = '';
220
+                foreach( $this->getSubClients() as $subclient ) {
221
+                    $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
222
+                }
223
+                $view->stageHeader = $html;
224
+            }
225
+            catch( \Exception $e )
226
+            {
227
+                $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
228
+            }
229
+
230
+            /** client/html/catalog/stage/standard/template-header
231
+             * Relative path to the HTML header template of the catalog stage client.
232
+             *
233
+             * The template file contains the HTML code and processing instructions
234
+             * to generate the HTML code that is inserted into the HTML page header
235
+             * of the rendered page in the frontend. The configuration string is the
236
+             * path to the template file relative to the templates directory (usually
237
+             * in client/html/templates).
238
+             *
239
+             * You can overwrite the template file configuration in extensions and
240
+             * provide alternative templates. These alternative templates should be
241
+             * named like the default one but with the string "standard" replaced by
242
+             * an unique name. You may use the name of your project for this. If
243
+             * you've implemented an alternative client class as well, "standard"
244
+             * should be replaced by the name of the new class.
245
+             *
246
+             * @param string Relative path to the template creating code for the HTML page head
247
+             * @since 2014.03
248
+             * @category Developer
249
+             * @see client/html/catalog/stage/standard/template-body
250
+             */
251
+            $tplconf = 'client/html/catalog/stage/standard/template-header';
252
+            $default = 'catalog/stage/header-default.php';
253
+
254
+            $html = $view->render( $view->config( $tplconf, $default ) );
255
+
256
+            $this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
257
+        }
258
+        else
259
+        {
260
+            $html = $this->modifyHeader( $html, $uid );
261
+        }
262
+
263
+        return $html;
264
+    }
265
+
266
+
267
+    /**
268
+     * Returns the sub-client given by its name.
269
+     *
270
+     * @param string $type Name of the client type
271
+     * @param string|null $name Name of the sub-client (Default if null)
272
+     * @return \Aimeos\Client\Html\Iface Sub-client object
273
+     */
274
+    public function getSubClient( $type, $name = null )
275
+    {
276
+        /** client/html/catalog/stage/decorators/excludes
277
+         * Excludes decorators added by the "common" option from the catalog stage html client
278
+         *
279
+         * Decorators extend the functionality of a class by adding new aspects
280
+         * (e.g. log what is currently done), executing the methods of the underlying
281
+         * class only in certain conditions (e.g. only for logged in users) or
282
+         * modify what is returned to the caller.
283
+         *
284
+         * This option allows you to remove a decorator added via
285
+         * "client/html/common/decorators/default" before they are wrapped
286
+         * around the html client.
287
+         *
288
+         *  client/html/catalog/stage/decorators/excludes = array( 'decorator1' )
289
+         *
290
+         * This would remove the decorator named "decorator1" from the list of
291
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
292
+         * "client/html/common/decorators/default" to the html client.
293
+         *
294
+         * @param array List of decorator names
295
+         * @since 2014.05
296
+         * @category Developer
297
+         * @see client/html/common/decorators/default
298
+         * @see client/html/catalog/stage/decorators/global
299
+         * @see client/html/catalog/stage/decorators/local
300
+         */
301
+
302
+        /** client/html/catalog/stage/decorators/global
303
+         * Adds a list of globally available decorators only to the catalog stage html client
304
+         *
305
+         * Decorators extend the functionality of a class by adding new aspects
306
+         * (e.g. log what is currently done), executing the methods of the underlying
307
+         * class only in certain conditions (e.g. only for logged in users) or
308
+         * modify what is returned to the caller.
309
+         *
310
+         * This option allows you to wrap global decorators
311
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
312
+         *
313
+         *  client/html/catalog/stage/decorators/global = array( 'decorator1' )
314
+         *
315
+         * This would add the decorator named "decorator1" defined by
316
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
317
+         *
318
+         * @param array List of decorator names
319
+         * @since 2014.05
320
+         * @category Developer
321
+         * @see client/html/common/decorators/default
322
+         * @see client/html/catalog/stage/decorators/excludes
323
+         * @see client/html/catalog/stage/decorators/local
324
+         */
325
+
326
+        /** client/html/catalog/stage/decorators/local
327
+         * Adds a list of local decorators only to the catalog stage html client
328
+         *
329
+         * Decorators extend the functionality of a class by adding new aspects
330
+         * (e.g. log what is currently done), executing the methods of the underlying
331
+         * class only in certain conditions (e.g. only for logged in users) or
332
+         * modify what is returned to the caller.
333
+         *
334
+         * This option allows you to wrap local decorators
335
+         * ("\Aimeos\Client\Html\Catalog\Decorator\*") around the html client.
336
+         *
337
+         *  client/html/catalog/stage/decorators/local = array( 'decorator2' )
338
+         *
339
+         * This would add the decorator named "decorator2" defined by
340
+         * "\Aimeos\Client\Html\Catalog\Decorator\Decorator2" only to the html client.
341
+         *
342
+         * @param array List of decorator names
343
+         * @since 2014.05
344
+         * @category Developer
345
+         * @see client/html/common/decorators/default
346
+         * @see client/html/catalog/stage/decorators/excludes
347
+         * @see client/html/catalog/stage/decorators/global
348
+         */
349
+        return $this->createSubClient( 'catalog/stage/' . $type, $name );
350
+    }
351
+
352
+
353
+    /**
354
+     * Processes the input, e.g. store given values.
355
+     * A view must be available and this method doesn't generate any output
356
+     * besides setting view variables.
357
+     */
358
+    public function process()
359
+    {
360
+        $view = $this->getView();
361
+
362
+        try
363
+        {
364
+            parent::process();
365
+        }
366
+        catch( \Aimeos\Client\Html\Exception $e )
367
+        {
368
+            $error = array( $this->getContext()->getI18n()->dt( 'client', $e->getMessage() ) );
369
+            $view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
370
+        }
371
+        catch( \Aimeos\Controller\Frontend\Exception $e )
372
+        {
373
+            $error = array( $this->getContext()->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
374
+            $view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
375
+        }
376
+        catch( \Aimeos\MShop\Exception $e )
377
+        {
378
+            $error = array( $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
379
+            $view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
380
+        }
381
+        catch( \Exception $e )
382
+        {
383
+            $context = $this->getContext();
384
+            $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
385
+
386
+            $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
387
+            $view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
388
+        }
389
+    }
390
+
391
+
392
+    /**
393
+     * Returns the parameters used by the html client.
394
+     *
395
+     * @param array $params Associative list of all parameters
396
+     * @param array $prefixes List of prefixes the parameters must start with
397
+     * @return array Associative list of parameters used by the html client
398
+     */
399
+    protected function getClientParams( array $params, array $prefixes = array( 'f', 'l', 'd', 'a' ) )
400
+    {
401
+        $list = parent::getClientParams( $params, array_merge( $prefixes, array( 'l', 'd' ) ) );
402
+
403
+        if( isset( $list['l_pos'] ) && isset( $list['d_prodid'] ) )
404
+        {
405
+            $context = $this->getContext();
406
+            $site = $context->getLocale()->getSite()->getCode();
407
+            $list += (array) $context->getSession()->get( 'aimeos/catalog/lists/params/last/' . $site, array() );
408
+        }
409
+
410
+        return $list;
411
+    }
412
+
413
+
414
+    /**
415
+     * Returns the list of sub-client names configured for the client.
416
+     *
417
+     * @return array List of HTML client names
418
+     */
419
+    protected function getSubClientNames()
420
+    {
421
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
422
+    }
423
+
424
+
425
+    /**
426
+     * Sets the necessary parameter values in the view.
427
+     *
428
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
429
+     * @param array &$tags Result array for the list of tags that are associated to the output
430
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
431
+     * @return \Aimeos\MW\View\Iface Modified view object
432
+     */
433
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
434
+    {
435
+        if( !isset( $this->cache ) )
436
+        {
437
+            $params = $this->getClientParams( $view->param(), array( 'f' ) );
438
+
439
+            if( isset( $params['f_catid'] ) && $params['f_catid'] != '' )
440
+            {
441
+                $context = $this->getContext();
442
+                $config = $context->getConfig();
443
+                $controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' );
444
+
445
+                $default = array( 'attribute', 'media', 'text' );
446
+
447
+                /** client/html/catalog/domains
448
+                 * A list of domain names whose items should be available in the catalog view templates
449
+                 *
450
+                 * @see client/html/catalog/stage/domains
451
+                 */
452
+                $domains = $config->get( 'client/html/catalog/domains', $default );
453
+
454
+                /** client/html/catalog/stage/standard/domains
455
+                 * A list of domain names whose items should be available in the catalog stage view template
456
+                 *
457
+                 * The templates rendering the catalog stage section use the texts and
458
+                 * maybe images and attributes associated to the categories. You can
459
+                 * configure your own list of domains (attribute, media, price, product,
460
+                 * text, etc. are domains) whose items are fetched from the storage.
461
+                 * Please keep in mind that the more domains you add to the configuration,
462
+                 * the more time is required for fetching the content!
463
+                 *
464
+                 * This configuration option overwrites the "client/html/catalog/domains"
465
+                 * option that allows to configure the domain names of the items fetched
466
+                 * for all catalog related data.
467
+                 *
468
+                 * @param array List of domain names
469
+                 * @since 2014.03
470
+                 * @category Developer
471
+                 * @see client/html/catalog/domains
472
+                 * @see client/html/catalog/detail/domains
473
+                 * @see client/html/catalog/lists/domains
474
+                 */
475
+                $domains = $config->get( 'client/html/catalog/stage/standard/domains', $domains );
476
+                $stageCatPath = $controller->getCatalogPath( $params['f_catid'], $domains );
477
+
478
+                if( ( $categoryItem = end( $stageCatPath ) ) !== false ) {
479
+                    $view->stageCurrentCatItem = $categoryItem;
480
+                }
481
+
482
+                $this->addMetaItem( $stageCatPath, 'catalog', $this->expire, $this->tags );
483
+                $this->addMetaList( array_keys( $stageCatPath ), 'catalog', $this->expire );
484
+
485
+                $view->stageCatPath = $stageCatPath;
486
+            }
487
+
488
+            $view->stageParams = $params;
489
+
490
+            $this->cache = $view;
491
+        }
492
+
493
+        $expire = $this->expires( $this->expire, $expire );
494
+        $tags = array_merge( $tags, $this->tags );
495
+
496
+        return $this->cache;
497
+    }
498 498
 }
Please login to merge, or discard this patch.
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @since 2014.09
90 90
 	 * @category Developer
91 91
 	 */
92
-	private $subPartNames = array( 'image', 'breadcrumb', 'navigator' );
92
+	private $subPartNames = array('image', 'breadcrumb', 'navigator');
93 93
 
94 94
 	private $tags = array();
95 95
 	private $expire;
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
105 105
 	 * @return string HTML code
106 106
 	 */
107
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
107
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
108 108
 	{
109
-		$prefixes = array( 'f' );
109
+		$prefixes = array('f');
110 110
 		$context = $this->getContext();
111 111
 
112 112
 		/** client/html/catalog/stage
@@ -121,41 +121,41 @@  discard block
 block discarded – undo
121 121
 		 */
122 122
 		$confkey = 'client/html/catalog/stage';
123 123
 
124
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'body', $uid, $prefixes, $confkey ) ) === null )
124
+		if ($context->getUserId() != null || ($html = $this->getCached('body', $uid, $prefixes, $confkey)) === null)
125 125
 		{
126 126
 			$view = $this->getView();
127 127
 
128 128
 			try
129 129
 			{
130
-				$view = $this->setViewParams( $view, $tags, $expire );
130
+				$view = $this->setViewParams($view, $tags, $expire);
131 131
 
132 132
 				$output = '';
133
-				foreach( $this->getSubClients() as $subclient ) {
134
-					$output .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
133
+				foreach ($this->getSubClients() as $subclient) {
134
+					$output .= $subclient->setView($view)->getBody($uid, $tags, $expire);
135 135
 				}
136 136
 				$view->stageBody = $output;
137 137
 			}
138
-			catch( \Aimeos\Client\Html\Exception $e )
138
+			catch (\Aimeos\Client\Html\Exception $e)
139 139
 			{
140
-				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
141
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
140
+				$error = array($context->getI18n()->dt('client', $e->getMessage()));
141
+				$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
142 142
 			}
143
-			catch( \Aimeos\Controller\Frontend\Exception $e )
143
+			catch (\Aimeos\Controller\Frontend\Exception $e)
144 144
 			{
145
-				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
146
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
145
+				$error = array($context->getI18n()->dt('controller/frontend', $e->getMessage()));
146
+				$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
147 147
 			}
148
-			catch( \Aimeos\MShop\Exception $e )
148
+			catch (\Aimeos\MShop\Exception $e)
149 149
 			{
150
-				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
151
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
150
+				$error = array($context->getI18n()->dt('mshop', $e->getMessage()));
151
+				$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
152 152
 			}
153
-			catch( \Exception $e )
153
+			catch (\Exception $e)
154 154
 			{
155
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
155
+				$context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString());
156 156
 
157
-				$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
158
-				$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
157
+				$error = array($context->getI18n()->dt('client', 'A non-recoverable error occured'));
158
+				$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
159 159
 			}
160 160
 
161 161
 			/** client/html/catalog/stage/standard/template-body
@@ -181,13 +181,13 @@  discard block
 block discarded – undo
181 181
 			$tplconf = 'client/html/catalog/stage/standard/template-body';
182 182
 			$default = 'catalog/stage/body-default.php';
183 183
 
184
-			$html = $view->render( $view->config( $tplconf, $default ) );
184
+			$html = $view->render($view->config($tplconf, $default));
185 185
 
186
-			$this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
186
+			$this->setCached('body', $uid, $prefixes, $confkey, $html, $tags, $expire);
187 187
 		}
188 188
 		else
189 189
 		{
190
-			$html = $this->modifyBody( $html, $uid );
190
+			$html = $this->modifyBody($html, $uid);
191 191
 		}
192 192
 
193 193
 		return $html;
@@ -202,29 +202,29 @@  discard block
 block discarded – undo
202 202
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
203 203
 	 * @return string|null String including HTML tags for the header on error
204 204
 	 */
205
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
205
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
206 206
 	{
207
-		$prefixes = array( 'f' );
207
+		$prefixes = array('f');
208 208
 		$context = $this->getContext();
209 209
 		$confkey = 'client/html/catalog/stage';
210 210
 
211
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'header', $uid, $prefixes, $confkey ) ) === null )
211
+		if ($context->getUserId() != null || ($html = $this->getCached('header', $uid, $prefixes, $confkey)) === null)
212 212
 		{
213 213
 			$view = $this->getView();
214 214
 
215 215
 			try
216 216
 			{
217
-				$view = $this->setViewParams( $view, $tags, $expire );
217
+				$view = $this->setViewParams($view, $tags, $expire);
218 218
 
219 219
 				$html = '';
220
-				foreach( $this->getSubClients() as $subclient ) {
221
-					$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
220
+				foreach ($this->getSubClients() as $subclient) {
221
+					$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
222 222
 				}
223 223
 				$view->stageHeader = $html;
224 224
 			}
225
-			catch( \Exception $e )
225
+			catch (\Exception $e)
226 226
 			{
227
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
227
+				$context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString());
228 228
 			}
229 229
 
230 230
 			/** client/html/catalog/stage/standard/template-header
@@ -251,13 +251,13 @@  discard block
 block discarded – undo
251 251
 			$tplconf = 'client/html/catalog/stage/standard/template-header';
252 252
 			$default = 'catalog/stage/header-default.php';
253 253
 
254
-			$html = $view->render( $view->config( $tplconf, $default ) );
254
+			$html = $view->render($view->config($tplconf, $default));
255 255
 
256
-			$this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
256
+			$this->setCached('header', $uid, $prefixes, $confkey, $html, $tags, $expire);
257 257
 		}
258 258
 		else
259 259
 		{
260
-			$html = $this->modifyHeader( $html, $uid );
260
+			$html = $this->modifyHeader($html, $uid);
261 261
 		}
262 262
 
263 263
 		return $html;
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 	 * @param string|null $name Name of the sub-client (Default if null)
272 272
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
273 273
 	 */
274
-	public function getSubClient( $type, $name = null )
274
+	public function getSubClient($type, $name = null)
275 275
 	{
276 276
 		/** client/html/catalog/stage/decorators/excludes
277 277
 		 * Excludes decorators added by the "common" option from the catalog stage html client
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 		 * @see client/html/catalog/stage/decorators/excludes
347 347
 		 * @see client/html/catalog/stage/decorators/global
348 348
 		 */
349
-		return $this->createSubClient( 'catalog/stage/' . $type, $name );
349
+		return $this->createSubClient('catalog/stage/'.$type, $name);
350 350
 	}
351 351
 
352 352
 
@@ -363,28 +363,28 @@  discard block
 block discarded – undo
363 363
 		{
364 364
 			parent::process();
365 365
 		}
366
-		catch( \Aimeos\Client\Html\Exception $e )
366
+		catch (\Aimeos\Client\Html\Exception $e)
367 367
 		{
368
-			$error = array( $this->getContext()->getI18n()->dt( 'client', $e->getMessage() ) );
369
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
368
+			$error = array($this->getContext()->getI18n()->dt('client', $e->getMessage()));
369
+			$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
370 370
 		}
371
-		catch( \Aimeos\Controller\Frontend\Exception $e )
371
+		catch (\Aimeos\Controller\Frontend\Exception $e)
372 372
 		{
373
-			$error = array( $this->getContext()->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
374
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
373
+			$error = array($this->getContext()->getI18n()->dt('controller/frontend', $e->getMessage()));
374
+			$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
375 375
 		}
376
-		catch( \Aimeos\MShop\Exception $e )
376
+		catch (\Aimeos\MShop\Exception $e)
377 377
 		{
378
-			$error = array( $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
379
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
378
+			$error = array($this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
379
+			$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
380 380
 		}
381
-		catch( \Exception $e )
381
+		catch (\Exception $e)
382 382
 		{
383 383
 			$context = $this->getContext();
384
-			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
384
+			$context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString());
385 385
 
386
-			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
387
-			$view->stageErrorList = $view->get( 'stageErrorList', array() ) + $error;
386
+			$error = array($context->getI18n()->dt('client', 'A non-recoverable error occured'));
387
+			$view->stageErrorList = $view->get('stageErrorList', array()) + $error;
388 388
 		}
389 389
 	}
390 390
 
@@ -396,15 +396,15 @@  discard block
 block discarded – undo
396 396
 	 * @param array $prefixes List of prefixes the parameters must start with
397 397
 	 * @return array Associative list of parameters used by the html client
398 398
 	 */
399
-	protected function getClientParams( array $params, array $prefixes = array( 'f', 'l', 'd', 'a' ) )
399
+	protected function getClientParams(array $params, array $prefixes = array('f', 'l', 'd', 'a'))
400 400
 	{
401
-		$list = parent::getClientParams( $params, array_merge( $prefixes, array( 'l', 'd' ) ) );
401
+		$list = parent::getClientParams($params, array_merge($prefixes, array('l', 'd')));
402 402
 
403
-		if( isset( $list['l_pos'] ) && isset( $list['d_prodid'] ) )
403
+		if (isset($list['l_pos']) && isset($list['d_prodid']))
404 404
 		{
405 405
 			$context = $this->getContext();
406 406
 			$site = $context->getLocale()->getSite()->getCode();
407
-			$list += (array) $context->getSession()->get( 'aimeos/catalog/lists/params/last/' . $site, array() );
407
+			$list += (array) $context->getSession()->get('aimeos/catalog/lists/params/last/'.$site, array());
408 408
 		}
409 409
 
410 410
 		return $list;
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 	 */
419 419
 	protected function getSubClientNames()
420 420
 	{
421
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
421
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
422 422
 	}
423 423
 
424 424
 
@@ -430,26 +430,26 @@  discard block
 block discarded – undo
430 430
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
431 431
 	 * @return \Aimeos\MW\View\Iface Modified view object
432 432
 	 */
433
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
433
+	protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
434 434
 	{
435
-		if( !isset( $this->cache ) )
435
+		if (!isset($this->cache))
436 436
 		{
437
-			$params = $this->getClientParams( $view->param(), array( 'f' ) );
437
+			$params = $this->getClientParams($view->param(), array('f'));
438 438
 
439
-			if( isset( $params['f_catid'] ) && $params['f_catid'] != '' )
439
+			if (isset($params['f_catid']) && $params['f_catid'] != '')
440 440
 			{
441 441
 				$context = $this->getContext();
442 442
 				$config = $context->getConfig();
443
-				$controller = \Aimeos\Controller\Frontend\Factory::createController( $context, 'catalog' );
443
+				$controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
444 444
 
445
-				$default = array( 'attribute', 'media', 'text' );
445
+				$default = array('attribute', 'media', 'text');
446 446
 
447 447
 				/** client/html/catalog/domains
448 448
 				 * A list of domain names whose items should be available in the catalog view templates
449 449
 				 *
450 450
 				 * @see client/html/catalog/stage/domains
451 451
 				 */
452
-				$domains = $config->get( 'client/html/catalog/domains', $default );
452
+				$domains = $config->get('client/html/catalog/domains', $default);
453 453
 
454 454
 				/** client/html/catalog/stage/standard/domains
455 455
 				 * A list of domain names whose items should be available in the catalog stage view template
@@ -472,15 +472,15 @@  discard block
 block discarded – undo
472 472
 				 * @see client/html/catalog/detail/domains
473 473
 				 * @see client/html/catalog/lists/domains
474 474
 				 */
475
-				$domains = $config->get( 'client/html/catalog/stage/standard/domains', $domains );
476
-				$stageCatPath = $controller->getCatalogPath( $params['f_catid'], $domains );
475
+				$domains = $config->get('client/html/catalog/stage/standard/domains', $domains);
476
+				$stageCatPath = $controller->getCatalogPath($params['f_catid'], $domains);
477 477
 
478
-				if( ( $categoryItem = end( $stageCatPath ) ) !== false ) {
478
+				if (($categoryItem = end($stageCatPath)) !== false) {
479 479
 					$view->stageCurrentCatItem = $categoryItem;
480 480
 				}
481 481
 
482
-				$this->addMetaItem( $stageCatPath, 'catalog', $this->expire, $this->tags );
483
-				$this->addMetaList( array_keys( $stageCatPath ), 'catalog', $this->expire );
482
+				$this->addMetaItem($stageCatPath, 'catalog', $this->expire, $this->tags);
483
+				$this->addMetaList(array_keys($stageCatPath), 'catalog', $this->expire);
484 484
 
485 485
 				$view->stageCatPath = $stageCatPath;
486 486
 			}
@@ -490,8 +490,8 @@  discard block
 block discarded – undo
490 490
 			$this->cache = $view;
491 491
 		}
492 492
 
493
-		$expire = $this->expires( $this->expire, $expire );
494
-		$tags = array_merge( $tags, $this->tags );
493
+		$expire = $this->expires($this->expire, $expire);
494
+		$tags = array_merge($tags, $this->tags);
495 495
 
496 496
 		return $this->cache;
497 497
 	}
Please login to merge, or discard this patch.
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -211,23 +211,19 @@  discard block
 block discarded – undo
211 211
 					$output .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
212 212
 				}
213 213
 				$view->detailBody = $output;
214
-			}
215
-			catch( \Aimeos\Client\Html\Exception $e )
214
+			} catch( \Aimeos\Client\Html\Exception $e )
216 215
 			{
217 216
 				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
218 217
 				$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
219
-			}
220
-			catch( \Aimeos\Controller\Frontend\Exception $e )
218
+			} catch( \Aimeos\Controller\Frontend\Exception $e )
221 219
 			{
222 220
 				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
223 221
 				$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
224
-			}
225
-			catch( \Aimeos\MShop\Exception $e )
222
+			} catch( \Aimeos\MShop\Exception $e )
226 223
 			{
227 224
 				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
228 225
 				$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
229
-			}
230
-			catch( \Exception $e )
226
+			} catch( \Exception $e )
231 227
 			{
232 228
 				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
233 229
 
@@ -261,8 +257,7 @@  discard block
 block discarded – undo
261 257
 			$html = $view->render( $view->config( $tplconf, $default ) );
262 258
 
263 259
 			$this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
264
-		}
265
-		else
260
+		} else
266 261
 		{
267 262
 			$html = $this->modifyBody( $html, $uid );
268 263
 		}
@@ -299,8 +294,7 @@  discard block
 block discarded – undo
299 294
 					$output .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
300 295
 				}
301 296
 				$view->detailHeader = $output;
302
-			}
303
-			catch( \Exception $e )
297
+			} catch( \Exception $e )
304 298
 			{
305 299
 				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
306 300
 			}
@@ -332,8 +326,7 @@  discard block
 block discarded – undo
332 326
 			$html = $view->render( $view->config( $tplconf, $default ) );
333 327
 
334 328
 			$this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
335
-		}
336
-		else
329
+		} else
337 330
 		{
338 331
 			$html = $this->modifyHeader( $html, $uid );
339 332
 		}
@@ -446,23 +439,19 @@  discard block
 block discarded – undo
446 439
 			$context->getSession()->set( 'aimeos/catalog/detail/params/last' . $site, $params );
447 440
 
448 441
 			parent::process();
449
-		}
450
-		catch( \Aimeos\Client\Html\Exception $e )
442
+		} catch( \Aimeos\Client\Html\Exception $e )
451 443
 		{
452 444
 			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
453 445
 			$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
454
-		}
455
-		catch( \Aimeos\Controller\Frontend\Exception $e )
446
+		} catch( \Aimeos\Controller\Frontend\Exception $e )
456 447
 		{
457 448
 			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
458 449
 			$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
459
-		}
460
-		catch( \Aimeos\MShop\Exception $e )
450
+		} catch( \Aimeos\MShop\Exception $e )
461 451
 		{
462 452
 			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
463 453
 			$view->detailErrorList = $view->get( 'detailErrorList', array() ) + $error;
464
-		}
465
-		catch( \Exception $e )
454
+		} catch( \Exception $e )
466 455
 		{
467 456
 			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
468 457
 
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Client/Factory/Base.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
27 27
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
28 28
 	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30
-	 * @param \Aimeos\Client\Html\Iface $client Client object
31 30
 	 */
32 31
 	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
33 32
 	{
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,19 +18,19 @@
 block discarded – undo
18 18
  * @subpackage Html
19 19
  */
20 20
 abstract class Base
21
-	extends \Aimeos\Client\Html\Base
22
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
21
+    extends \Aimeos\Client\Html\Base
22
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
23 23
 {
24
-	/**
25
-	 * Initializes the object instance
26
-	 *
27
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
28
-	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29
-	 * 	and a list of relative paths inside the core or the extension as values
30
-	 * @param \Aimeos\Client\Html\Iface $client Client object
31
-	 */
32
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
33
-	{
34
-		parent::__construct( $context, $templatePaths );
35
-	}
24
+    /**
25
+     * Initializes the object instance
26
+     *
27
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
28
+     * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29
+     * 	and a list of relative paths inside the core or the extension as values
30
+     * @param \Aimeos\Client\Html\Iface $client Client object
31
+     */
32
+    public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
33
+    {
34
+        parent::__construct( $context, $templatePaths );
35
+    }
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30 30
 	 * @param \Aimeos\Client\Html\Iface $client Client object
31 31
 	 */
32
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
32
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths)
33 33
 	{
34
-		parent::__construct( $context, $templatePaths );
34
+		parent::__construct($context, $templatePaths);
35 35
 	}
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Locale/Select/Language/Standard.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -19,253 +19,253 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	/** client/html/locale/select/language/standard/subparts
26
-	 * List of HTML sub-clients rendered within the locale select language section
27
-	 *
28
-	 * The output of the frontend is composed of the code generated by the HTML
29
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
30
-	 * that are responsible for rendering certain sub-parts of the output. The
31
-	 * sub-clients can contain HTML clients themselves and therefore a
32
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
33
-	 * the output that is placed inside the container of its parent.
34
-	 *
35
-	 * At first, always the HTML code generated by the parent is printed, then
36
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
37
-	 * determines the order of the output of these sub-clients inside the parent
38
-	 * container. If the configured list of clients is
39
-	 *
40
-	 *  array( "subclient1", "subclient2" )
41
-	 *
42
-	 * you can easily change the order of the output by reordering the subparts:
43
-	 *
44
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
45
-	 *
46
-	 * You can also remove one or more parts if they shouldn't be rendered:
47
-	 *
48
-	 *  client/html/<clients>/subparts = array( "subclient1" )
49
-	 *
50
-	 * As the clients only generates structural HTML, the layout defined via CSS
51
-	 * should support adding, removing or reordering content by a fluid like
52
-	 * design.
53
-	 *
54
-	 * @param array List of sub-client names
55
-	 * @since 2014.09
56
-	 * @category Developer
57
-	 */
58
-	private $subPartPath = 'client/html/locale/select/language/standard/subparts';
59
-	private $subPartNames = array();
25
+    /** client/html/locale/select/language/standard/subparts
26
+     * List of HTML sub-clients rendered within the locale select language section
27
+     *
28
+     * The output of the frontend is composed of the code generated by the HTML
29
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
30
+     * that are responsible for rendering certain sub-parts of the output. The
31
+     * sub-clients can contain HTML clients themselves and therefore a
32
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
33
+     * the output that is placed inside the container of its parent.
34
+     *
35
+     * At first, always the HTML code generated by the parent is printed, then
36
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
37
+     * determines the order of the output of these sub-clients inside the parent
38
+     * container. If the configured list of clients is
39
+     *
40
+     *  array( "subclient1", "subclient2" )
41
+     *
42
+     * you can easily change the order of the output by reordering the subparts:
43
+     *
44
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
45
+     *
46
+     * You can also remove one or more parts if they shouldn't be rendered:
47
+     *
48
+     *  client/html/<clients>/subparts = array( "subclient1" )
49
+     *
50
+     * As the clients only generates structural HTML, the layout defined via CSS
51
+     * should support adding, removing or reordering content by a fluid like
52
+     * design.
53
+     *
54
+     * @param array List of sub-client names
55
+     * @since 2014.09
56
+     * @category Developer
57
+     */
58
+    private $subPartPath = 'client/html/locale/select/language/standard/subparts';
59
+    private $subPartNames = array();
60 60
 
61 61
 
62
-	/**
63
-	 * Returns the HTML code for insertion into the body.
64
-	 *
65
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
-	 * @param array &$tags Result array for the list of tags that are associated to the output
67
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
-	 * @return string HTML code
69
-	 */
70
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
-	{
72
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
62
+    /**
63
+     * Returns the HTML code for insertion into the body.
64
+     *
65
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
+     * @param array &$tags Result array for the list of tags that are associated to the output
67
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
+     * @return string HTML code
69
+     */
70
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
+    {
72
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
73 73
 
74
-		$html = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
-		}
78
-		$view->languageBody = $html;
74
+        $html = '';
75
+        foreach( $this->getSubClients() as $subclient ) {
76
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
+        }
78
+        $view->languageBody = $html;
79 79
 
80
-		/** client/html/locale/select/language/standard/template-body
81
-		 * Relative path to the HTML body template of the locale select language client.
82
-		 *
83
-		 * The template file contains the HTML code and processing instructions
84
-		 * to generate the result shown in the body of the frontend. The
85
-		 * configuration string is the path to the template file relative
86
-		 * to the templates directory (usually in client/html/templates).
87
-		 *
88
-		 * You can overwrite the template file configuration in extensions and
89
-		 * provide alternative templates. These alternative templates should be
90
-		 * named like the default one but with the string "standard" replaced by
91
-		 * an unique name. You may use the name of your project for this. If
92
-		 * you've implemented an alternative client class as well, "standard"
93
-		 * should be replaced by the name of the new class.
94
-		 *
95
-		 * @param string Relative path to the template creating code for the HTML page body
96
-		 * @since 2014.09
97
-		 * @category Developer
98
-		 * @see client/html/locale/select/language/standard/template-header
99
-		 */
100
-		$tplconf = 'client/html/locale/select/language/standard/template-body';
101
-		$default = 'locale/select/language-body-default.php';
80
+        /** client/html/locale/select/language/standard/template-body
81
+         * Relative path to the HTML body template of the locale select language client.
82
+         *
83
+         * The template file contains the HTML code and processing instructions
84
+         * to generate the result shown in the body of the frontend. The
85
+         * configuration string is the path to the template file relative
86
+         * to the templates directory (usually in client/html/templates).
87
+         *
88
+         * You can overwrite the template file configuration in extensions and
89
+         * provide alternative templates. These alternative templates should be
90
+         * named like the default one but with the string "standard" replaced by
91
+         * an unique name. You may use the name of your project for this. If
92
+         * you've implemented an alternative client class as well, "standard"
93
+         * should be replaced by the name of the new class.
94
+         *
95
+         * @param string Relative path to the template creating code for the HTML page body
96
+         * @since 2014.09
97
+         * @category Developer
98
+         * @see client/html/locale/select/language/standard/template-header
99
+         */
100
+        $tplconf = 'client/html/locale/select/language/standard/template-body';
101
+        $default = 'locale/select/language-body-default.php';
102 102
 
103
-		return $view->render( $view->config( $tplconf, $default ) );
104
-	}
103
+        return $view->render( $view->config( $tplconf, $default ) );
104
+    }
105 105
 
106 106
 
107
-	/**
108
-	 * Returns the HTML string for insertion into the header.
109
-	 *
110
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
-	 * @param array &$tags Result array for the list of tags that are associated to the output
112
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
114
-	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
-	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
107
+    /**
108
+     * Returns the HTML string for insertion into the header.
109
+     *
110
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
+     * @param array &$tags Result array for the list of tags that are associated to the output
112
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
+     * @return string|null String including HTML tags for the header on error
114
+     */
115
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
+    {
117
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
118 118
 
119
-		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
-		}
123
-		$view->languageHeader = $html;
119
+        $html = '';
120
+        foreach( $this->getSubClients() as $subclient ) {
121
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
+        }
123
+        $view->languageHeader = $html;
124 124
 
125
-		/** client/html/locale/select/language/standard/template-header
126
-		 * Relative path to the HTML header template of the locale select language client.
127
-		 *
128
-		 * The template file contains the HTML code and processing instructions
129
-		 * to generate the HTML code that is inserted into the HTML page header
130
-		 * of the rendered page in the frontend. The configuration string is the
131
-		 * path to the template file relative to the templates directory (usually
132
-		 * in client/html/templates).
133
-		 *
134
-		 * You can overwrite the template file configuration in extensions and
135
-		 * provide alternative templates. These alternative templates should be
136
-		 * named like the default one but with the string "standard" replaced by
137
-		 * an unique name. You may use the name of your project for this. If
138
-		 * you've implemented an alternative client class as well, "standard"
139
-		 * should be replaced by the name of the new class.
140
-		 *
141
-		 * @param string Relative path to the template creating code for the HTML page head
142
-		 * @since 2014.09
143
-		 * @category Developer
144
-		 * @see client/html/locale/select/language/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/locale/select/language/standard/template-header';
147
-		$default = 'locale/select/language-header-default.php';
125
+        /** client/html/locale/select/language/standard/template-header
126
+         * Relative path to the HTML header template of the locale select language client.
127
+         *
128
+         * The template file contains the HTML code and processing instructions
129
+         * to generate the HTML code that is inserted into the HTML page header
130
+         * of the rendered page in the frontend. The configuration string is the
131
+         * path to the template file relative to the templates directory (usually
132
+         * in client/html/templates).
133
+         *
134
+         * You can overwrite the template file configuration in extensions and
135
+         * provide alternative templates. These alternative templates should be
136
+         * named like the default one but with the string "standard" replaced by
137
+         * an unique name. You may use the name of your project for this. If
138
+         * you've implemented an alternative client class as well, "standard"
139
+         * should be replaced by the name of the new class.
140
+         *
141
+         * @param string Relative path to the template creating code for the HTML page head
142
+         * @since 2014.09
143
+         * @category Developer
144
+         * @see client/html/locale/select/language/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/locale/select/language/standard/template-header';
147
+        $default = 'locale/select/language-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151 151
 
152 152
 
153
-	/**
154
-	 * Returns the sub-client given by its name.
155
-	 *
156
-	 * @param string $type Name of the client type
157
-	 * @param string|null $name Name of the sub-client (Default if null)
158
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
159
-	 */
160
-	public function getSubClient( $type, $name = null )
161
-	{
162
-		/** client/html/locale/select/language/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the locale select language html client
164
-		 *
165
-		 * Decorators extend the functionality of a class by adding new aspects
166
-		 * (e.g. log what is currently done), executing the methods of the underlying
167
-		 * class only in certain conditions (e.g. only for logged in users) or
168
-		 * modify what is returned to the caller.
169
-		 *
170
-		 * This option allows you to remove a decorator added via
171
-		 * "client/html/common/decorators/default" before they are wrapped
172
-		 * around the html client.
173
-		 *
174
-		 *  client/html/locale/select/language/decorators/excludes = array( 'decorator1' )
175
-		 *
176
-		 * This would remove the decorator named "decorator1" from the list of
177
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
-		 * "client/html/common/decorators/default" to the html client.
179
-		 *
180
-		 * @param array List of decorator names
181
-		 * @since 2015.08
182
-		 * @category Developer
183
-		 * @see client/html/common/decorators/default
184
-		 * @see client/html/locale/select/language/decorators/global
185
-		 * @see client/html/locale/select/language/decorators/local
186
-		 */
153
+    /**
154
+     * Returns the sub-client given by its name.
155
+     *
156
+     * @param string $type Name of the client type
157
+     * @param string|null $name Name of the sub-client (Default if null)
158
+     * @return \Aimeos\Client\Html\Iface Sub-client object
159
+     */
160
+    public function getSubClient( $type, $name = null )
161
+    {
162
+        /** client/html/locale/select/language/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the locale select language html client
164
+         *
165
+         * Decorators extend the functionality of a class by adding new aspects
166
+         * (e.g. log what is currently done), executing the methods of the underlying
167
+         * class only in certain conditions (e.g. only for logged in users) or
168
+         * modify what is returned to the caller.
169
+         *
170
+         * This option allows you to remove a decorator added via
171
+         * "client/html/common/decorators/default" before they are wrapped
172
+         * around the html client.
173
+         *
174
+         *  client/html/locale/select/language/decorators/excludes = array( 'decorator1' )
175
+         *
176
+         * This would remove the decorator named "decorator1" from the list of
177
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
+         * "client/html/common/decorators/default" to the html client.
179
+         *
180
+         * @param array List of decorator names
181
+         * @since 2015.08
182
+         * @category Developer
183
+         * @see client/html/common/decorators/default
184
+         * @see client/html/locale/select/language/decorators/global
185
+         * @see client/html/locale/select/language/decorators/local
186
+         */
187 187
 
188
-		/** client/html/locale/select/language/decorators/global
189
-		 * Adds a list of globally available decorators only to the locale select language html client
190
-		 *
191
-		 * Decorators extend the functionality of a class by adding new aspects
192
-		 * (e.g. log what is currently done), executing the methods of the underlying
193
-		 * class only in certain conditions (e.g. only for logged in users) or
194
-		 * modify what is returned to the caller.
195
-		 *
196
-		 * This option allows you to wrap global decorators
197
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
-		 *
199
-		 *  client/html/locale/select/language/decorators/global = array( 'decorator1' )
200
-		 *
201
-		 * This would add the decorator named "decorator1" defined by
202
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
-		 *
204
-		 * @param array List of decorator names
205
-		 * @since 2015.08
206
-		 * @category Developer
207
-		 * @see client/html/common/decorators/default
208
-		 * @see client/html/locale/select/language/decorators/excludes
209
-		 * @see client/html/locale/select/language/decorators/local
210
-		 */
188
+        /** client/html/locale/select/language/decorators/global
189
+         * Adds a list of globally available decorators only to the locale select language html client
190
+         *
191
+         * Decorators extend the functionality of a class by adding new aspects
192
+         * (e.g. log what is currently done), executing the methods of the underlying
193
+         * class only in certain conditions (e.g. only for logged in users) or
194
+         * modify what is returned to the caller.
195
+         *
196
+         * This option allows you to wrap global decorators
197
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
+         *
199
+         *  client/html/locale/select/language/decorators/global = array( 'decorator1' )
200
+         *
201
+         * This would add the decorator named "decorator1" defined by
202
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
+         *
204
+         * @param array List of decorator names
205
+         * @since 2015.08
206
+         * @category Developer
207
+         * @see client/html/common/decorators/default
208
+         * @see client/html/locale/select/language/decorators/excludes
209
+         * @see client/html/locale/select/language/decorators/local
210
+         */
211 211
 
212
-		/** client/html/locale/select/language/decorators/local
213
-		 * Adds a list of local decorators only to the locale select language html client
214
-		 *
215
-		 * Decorators extend the functionality of a class by adding new aspects
216
-		 * (e.g. log what is currently done), executing the methods of the underlying
217
-		 * class only in certain conditions (e.g. only for logged in users) or
218
-		 * modify what is returned to the caller.
219
-		 *
220
-		 * This option allows you to wrap local decorators
221
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
-		 *
223
-		 *  client/html/locale/select/language/decorators/local = array( 'decorator2' )
224
-		 *
225
-		 * This would add the decorator named "decorator2" defined by
226
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
-		 *
228
-		 * @param array List of decorator names
229
-		 * @since 2015.08
230
-		 * @category Developer
231
-		 * @see client/html/common/decorators/default
232
-		 * @see client/html/locale/select/language/decorators/excludes
233
-		 * @see client/html/locale/select/language/decorators/global
234
-		 */
212
+        /** client/html/locale/select/language/decorators/local
213
+         * Adds a list of local decorators only to the locale select language html client
214
+         *
215
+         * Decorators extend the functionality of a class by adding new aspects
216
+         * (e.g. log what is currently done), executing the methods of the underlying
217
+         * class only in certain conditions (e.g. only for logged in users) or
218
+         * modify what is returned to the caller.
219
+         *
220
+         * This option allows you to wrap local decorators
221
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
+         *
223
+         *  client/html/locale/select/language/decorators/local = array( 'decorator2' )
224
+         *
225
+         * This would add the decorator named "decorator2" defined by
226
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
+         *
228
+         * @param array List of decorator names
229
+         * @since 2015.08
230
+         * @category Developer
231
+         * @see client/html/common/decorators/default
232
+         * @see client/html/locale/select/language/decorators/excludes
233
+         * @see client/html/locale/select/language/decorators/global
234
+         */
235 235
 
236
-		return $this->createSubClient( 'locale/select/language/' . $type, $name );
237
-	}
236
+        return $this->createSubClient( 'locale/select/language/' . $type, $name );
237
+    }
238 238
 
239 239
 
240
-	/**
241
-	 * Processes the input, e.g. store given values.
242
-	 * A view must be available and this method doesn't generate any output
243
-	 * besides setting view variables.
244
-	 */
245
-	public function process()
246
-	{
247
-		$view = $this->getView();
248
-		$context = $this->getContext();
249
-		$config = $context->getConfig();
250
-		$session = $context->getSession();
240
+    /**
241
+     * Processes the input, e.g. store given values.
242
+     * A view must be available and this method doesn't generate any output
243
+     * besides setting view variables.
244
+     */
245
+    public function process()
246
+    {
247
+        $view = $this->getView();
248
+        $context = $this->getContext();
249
+        $config = $context->getConfig();
250
+        $session = $context->getSession();
251 251
 
252
-		$name = $config->get( 'client/html/locale/select/language/param-name', 'loc_languageid' );
252
+        $name = $config->get( 'client/html/locale/select/language/param-name', 'loc_languageid' );
253 253
 
254
-		if( ( $languageId = $view->param( $name ) ) !== null ) {
255
-			$session->set( 'aimeos/locale/languageid', $languageId );
256
-		}
254
+        if( ( $languageId = $view->param( $name ) ) !== null ) {
255
+            $session->set( 'aimeos/locale/languageid', $languageId );
256
+        }
257 257
 
258
-		parent::process();
259
-	}
258
+        parent::process();
259
+    }
260 260
 
261 261
 
262
-	/**
263
-	 * Returns the list of sub-client names configured for the client.
264
-	 *
265
-	 * @return array List of HTML client names
266
-	 */
267
-	protected function getSubClientNames()
268
-	{
269
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
270
-	}
262
+    /**
263
+     * Returns the list of sub-client names configured for the client.
264
+     *
265
+     * @return array List of HTML client names
266
+     */
267
+    protected function getSubClientNames()
268
+    {
269
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
270
+    }
271 271
 }
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
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->languageBody = $html;
79 79
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$tplconf = 'client/html/locale/select/language/standard/template-body';
101 101
 		$default = 'locale/select/language-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
 block discarded – undo
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->languageHeader = $html;
124 124
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$tplconf = 'client/html/locale/select/language/standard/template-header';
147 147
 		$default = 'locale/select/language-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
 block discarded – undo
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/locale/select/language/decorators/excludes
163 163
 		 * Excludes decorators added by the "common" option from the locale select language html client
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		 * @see client/html/locale/select/language/decorators/global
234 234
 		 */
235 235
 
236
-		return $this->createSubClient( 'locale/select/language/' . $type, $name );
236
+		return $this->createSubClient('locale/select/language/'.$type, $name);
237 237
 	}
238 238
 
239 239
 
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
 		$config = $context->getConfig();
250 250
 		$session = $context->getSession();
251 251
 
252
-		$name = $config->get( 'client/html/locale/select/language/param-name', 'loc_languageid' );
252
+		$name = $config->get('client/html/locale/select/language/param-name', 'loc_languageid');
253 253
 
254
-		if( ( $languageId = $view->param( $name ) ) !== null ) {
255
-			$session->set( 'aimeos/locale/languageid', $languageId );
254
+		if (($languageId = $view->param($name)) !== null) {
255
+			$session->set('aimeos/locale/languageid', $languageId);
256 256
 		}
257 257
 
258 258
 		parent::process();
@@ -266,6 +266,6 @@  discard block
 block discarded – undo
266 266
 	 */
267 267
 	protected function getSubClientNames()
268 268
 	{
269
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
269
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
270 270
 	}
271 271
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Summary/Detail/Base.php 3 patches
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -19,88 +19,88 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 abstract class Base
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23 23
 {
24
-	/**
25
-	 * Returns a list of tax rates and values for the given basket.
26
-	 *
27
-	 * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket containing the products, services, etc.
28
-	 * @return array Associative list of tax rates as key and corresponding amounts as value
29
-	 */
30
-	protected function getTaxRates( \Aimeos\MShop\Order\Item\Base\Iface $basket )
31
-	{
32
-		$taxrates = array();
24
+    /**
25
+     * Returns a list of tax rates and values for the given basket.
26
+     *
27
+     * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket containing the products, services, etc.
28
+     * @return array Associative list of tax rates as key and corresponding amounts as value
29
+     */
30
+    protected function getTaxRates( \Aimeos\MShop\Order\Item\Base\Iface $basket )
31
+    {
32
+        $taxrates = array();
33 33
 
34
-		foreach( $basket->getProducts() as $product )
35
-		{
36
-			$price = clone $product->getPrice();
37
-			$taxrate = $price->getTaxrate();
34
+        foreach( $basket->getProducts() as $product )
35
+        {
36
+            $price = clone $product->getPrice();
37
+            $taxrate = $price->getTaxrate();
38 38
 
39
-			if( isset( $taxrates[$taxrate] ) ) {
40
-				$taxrates[$taxrate]->addItem( $price, $product->getQuantity() );
41
-			} else {
42
-				$taxrates[$taxrate] = $price->addItem( $price, $product->getQuantity() - 1 );
43
-			}
44
-		}
39
+            if( isset( $taxrates[$taxrate] ) ) {
40
+                $taxrates[$taxrate]->addItem( $price, $product->getQuantity() );
41
+            } else {
42
+                $taxrates[$taxrate] = $price->addItem( $price, $product->getQuantity() - 1 );
43
+            }
44
+        }
45 45
 
46
-		try
47
-		{
48
-			$price = clone $basket->getService( 'delivery' )->getPrice();
49
-			$taxrate = $price->getTaxrate();
46
+        try
47
+        {
48
+            $price = clone $basket->getService( 'delivery' )->getPrice();
49
+            $taxrate = $price->getTaxrate();
50 50
 
51
-			if( isset( $taxrates[$taxrate] ) ) {
52
-				$taxrates[$taxrate]->addItem( $price );
53
-			} else {
54
-				$taxrates[$taxrate] = $price;
55
-			}
56
-		}
57
-		catch( \Exception $e ) { ; } // if delivery service isn't available
51
+            if( isset( $taxrates[$taxrate] ) ) {
52
+                $taxrates[$taxrate]->addItem( $price );
53
+            } else {
54
+                $taxrates[$taxrate] = $price;
55
+            }
56
+        }
57
+        catch( \Exception $e ) { ; } // if delivery service isn't available
58 58
 
59
-		try
60
-		{
61
-			$price = clone $basket->getService( 'payment' )->getPrice();
62
-			$taxrate = $price->getTaxrate();
59
+        try
60
+        {
61
+            $price = clone $basket->getService( 'payment' )->getPrice();
62
+            $taxrate = $price->getTaxrate();
63 63
 
64
-			if( isset( $taxrates[$taxrate] ) ) {
65
-				$taxrates[$taxrate]->addItem( $price );
66
-			} else {
67
-				$taxrates[$taxrate] = $price;
68
-			}
69
-		}
70
-		catch( \Exception $e ) { ; } // if payment service isn't available
64
+            if( isset( $taxrates[$taxrate] ) ) {
65
+                $taxrates[$taxrate]->addItem( $price );
66
+            } else {
67
+                $taxrates[$taxrate] = $price;
68
+            }
69
+        }
70
+        catch( \Exception $e ) { ; } // if payment service isn't available
71 71
 
72
-		return $taxrates;
73
-	}
72
+        return $taxrates;
73
+    }
74 74
 
75 75
 
76
-	/**
77
-	 * Returns the payment status at which download files are shown
78
-	 *
79
-	 * @return integer Payment status from \Aimeos\MShop\Order\Item\Base
80
-	 */
81
-	protected function getDownloadPaymentStatus()
82
-	{
83
-		$config = $this->getContext()->getConfig();
84
-		$default = \Aimeos\MShop\Order\Item\Base::PAY_RECEIVED;
76
+    /**
77
+     * Returns the payment status at which download files are shown
78
+     *
79
+     * @return integer Payment status from \Aimeos\MShop\Order\Item\Base
80
+     */
81
+    protected function getDownloadPaymentStatus()
82
+    {
83
+        $config = $this->getContext()->getConfig();
84
+        $default = \Aimeos\MShop\Order\Item\Base::PAY_RECEIVED;
85 85
 
86
-		/** client/html/common/summary/detail/download/payment-status
87
-		 * Minium payment status value for product download files
88
-		 *
89
-		 * This setting specifies the payment status value of an order for which
90
-		 * links to bought product download files are shown on the "thank you"
91
-		 * page, in the "MyAccount" and in the e-mails sent to the customers.
92
-		 *
93
-		 * The value is one of the payment constant values from
94
-		 * {@link https://github.com/aimeos/aimeos-core/blob/master/lib/mshoplib/src/MShop/Order/Item/Base.php#L105}.
95
-		 * Most of the time, only two values are of interest:
96
-		 * * 5: payment authorized
97
-		 * * 6: payment received
98
-		 *
99
-		 * @param integer Order payment constant value
100
-		 * @since 2016.3
101
-		 * @category User
102
-		 * @category Developer
103
-		 */
104
-		return $config->get( 'client/html/common/summary/detail/download/payment-status', $default );
105
-	}
86
+        /** client/html/common/summary/detail/download/payment-status
87
+         * Minium payment status value for product download files
88
+         *
89
+         * This setting specifies the payment status value of an order for which
90
+         * links to bought product download files are shown on the "thank you"
91
+         * page, in the "MyAccount" and in the e-mails sent to the customers.
92
+         *
93
+         * The value is one of the payment constant values from
94
+         * {@link https://github.com/aimeos/aimeos-core/blob/master/lib/mshoplib/src/MShop/Order/Item/Base.php#L105}.
95
+         * Most of the time, only two values are of interest:
96
+         * * 5: payment authorized
97
+         * * 6: payment received
98
+         *
99
+         * @param integer Order payment constant value
100
+         * @since 2016.3
101
+         * @category User
102
+         * @category Developer
103
+         */
104
+        return $config->get( 'client/html/common/summary/detail/download/payment-status', $default );
105
+    }
106 106
 }
107 107
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,47 +27,47 @@  discard block
 block discarded – undo
27 27
 	 * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket containing the products, services, etc.
28 28
 	 * @return array Associative list of tax rates as key and corresponding amounts as value
29 29
 	 */
30
-	protected function getTaxRates( \Aimeos\MShop\Order\Item\Base\Iface $basket )
30
+	protected function getTaxRates(\Aimeos\MShop\Order\Item\Base\Iface $basket)
31 31
 	{
32 32
 		$taxrates = array();
33 33
 
34
-		foreach( $basket->getProducts() as $product )
34
+		foreach ($basket->getProducts() as $product)
35 35
 		{
36 36
 			$price = clone $product->getPrice();
37 37
 			$taxrate = $price->getTaxrate();
38 38
 
39
-			if( isset( $taxrates[$taxrate] ) ) {
40
-				$taxrates[$taxrate]->addItem( $price, $product->getQuantity() );
39
+			if (isset($taxrates[$taxrate])) {
40
+				$taxrates[$taxrate]->addItem($price, $product->getQuantity());
41 41
 			} else {
42
-				$taxrates[$taxrate] = $price->addItem( $price, $product->getQuantity() - 1 );
42
+				$taxrates[$taxrate] = $price->addItem($price, $product->getQuantity() - 1);
43 43
 			}
44 44
 		}
45 45
 
46 46
 		try
47 47
 		{
48
-			$price = clone $basket->getService( 'delivery' )->getPrice();
48
+			$price = clone $basket->getService('delivery')->getPrice();
49 49
 			$taxrate = $price->getTaxrate();
50 50
 
51
-			if( isset( $taxrates[$taxrate] ) ) {
52
-				$taxrates[$taxrate]->addItem( $price );
51
+			if (isset($taxrates[$taxrate])) {
52
+				$taxrates[$taxrate]->addItem($price);
53 53
 			} else {
54 54
 				$taxrates[$taxrate] = $price;
55 55
 			}
56 56
 		}
57
-		catch( \Exception $e ) { ; } // if delivery service isn't available
57
+		catch (\Exception $e) {; } // if delivery service isn't available
58 58
 
59 59
 		try
60 60
 		{
61
-			$price = clone $basket->getService( 'payment' )->getPrice();
61
+			$price = clone $basket->getService('payment')->getPrice();
62 62
 			$taxrate = $price->getTaxrate();
63 63
 
64
-			if( isset( $taxrates[$taxrate] ) ) {
65
-				$taxrates[$taxrate]->addItem( $price );
64
+			if (isset($taxrates[$taxrate])) {
65
+				$taxrates[$taxrate]->addItem($price);
66 66
 			} else {
67 67
 				$taxrates[$taxrate] = $price;
68 68
 			}
69 69
 		}
70
-		catch( \Exception $e ) { ; } // if payment service isn't available
70
+		catch (\Exception $e) {; } // if payment service isn't available
71 71
 
72 72
 		return $taxrates;
73 73
 	}
@@ -101,6 +101,6 @@  discard block
 block discarded – undo
101 101
 		 * @category User
102 102
 		 * @category Developer
103 103
 		 */
104
-		return $config->get( 'client/html/common/summary/detail/download/payment-status', $default );
104
+		return $config->get('client/html/common/summary/detail/download/payment-status', $default);
105 105
 	}
106 106
 }
107 107
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 			} else {
54 54
 				$taxrates[$taxrate] = $price;
55 55
 			}
56
-		}
57
-		catch( \Exception $e ) { ; } // if delivery service isn't available
56
+		} catch( \Exception $e ) { ; } // if delivery service isn't available
58 57
 
59 58
 		try
60 59
 		{
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
 			} else {
67 66
 				$taxrates[$taxrate] = $price;
68 67
 			}
69
-		}
70
-		catch( \Exception $e ) { ; } // if payment service isn't available
68
+		} catch( \Exception $e ) { ; } // if payment service isn't available
71 69
 
72 70
 		return $taxrates;
73 71
 	}
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Summary/Address/Base.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 abstract class Base
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23 23
 {
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Client/Factory/Iface.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 interface Iface
22
-	extends \Aimeos\Client\Html\Iface
22
+    extends \Aimeos\Client\Html\Iface
23 23
 {
24
-	/**
25
-	 * Initializes the class instance.
26
-	 *
27
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
28
-	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29
-	 * 	and a list of relative paths inside the core or the extension as values
30
-	 * @return void
31
-	 */
32
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
24
+    /**
25
+     * Initializes the class instance.
26
+     *
27
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context object
28
+     * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
29
+     * 	and a list of relative paths inside the core or the extension as values
30
+     * @return void
31
+     */
32
+    public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
33 33
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,5 +29,5 @@
 block discarded – undo
29 29
 	 * 	and a list of relative paths inside the core or the extension as values
30 30
 	 * @return void
31 31
 	 */
32
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
32
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths);
33 33
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Decorator/Iface.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 interface Iface
22
-	extends \Aimeos\Client\Html\Iface
22
+    extends \Aimeos\Client\Html\Iface
23 23
 {
24
-	/**
25
-	 * Initializes a new client decorator object.
26
-	 *
27
-	 * @param \Aimeos\Client\Html\Iface $client Client object
28
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
29
-	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
30
-	 * 	and a list of relative paths inside the core or the extension as values
31
-	 */
32
-	public function __construct( \Aimeos\Client\Html\Iface $client,
33
-		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
24
+    /**
25
+     * Initializes a new client decorator object.
26
+     *
27
+     * @param \Aimeos\Client\Html\Iface $client Client object
28
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
29
+     * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
30
+     * 	and a list of relative paths inside the core or the extension as values
31
+     */
32
+    public function __construct( \Aimeos\Client\Html\Iface $client,
33
+        \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
 	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
30 30
 	 * 	and a list of relative paths inside the core or the extension as values
31 31
 	 */
32
-	public function __construct( \Aimeos\Client\Html\Iface $client,
33
-		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths );
32
+	public function __construct(\Aimeos\Client\Html\Iface $client,
33
+		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths);
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Decorator/Base.php 2 patches
Indentation   +162 added lines, -162 removed lines patch added patch discarded remove patch
@@ -19,167 +19,167 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 abstract class Base
22
-	extends \Aimeos\Client\Html\Base
23
-	implements \Aimeos\Client\Html\Common\Decorator\Iface
22
+    extends \Aimeos\Client\Html\Base
23
+    implements \Aimeos\Client\Html\Common\Decorator\Iface
24 24
 {
25
-	private $client;
26
-
27
-
28
-	/**
29
-	 * Initializes a new client decorator object.
30
-	 *
31
-	 * @param \Aimeos\Client\Html\Iface $client Client object
32
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
33
-	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
34
-	 * 	and a list of relative paths inside the core or the extension as values
35
-	 */
36
-	public function __construct( \Aimeos\Client\Html\Iface $client,
37
-		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
38
-	{
39
-		parent::__construct( $context, $templatePaths );
40
-
41
-		$this->client = $client;
42
-	}
43
-
44
-
45
-	/**
46
-	 * Passes unknown methods to wrapped objects.
47
-	 *
48
-	 * @param string $name Name of the method
49
-	 * @param array $param List of method parameter
50
-	 * @return mixed Returns the value of the called method
51
-	 * @throws \Aimeos\Client\Html\Exception If method call failed
52
-	 */
53
-	public function __call( $name, array $param )
54
-	{
55
-		if( ( $result = call_user_func_array( array( $this->client, $name ), $param ) ) === false ) {
56
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Unable to call method "%1$s"', $name ) );
57
-		}
58
-
59
-		return $result;
60
-	}
61
-
62
-
63
-	/**
64
-	 * Returns the sub-client given by its name.
65
-	 *
66
-	 * @param string $type Name of the client type
67
-	 * @param string|null $name Name of the sub-client (Default if null)
68
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
69
-	 */
70
-	public function getSubClient( $type, $name = null )
71
-	{
72
-		return $this->client->getSubClient( $type, $name );
73
-	}
74
-
75
-
76
-	/**
77
-	 * Returns the HTML string for insertion into the header.
78
-	 *
79
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
80
-	 * @param array &$tags Result array for the list of tags that are associated to the output
81
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
82
-	 * @return string|null String including HTML tags for the header on error
83
-	 */
84
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
85
-	{
86
-		return $this->client->getHeader( $uid, $tags, $expire );
87
-	}
88
-
89
-
90
-	/**
91
-	 * Returns the HTML code for insertion into the body.
92
-	 *
93
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
94
-	 * @param array &$tags Result array for the list of tags that are associated to the output
95
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
96
-	 * @return string HTML code
97
-	 */
98
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
99
-	{
100
-		return $this->client->getBody( $uid, $tags, $expire );
101
-	}
102
-
103
-
104
-	/**
105
-	 * Returns the view object that will generate the HTML output.
106
-	 *
107
-	 * @return \Aimeos\MW\View\Iface $view The view object which generates the HTML output
108
-	 */
109
-	public function getView()
110
-	{
111
-		return $this->client->getView();
112
-	}
113
-
114
-
115
-	/**
116
-	 * Sets the view object that will generate the HTML output.
117
-	 *
118
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
119
-	 * @return \Aimeos\Client\Html\Iface Reference to this object for fluent calls
120
-	 */
121
-	public function setView( \Aimeos\MW\View\Iface $view )
122
-	{
123
-		$this->client->setView( $view );
124
-		return $this;
125
-	}
126
-
127
-
128
-	/**
129
-	 * Modifies the cached body content to replace content based on sessions or cookies.
130
-	 *
131
-	 * @param string $content Cached content
132
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
133
-	 * @return string Modified body content
134
-	 */
135
-	public function modifyBody( $content, $uid )
136
-	{
137
-		return $this->client->modifyBody( $content, $uid );
138
-	}
139
-
140
-
141
-	/**
142
-	 * Modifies the cached header content to replace content based on sessions or cookies.
143
-	 *
144
-	 * @param string $content Cached content
145
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
146
-	 * @return string Modified header content
147
-	 */
148
-	public function modifyHeader( $content, $uid )
149
-	{
150
-		return $this->client->modifyHeader( $content, $uid );
151
-	}
152
-
153
-
154
-	/**
155
-	 * Processes the input, e.g. store given values.
156
-	 * A view must be available and this method doesn't generate any output
157
-	 * besides setting view variables.
158
-	 */
159
-	public function process()
160
-	{
161
-		$this->client->process();
162
-	}
163
-
164
-
165
-	/**
166
-	 * Returns the inner client object
167
-	 *
168
-	 * @return \Aimeos\Client\Html\Iface HTML client
169
-	 */
170
-	protected function getClient()
171
-	{
172
-		return $this->client;
173
-	}
174
-
175
-
176
-	/**
177
-	 * Returns the list of sub-client names configured for the client.
178
-	 *
179
-	 * @return array List of HTML client names
180
-	 */
181
-	protected function getSubClientNames()
182
-	{
183
-		return array();
184
-	}
25
+    private $client;
26
+
27
+
28
+    /**
29
+     * Initializes a new client decorator object.
30
+     *
31
+     * @param \Aimeos\Client\Html\Iface $client Client object
32
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
33
+     * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
34
+     * 	and a list of relative paths inside the core or the extension as values
35
+     */
36
+    public function __construct( \Aimeos\Client\Html\Iface $client,
37
+        \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
38
+    {
39
+        parent::__construct( $context, $templatePaths );
40
+
41
+        $this->client = $client;
42
+    }
43
+
44
+
45
+    /**
46
+     * Passes unknown methods to wrapped objects.
47
+     *
48
+     * @param string $name Name of the method
49
+     * @param array $param List of method parameter
50
+     * @return mixed Returns the value of the called method
51
+     * @throws \Aimeos\Client\Html\Exception If method call failed
52
+     */
53
+    public function __call( $name, array $param )
54
+    {
55
+        if( ( $result = call_user_func_array( array( $this->client, $name ), $param ) ) === false ) {
56
+            throw new \Aimeos\Client\Html\Exception( sprintf( 'Unable to call method "%1$s"', $name ) );
57
+        }
58
+
59
+        return $result;
60
+    }
61
+
62
+
63
+    /**
64
+     * Returns the sub-client given by its name.
65
+     *
66
+     * @param string $type Name of the client type
67
+     * @param string|null $name Name of the sub-client (Default if null)
68
+     * @return \Aimeos\Client\Html\Iface Sub-client object
69
+     */
70
+    public function getSubClient( $type, $name = null )
71
+    {
72
+        return $this->client->getSubClient( $type, $name );
73
+    }
74
+
75
+
76
+    /**
77
+     * Returns the HTML string for insertion into the header.
78
+     *
79
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
80
+     * @param array &$tags Result array for the list of tags that are associated to the output
81
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
82
+     * @return string|null String including HTML tags for the header on error
83
+     */
84
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
85
+    {
86
+        return $this->client->getHeader( $uid, $tags, $expire );
87
+    }
88
+
89
+
90
+    /**
91
+     * Returns the HTML code for insertion into the body.
92
+     *
93
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
94
+     * @param array &$tags Result array for the list of tags that are associated to the output
95
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
96
+     * @return string HTML code
97
+     */
98
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
99
+    {
100
+        return $this->client->getBody( $uid, $tags, $expire );
101
+    }
102
+
103
+
104
+    /**
105
+     * Returns the view object that will generate the HTML output.
106
+     *
107
+     * @return \Aimeos\MW\View\Iface $view The view object which generates the HTML output
108
+     */
109
+    public function getView()
110
+    {
111
+        return $this->client->getView();
112
+    }
113
+
114
+
115
+    /**
116
+     * Sets the view object that will generate the HTML output.
117
+     *
118
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
119
+     * @return \Aimeos\Client\Html\Iface Reference to this object for fluent calls
120
+     */
121
+    public function setView( \Aimeos\MW\View\Iface $view )
122
+    {
123
+        $this->client->setView( $view );
124
+        return $this;
125
+    }
126
+
127
+
128
+    /**
129
+     * Modifies the cached body content to replace content based on sessions or cookies.
130
+     *
131
+     * @param string $content Cached content
132
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
133
+     * @return string Modified body content
134
+     */
135
+    public function modifyBody( $content, $uid )
136
+    {
137
+        return $this->client->modifyBody( $content, $uid );
138
+    }
139
+
140
+
141
+    /**
142
+     * Modifies the cached header content to replace content based on sessions or cookies.
143
+     *
144
+     * @param string $content Cached content
145
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
146
+     * @return string Modified header content
147
+     */
148
+    public function modifyHeader( $content, $uid )
149
+    {
150
+        return $this->client->modifyHeader( $content, $uid );
151
+    }
152
+
153
+
154
+    /**
155
+     * Processes the input, e.g. store given values.
156
+     * A view must be available and this method doesn't generate any output
157
+     * besides setting view variables.
158
+     */
159
+    public function process()
160
+    {
161
+        $this->client->process();
162
+    }
163
+
164
+
165
+    /**
166
+     * Returns the inner client object
167
+     *
168
+     * @return \Aimeos\Client\Html\Iface HTML client
169
+     */
170
+    protected function getClient()
171
+    {
172
+        return $this->client;
173
+    }
174
+
175
+
176
+    /**
177
+     * Returns the list of sub-client names configured for the client.
178
+     *
179
+     * @return array List of HTML client names
180
+     */
181
+    protected function getSubClientNames()
182
+    {
183
+        return array();
184
+    }
185 185
 }
186 186
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
 	 * @param array $templatePaths Associative list of the file system paths to the core or the extensions as key
34 34
 	 * 	and a list of relative paths inside the core or the extension as values
35 35
 	 */
36
-	public function __construct( \Aimeos\Client\Html\Iface $client,
37
-		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths )
36
+	public function __construct(\Aimeos\Client\Html\Iface $client,
37
+		\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths)
38 38
 	{
39
-		parent::__construct( $context, $templatePaths );
39
+		parent::__construct($context, $templatePaths);
40 40
 
41 41
 		$this->client = $client;
42 42
 	}
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 	 * @return mixed Returns the value of the called method
51 51
 	 * @throws \Aimeos\Client\Html\Exception If method call failed
52 52
 	 */
53
-	public function __call( $name, array $param )
53
+	public function __call($name, array $param)
54 54
 	{
55
-		if( ( $result = call_user_func_array( array( $this->client, $name ), $param ) ) === false ) {
56
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Unable to call method "%1$s"', $name ) );
55
+		if (($result = call_user_func_array(array($this->client, $name), $param)) === false) {
56
+			throw new \Aimeos\Client\Html\Exception(sprintf('Unable to call method "%1$s"', $name));
57 57
 		}
58 58
 
59 59
 		return $result;
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 	 * @param string|null $name Name of the sub-client (Default if null)
68 68
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
69 69
 	 */
70
-	public function getSubClient( $type, $name = null )
70
+	public function getSubClient($type, $name = null)
71 71
 	{
72
-		return $this->client->getSubClient( $type, $name );
72
+		return $this->client->getSubClient($type, $name);
73 73
 	}
74 74
 
75 75
 
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
82 82
 	 * @return string|null String including HTML tags for the header on error
83 83
 	 */
84
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
84
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
85 85
 	{
86
-		return $this->client->getHeader( $uid, $tags, $expire );
86
+		return $this->client->getHeader($uid, $tags, $expire);
87 87
 	}
88 88
 
89 89
 
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
96 96
 	 * @return string HTML code
97 97
 	 */
98
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
98
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
99 99
 	{
100
-		return $this->client->getBody( $uid, $tags, $expire );
100
+		return $this->client->getBody($uid, $tags, $expire);
101 101
 	}
102 102
 
103 103
 
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
119 119
 	 * @return \Aimeos\Client\Html\Iface Reference to this object for fluent calls
120 120
 	 */
121
-	public function setView( \Aimeos\MW\View\Iface $view )
121
+	public function setView(\Aimeos\MW\View\Iface $view)
122 122
 	{
123
-		$this->client->setView( $view );
123
+		$this->client->setView($view);
124 124
 		return $this;
125 125
 	}
126 126
 
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
133 133
 	 * @return string Modified body content
134 134
 	 */
135
-	public function modifyBody( $content, $uid )
135
+	public function modifyBody($content, $uid)
136 136
 	{
137
-		return $this->client->modifyBody( $content, $uid );
137
+		return $this->client->modifyBody($content, $uid);
138 138
 	}
139 139
 
140 140
 
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
146 146
 	 * @return string Modified header content
147 147
 	 */
148
-	public function modifyHeader( $content, $uid )
148
+	public function modifyHeader($content, $uid)
149 149
 	{
150
-		return $this->client->modifyHeader( $content, $uid );
150
+		return $this->client->modifyHeader($content, $uid);
151 151
 	}
152 152
 
153 153
 
Please login to merge, or discard this patch.
client/html/src/Client/Html/Common/Factory/Iface.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
  */
21 21
 interface Iface
22 22
 {
23
-	/**
24
-	 *	Creates a client object.
25
-	 *
26
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
27
-	 * @param array List of file system paths where the templates are stored
28
-	 * @param string $name Client name (from configuration or "Standard" if null)
29
-	 * @return \Aimeos\Client\Html\Iface New client object
30
-	 */
31
-	public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null );
23
+    /**
24
+     *	Creates a client object.
25
+     *
26
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
27
+     * @param array List of file system paths where the templates are stored
28
+     * @param string $name Client name (from configuration or "Standard" if null)
29
+     * @return \Aimeos\Client\Html\Iface New client object
30
+     */
31
+    public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null );
32 32
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,5 +28,5 @@
 block discarded – undo
28 28
 	 * @param string $name Client name (from configuration or "Standard" if null)
29 29
 	 * @return \Aimeos\Client\Html\Iface New client object
30 30
 	 */
31
-	public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null );
31
+	public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null);
32 32
 }
Please login to merge, or discard this patch.