Completed
Push — master ( 55dc5c...4aebe4 )
by Aimeos
06:03
created
client/html/src/Client/Html/Email/Payment/Factory.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -19,69 +19,69 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Factory
22
-	extends \Aimeos\Client\Html\Common\Factory\Base
23
-	implements \Aimeos\Client\Html\Common\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Factory\Base
23
+    implements \Aimeos\Client\Html\Common\Factory\Iface
24 24
 {
25
-	/**
26
-	 * Creates a payment email client object.
27
-	 *
28
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Shop context instance with necessary objects
29
-	 * @param array $templatePaths List of file system paths where the templates are stored
30
-	 * @param string|null $name Client name (default: "Standard")
31
-	 * @return \Aimeos\Client\Html\Iface Filter part implementing \Aimeos\Client\Html\Iface
32
-	 * @throws \Aimeos\Client\Html\Exception If requested client implementation couldn't be found or initialisation fails
33
-	 */
34
-	public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null )
35
-	{
36
-		/** client/html/email/payment/name
37
-		 * Class name of the used email payment client implementation
38
-		 *
39
-		 * Each default HTML client can be replace by an alternative imlementation.
40
-		 * To use this implementation, you have to set the last part of the class
41
-		 * name as configuration value so the client factory knows which class it
42
-		 * has to instantiate.
43
-		 *
44
-		 * For example, if the name of the default class is
45
-		 *
46
-		 *  \Aimeos\Client\Html\Email\Payment\Standard
47
-		 *
48
-		 * and you want to replace it with your own version named
49
-		 *
50
-		 *  \Aimeos\Client\Html\Email\Payment\Mypayment
51
-		 *
52
-		 * then you have to set the this configuration option:
53
-		 *
54
-		 *  client/html/email/payment/name = Mypayment
55
-		 *
56
-		 * The value is the last part of your own class name and it's case sensitive,
57
-		 * so take care that the configuration value is exactly named like the last
58
-		 * part of the class name.
59
-		 *
60
-		 * The allowed characters of the class name are A-Z, a-z and 0-9. No other
61
-		 * characters are possible! You should always start the last part of the class
62
-		 * name with an upper case character and continue only with lower case characters
63
-		 * or numbers. Avoid chamel case names like "MyPayment"!
64
-		 *
65
-		 * @param string Last part of the class name
66
-		 * @since 2014.03
67
-		 * @category Developer
68
-		 */
69
-		if( $name === null ) {
70
-			$name = $context->getConfig()->get( 'client/html/email/payment/name', 'Standard' );
71
-		}
25
+    /**
26
+     * Creates a payment email client object.
27
+     *
28
+     * @param \Aimeos\MShop\Context\Item\Iface $context Shop context instance with necessary objects
29
+     * @param array $templatePaths List of file system paths where the templates are stored
30
+     * @param string|null $name Client name (default: "Standard")
31
+     * @return \Aimeos\Client\Html\Iface Filter part implementing \Aimeos\Client\Html\Iface
32
+     * @throws \Aimeos\Client\Html\Exception If requested client implementation couldn't be found or initialisation fails
33
+     */
34
+    public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null )
35
+    {
36
+        /** client/html/email/payment/name
37
+         * Class name of the used email payment client implementation
38
+         *
39
+         * Each default HTML client can be replace by an alternative imlementation.
40
+         * To use this implementation, you have to set the last part of the class
41
+         * name as configuration value so the client factory knows which class it
42
+         * has to instantiate.
43
+         *
44
+         * For example, if the name of the default class is
45
+         *
46
+         *  \Aimeos\Client\Html\Email\Payment\Standard
47
+         *
48
+         * and you want to replace it with your own version named
49
+         *
50
+         *  \Aimeos\Client\Html\Email\Payment\Mypayment
51
+         *
52
+         * then you have to set the this configuration option:
53
+         *
54
+         *  client/html/email/payment/name = Mypayment
55
+         *
56
+         * The value is the last part of your own class name and it's case sensitive,
57
+         * so take care that the configuration value is exactly named like the last
58
+         * part of the class name.
59
+         *
60
+         * The allowed characters of the class name are A-Z, a-z and 0-9. No other
61
+         * characters are possible! You should always start the last part of the class
62
+         * name with an upper case character and continue only with lower case characters
63
+         * or numbers. Avoid chamel case names like "MyPayment"!
64
+         *
65
+         * @param string Last part of the class name
66
+         * @since 2014.03
67
+         * @category Developer
68
+         */
69
+        if( $name === null ) {
70
+            $name = $context->getConfig()->get( 'client/html/email/payment/name', 'Standard' );
71
+        }
72 72
 
73
-		if( ctype_alnum( $name ) === false )
74
-		{
75
-			$classname = is_string( $name ) ? '\\Aimeos\\Client\\Html\\Email\\Payment\\' . $name : '<not a string>';
76
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
77
-		}
73
+        if( ctype_alnum( $name ) === false )
74
+        {
75
+            $classname = is_string( $name ) ? '\\Aimeos\\Client\\Html\\Email\\Payment\\' . $name : '<not a string>';
76
+            throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
77
+        }
78 78
 
79
-		$iface = '\\Aimeos\\Client\\Html\\Iface';
80
-		$classname = '\\Aimeos\\Client\\Html\\Email\\Payment\\' . $name;
79
+        $iface = '\\Aimeos\\Client\\Html\\Iface';
80
+        $classname = '\\Aimeos\\Client\\Html\\Email\\Payment\\' . $name;
81 81
 
82
-		$client = self::createClientBase( $context, $classname, $iface, $templatePaths );
82
+        $client = self::createClientBase( $context, $classname, $iface, $templatePaths );
83 83
 
84
-		return self::addClientDecorators( $context, $client, $templatePaths, 'email/payment' );
85
-	}
84
+        return self::addClientDecorators( $context, $client, $templatePaths, 'email/payment' );
85
+    }
86 86
 }
87 87
 
Please login to merge, or discard this patch.
client/html/src/Client/Html/Email/Payment/Standard.php 1 patch
Indentation   +403 added lines, -403 removed lines patch added patch discarded remove patch
@@ -19,408 +19,408 @@
 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/email/payment/standard/subparts
26
-	 * List of HTML sub-clients rendered within the email payment 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/email/payment/standard/subparts';
59
-
60
-	/** client/html/email/payment/text/name
61
-	 * Name of the text part used by the email payment client implementation
62
-	 *
63
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\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/email/payment/html/name
72
-	 * Name of the html part used by the email payment client implementation
73
-	 *
74
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Html\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
-	private $subPartNames = array( 'text', 'html' );
82
-
83
-
84
-	/**
85
-	 * Returns the HTML code for insertion into the body.
86
-	 *
87
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
88
-	 * @param array &$tags Result array for the list of tags that are associated to the output
89
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
90
-	 * @return string HTML code
91
-	 */
92
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
93
-	{
94
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
95
-
96
-		$content = '';
97
-		foreach( $this->getSubClients() as $subclient ) {
98
-			$content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
99
-		}
100
-		$view->paymentBody = $content;
101
-
102
-		/** client/html/email/payment/standard/template-body
103
-		 * Relative path to the HTML body template of the email payment client.
104
-		 *
105
-		 * The template file contains the HTML code and processing instructions
106
-		 * to generate the result shown in the body of the frontend. The
107
-		 * configuration string is the path to the template file relative
108
-		 * to the templates directory (usually in client/html/templates).
109
-		 *
110
-		 * You can overwrite the template file configuration in extensions and
111
-		 * provide alternative templates. These alternative templates should be
112
-		 * named like the default one but with the string "standard" replaced by
113
-		 * an unique name. You may use the name of your project for this. If
114
-		 * you've implemented an alternative client class as well, "standard"
115
-		 * should be replaced by the name of the new class.
116
-		 *
117
-		 * The email payment HTML client allows to use a different template for
118
-		 * each payment status value. You can create a template for each payment
119
-		 * status and store it in the "email/payment/<status number>/" directory
120
-		 * below the "templates" directory (usually in client/html/templates). If no
121
-		 * specific layout template is found, the common template in the
122
-		 * "email/payment/" directory is used.
123
-		 *
124
-		 * @param string Relative path to the template creating code for the HTML page body
125
-		 * @since 2014.03
126
-		 * @category Developer
127
-		 * @see client/html/email/payment/standard/template-header
128
-		 */
129
-		$tplconf = 'client/html/email/payment/standard/template-body';
130
-
131
-		$status = $view->extOrderItem->getPaymentStatus();
132
-		$default = array( 'email/payment/' . $status . '/body-default.php', 'email/payment/body-default.php' );
133
-
134
-		return $view->render( $view->config( $tplconf, $default ) );
135
-	}
136
-
137
-
138
-	/**
139
-	 * Returns the HTML string for insertion into the header.
140
-	 *
141
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
142
-	 * @param array &$tags Result array for the list of tags that are associated to the output
143
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
144
-	 * @return string|null String including HTML tags for the header on error
145
-	 */
146
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
147
-	{
148
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
149
-
150
-		$content = '';
151
-		foreach( $this->getSubClients() as $subclient ) {
152
-			$content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
153
-		}
154
-		$view->paymentHeader = $content;
155
-
156
-
157
-		$addr = $view->extAddressItem;
158
-
159
-		$msg = $view->mail();
160
-		$msg->addHeader( 'X-MailGenerator', 'Aimeos' );
161
-		$msg->addTo( $addr->getEMail(), $addr->getFirstName() . ' ' . $addr->getLastName() );
162
-
163
-
164
-		/** client/html/email/from-name
165
-		 * @see client/html/email/payment/from-email
166
-		 */
167
-		$fromName = $view->config( 'client/html/email/from-name' );
168
-
169
-		/** client/html/email/payment/from-name
170
-		 * Name used when sending payment e-mails
171
-		 *
172
-		 * The name of the person or e-mail account that is used for sending all
173
-		 * shop related payment e-mails to customers. This configuration option
174
-		 * overwrite the name set in "client/html/email/from-name".
175
-		 *
176
-		 * @param string Name shown in the e-mail
177
-		 * @since 2014.03
178
-		 * @category User
179
-		 * @see client/html/email/from-name
180
-		 * @see client/html/email/from-email
181
-		 * @see client/html/email/reply-email
182
-		 * @see client/html/email/bcc-email
183
-		 */
184
-		$fromNamePayment = $view->config( 'client/html/email/payment/from-name', $fromName );
185
-
186
-		/** client/html/email/from-email
187
-		 * @see client/html/email/payment/from-email
188
-		 */
189
-		$fromEmail = $view->config( 'client/html/email/from-email' );
190
-
191
-		/** client/html/email/payment/from-email
192
-		 * E-Mail address used when sending payment e-mails
193
-		 *
194
-		 * The e-mail address of the person or account that is used for sending
195
-		 * all shop related payment emails to customers. This configuration option
196
-		 * overwrites the e-mail address set via "client/html/email/from-email".
197
-		 *
198
-		 * @param string E-mail address
199
-		 * @since 2014.03
200
-		 * @category User
201
-		 * @see client/html/email/payment/from-name
202
-		 * @see client/html/email/from-email
203
-		 * @see client/html/email/reply-email
204
-		 * @see client/html/email/bcc-email
205
-		 */
206
-		if( ( $fromEmailPayment = $view->config( 'client/html/email/payment/from-email', $fromEmail ) ) != null ) {
207
-			$msg->addFrom( $fromEmailPayment, $fromNamePayment );
208
-		}
209
-
210
-
211
-		/** client/html/email/reply-name
212
-		 * @see client/html/email/payment/reply-email
213
-		 */
214
-		$replyName = $view->config( 'client/html/email/reply-name', $fromName );
215
-
216
-		/** client/html/email/payment/reply-name
217
-		 * Recipient name displayed when the customer replies to payment e-mails
218
-		 *
219
-		 * The name of the person or e-mail account the customer should
220
-		 * reply to in case of payment related questions or problems. This
221
-		 * configuration option overwrites the name set via
222
-		 * "client/html/email/reply-name".
223
-		 *
224
-		 * @param string Name shown in the e-mail
225
-		 * @since 2014.03
226
-		 * @category User
227
-		 * @see client/html/email/payment/reply-email
228
-		 * @see client/html/email/reply-name
229
-		 * @see client/html/email/reply-email
230
-		 * @see client/html/email/from-email
231
-		 * @see client/html/email/bcc-email
232
-		 */
233
-		$replyNamePayment = $view->config( 'client/html/email/payment/reply-name', $replyName );
234
-
235
-		/** client/html/email/reply-email
236
-		 * @see client/html/email/payment/reply-email
237
-		 */
238
-		$replyEmail = $view->config( 'client/html/email/reply-email', $fromEmail );
239
-
240
-		/** client/html/email/payment/reply-email
241
-		 * E-Mail address used by the customer when replying to payment e-mails
242
-		 *
243
-		 * The e-mail address of the person or e-mail account the customer
244
-		 * should reply to in case of payment related questions or problems.
245
-		 * This configuration option overwrites the e-mail address set via
246
-		 * "client/html/email/reply-email".
247
-		 *
248
-		 * @param string E-mail address
249
-		 * @since 2014.03
250
-		 * @category User
251
-		 * @see client/html/email/payment/reply-name
252
-		 * @see client/html/email/reply-email
253
-		 * @see client/html/email/from-email
254
-		 * @see client/html/email/bcc-email
255
-		 */
256
-		if( ( $replyEmailPayment = $view->config( 'client/html/email/payment/reply-email', $replyEmail ) ) != null ) {
257
-			$msg->addReplyTo( $replyEmailPayment, $replyNamePayment );
258
-		}
259
-
260
-
261
-		/** client/html/email/bcc-email
262
-		 * @see client/html/email/payment/bcc-email
263
-		 */
264
-		$bccEmail = $view->config( 'client/html/email/bcc-email' );
265
-
266
-		/** client/html/email/payment/bcc-email
267
-		 * E-Mail address all payment e-mails should be also sent to
268
-		 *
269
-		 * Using this option you can send a copy of all payment related e-mails
270
-		 * to a second e-mail account. This can be handy for testing and checking
271
-		 * the e-mails sent to customers.
272
-		 *
273
-		 * It also allows shop owners with a very small volume of orders to be
274
-		 * notified about payment changes. Be aware that this isn't useful if the
275
-		 * order volumne is high or has peeks!
276
-		 *
277
-		 * This configuration option overwrites the e-mail address set via
278
-		 * "client/html/email/bcc-email".
279
-		 *
280
-		 * @param string E-mail address
281
-		 * @since 2014.03
282
-		 * @category User
283
-		 * @category Developer
284
-		 * @see client/html/email/bcc-email
285
-		 * @see client/html/email/reply-email
286
-		 * @see client/html/email/from-email
287
-		 */
288
-		if( ( $bccEmailPayment = $view->config( 'client/html/email/payment/bcc-email', $bccEmail ) ) != null ) {
289
-			$msg->addBcc( $bccEmailPayment );
290
-		}
291
-
292
-
293
-		/** client/html/email/payment/standard/template-header
294
-		 * Relative path to the HTML header template of the email payment client.
295
-		 *
296
-		 * The template file contains the HTML code and processing instructions
297
-		 * to generate the HTML code that is inserted into the HTML page header
298
-		 * of the rendered page in the frontend. The configuration string is the
299
-		 * path to the template file relative to the templates directory (usually
300
-		 * in client/html/templates).
301
-		 *
302
-		 * You can overwrite the template file configuration in extensions and
303
-		 * provide alternative templates. These alternative templates should be
304
-		 * named like the default one but with the string "standard" replaced by
305
-		 * an unique name. You may use the name of your project for this. If
306
-		 * you've implemented an alternative client class as well, "standard"
307
-		 * should be replaced by the name of the new class.
308
-		 *
309
-		 * The email payment HTML client allows to use a different template for
310
-		 * each payment status value. You can create a template for each payment
311
-		 * status and store it in the "email/payment/<status number>/" directory
312
-		 * below the "templates" directory (usually in client/html/templates). If no
313
-		 * specific layout template is found, the common template in the
314
-		 * "email/payment/" directory is used.
315
-		 *
316
-		 * @param string Relative path to the template creating code for the HTML page head
317
-		 * @since 2014.03
318
-		 * @category Developer
319
-		 * @see client/html/email/payment/standard/template-body
320
-		 */
321
-		$tplconf = 'client/html/email/payment/standard/template-header';
322
-
323
-		$status = $view->extOrderItem->getPaymentStatus();
324
-		$default = array( 'email/payment/' . $status . '/header-default.php', 'email/payment/header-default.php' );
325
-
326
-		return $view->render( $view->config( $tplconf, $default ) ); ;
327
-	}
328
-
329
-
330
-	/**
331
-	 * Returns the sub-client given by its name.
332
-	 *
333
-	 * @param string $type Name of the client type
334
-	 * @param string|null $name Name of the sub-client (Default if null)
335
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
336
-	 */
337
-	public function getSubClient( $type, $name = null )
338
-	{
339
-		/** client/html/email/payment/decorators/excludes
340
-		 * Excludes decorators added by the "common" option from the email payment html client
341
-		 *
342
-		 * Decorators extend the functionality of a class by adding new aspects
343
-		 * (e.g. log what is currently done), executing the methods of the underlying
344
-		 * class only in certain conditions (e.g. only for logged in users) or
345
-		 * modify what is returned to the caller.
346
-		 *
347
-		 * This option allows you to remove a decorator added via
348
-		 * "client/html/common/decorators/default" before they are wrapped
349
-		 * around the html client.
350
-		 *
351
-		 *  client/html/email/payment/decorators/excludes = array( 'decorator1' )
352
-		 *
353
-		 * This would remove the decorator named "decorator1" from the list of
354
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
355
-		 * "client/html/common/decorators/default" to the html client.
356
-		 *
357
-		 * @param array List of decorator names
358
-		 * @since 2014.05
359
-		 * @category Developer
360
-		 * @see client/html/common/decorators/default
361
-		 * @see client/html/email/payment/decorators/global
362
-		 * @see client/html/email/payment/decorators/local
363
-		 */
364
-
365
-		/** client/html/email/payment/decorators/global
366
-		 * Adds a list of globally available decorators only to the email payment html client
367
-		 *
368
-		 * Decorators extend the functionality of a class by adding new aspects
369
-		 * (e.g. log what is currently done), executing the methods of the underlying
370
-		 * class only in certain conditions (e.g. only for logged in users) or
371
-		 * modify what is returned to the caller.
372
-		 *
373
-		 * This option allows you to wrap global decorators
374
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
375
-		 *
376
-		 *  client/html/email/payment/decorators/global = array( 'decorator1' )
377
-		 *
378
-		 * This would add the decorator named "decorator1" defined by
379
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
380
-		 *
381
-		 * @param array List of decorator names
382
-		 * @since 2014.05
383
-		 * @category Developer
384
-		 * @see client/html/common/decorators/default
385
-		 * @see client/html/email/payment/decorators/excludes
386
-		 * @see client/html/email/payment/decorators/local
387
-		 */
388
-
389
-		/** client/html/email/payment/decorators/local
390
-		 * Adds a list of local decorators only to the email payment html client
391
-		 *
392
-		 * Decorators extend the functionality of a class by adding new aspects
393
-		 * (e.g. log what is currently done), executing the methods of the underlying
394
-		 * class only in certain conditions (e.g. only for logged in users) or
395
-		 * modify what is returned to the caller.
396
-		 *
397
-		 * This option allows you to wrap local decorators
398
-		 * ("\Aimeos\Client\Html\Email\Decorator\*") around the html client.
399
-		 *
400
-		 *  client/html/email/payment/decorators/local = array( 'decorator2' )
401
-		 *
402
-		 * This would add the decorator named "decorator2" defined by
403
-		 * "\Aimeos\Client\Html\Email\Decorator\Decorator2" only to the html client.
404
-		 *
405
-		 * @param array List of decorator names
406
-		 * @since 2014.05
407
-		 * @category Developer
408
-		 * @see client/html/common/decorators/default
409
-		 * @see client/html/email/payment/decorators/excludes
410
-		 * @see client/html/email/payment/decorators/global
411
-		 */
412
-
413
-		return $this->createSubClient( 'email/payment/' . $type, $name );
414
-	}
415
-
416
-
417
-	/**
418
-	 * Returns the list of sub-client names configured for the client.
419
-	 *
420
-	 * @return array List of HTML client names
421
-	 */
422
-	protected function getSubClientNames()
423
-	{
424
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
425
-	}
25
+    /** client/html/email/payment/standard/subparts
26
+     * List of HTML sub-clients rendered within the email payment 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/email/payment/standard/subparts';
59
+
60
+    /** client/html/email/payment/text/name
61
+     * Name of the text part used by the email payment client implementation
62
+     *
63
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\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/email/payment/html/name
72
+     * Name of the html part used by the email payment client implementation
73
+     *
74
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Html\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
+    private $subPartNames = array( 'text', 'html' );
82
+
83
+
84
+    /**
85
+     * Returns the HTML code for insertion into the body.
86
+     *
87
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
88
+     * @param array &$tags Result array for the list of tags that are associated to the output
89
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
90
+     * @return string HTML code
91
+     */
92
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
93
+    {
94
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
95
+
96
+        $content = '';
97
+        foreach( $this->getSubClients() as $subclient ) {
98
+            $content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
99
+        }
100
+        $view->paymentBody = $content;
101
+
102
+        /** client/html/email/payment/standard/template-body
103
+         * Relative path to the HTML body template of the email payment client.
104
+         *
105
+         * The template file contains the HTML code and processing instructions
106
+         * to generate the result shown in the body of the frontend. The
107
+         * configuration string is the path to the template file relative
108
+         * to the templates directory (usually in client/html/templates).
109
+         *
110
+         * You can overwrite the template file configuration in extensions and
111
+         * provide alternative templates. These alternative templates should be
112
+         * named like the default one but with the string "standard" replaced by
113
+         * an unique name. You may use the name of your project for this. If
114
+         * you've implemented an alternative client class as well, "standard"
115
+         * should be replaced by the name of the new class.
116
+         *
117
+         * The email payment HTML client allows to use a different template for
118
+         * each payment status value. You can create a template for each payment
119
+         * status and store it in the "email/payment/<status number>/" directory
120
+         * below the "templates" directory (usually in client/html/templates). If no
121
+         * specific layout template is found, the common template in the
122
+         * "email/payment/" directory is used.
123
+         *
124
+         * @param string Relative path to the template creating code for the HTML page body
125
+         * @since 2014.03
126
+         * @category Developer
127
+         * @see client/html/email/payment/standard/template-header
128
+         */
129
+        $tplconf = 'client/html/email/payment/standard/template-body';
130
+
131
+        $status = $view->extOrderItem->getPaymentStatus();
132
+        $default = array( 'email/payment/' . $status . '/body-default.php', 'email/payment/body-default.php' );
133
+
134
+        return $view->render( $view->config( $tplconf, $default ) );
135
+    }
136
+
137
+
138
+    /**
139
+     * Returns the HTML string for insertion into the header.
140
+     *
141
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
142
+     * @param array &$tags Result array for the list of tags that are associated to the output
143
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
144
+     * @return string|null String including HTML tags for the header on error
145
+     */
146
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
147
+    {
148
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
149
+
150
+        $content = '';
151
+        foreach( $this->getSubClients() as $subclient ) {
152
+            $content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
153
+        }
154
+        $view->paymentHeader = $content;
155
+
156
+
157
+        $addr = $view->extAddressItem;
158
+
159
+        $msg = $view->mail();
160
+        $msg->addHeader( 'X-MailGenerator', 'Aimeos' );
161
+        $msg->addTo( $addr->getEMail(), $addr->getFirstName() . ' ' . $addr->getLastName() );
162
+
163
+
164
+        /** client/html/email/from-name
165
+         * @see client/html/email/payment/from-email
166
+         */
167
+        $fromName = $view->config( 'client/html/email/from-name' );
168
+
169
+        /** client/html/email/payment/from-name
170
+         * Name used when sending payment e-mails
171
+         *
172
+         * The name of the person or e-mail account that is used for sending all
173
+         * shop related payment e-mails to customers. This configuration option
174
+         * overwrite the name set in "client/html/email/from-name".
175
+         *
176
+         * @param string Name shown in the e-mail
177
+         * @since 2014.03
178
+         * @category User
179
+         * @see client/html/email/from-name
180
+         * @see client/html/email/from-email
181
+         * @see client/html/email/reply-email
182
+         * @see client/html/email/bcc-email
183
+         */
184
+        $fromNamePayment = $view->config( 'client/html/email/payment/from-name', $fromName );
185
+
186
+        /** client/html/email/from-email
187
+         * @see client/html/email/payment/from-email
188
+         */
189
+        $fromEmail = $view->config( 'client/html/email/from-email' );
190
+
191
+        /** client/html/email/payment/from-email
192
+         * E-Mail address used when sending payment e-mails
193
+         *
194
+         * The e-mail address of the person or account that is used for sending
195
+         * all shop related payment emails to customers. This configuration option
196
+         * overwrites the e-mail address set via "client/html/email/from-email".
197
+         *
198
+         * @param string E-mail address
199
+         * @since 2014.03
200
+         * @category User
201
+         * @see client/html/email/payment/from-name
202
+         * @see client/html/email/from-email
203
+         * @see client/html/email/reply-email
204
+         * @see client/html/email/bcc-email
205
+         */
206
+        if( ( $fromEmailPayment = $view->config( 'client/html/email/payment/from-email', $fromEmail ) ) != null ) {
207
+            $msg->addFrom( $fromEmailPayment, $fromNamePayment );
208
+        }
209
+
210
+
211
+        /** client/html/email/reply-name
212
+         * @see client/html/email/payment/reply-email
213
+         */
214
+        $replyName = $view->config( 'client/html/email/reply-name', $fromName );
215
+
216
+        /** client/html/email/payment/reply-name
217
+         * Recipient name displayed when the customer replies to payment e-mails
218
+         *
219
+         * The name of the person or e-mail account the customer should
220
+         * reply to in case of payment related questions or problems. This
221
+         * configuration option overwrites the name set via
222
+         * "client/html/email/reply-name".
223
+         *
224
+         * @param string Name shown in the e-mail
225
+         * @since 2014.03
226
+         * @category User
227
+         * @see client/html/email/payment/reply-email
228
+         * @see client/html/email/reply-name
229
+         * @see client/html/email/reply-email
230
+         * @see client/html/email/from-email
231
+         * @see client/html/email/bcc-email
232
+         */
233
+        $replyNamePayment = $view->config( 'client/html/email/payment/reply-name', $replyName );
234
+
235
+        /** client/html/email/reply-email
236
+         * @see client/html/email/payment/reply-email
237
+         */
238
+        $replyEmail = $view->config( 'client/html/email/reply-email', $fromEmail );
239
+
240
+        /** client/html/email/payment/reply-email
241
+         * E-Mail address used by the customer when replying to payment e-mails
242
+         *
243
+         * The e-mail address of the person or e-mail account the customer
244
+         * should reply to in case of payment related questions or problems.
245
+         * This configuration option overwrites the e-mail address set via
246
+         * "client/html/email/reply-email".
247
+         *
248
+         * @param string E-mail address
249
+         * @since 2014.03
250
+         * @category User
251
+         * @see client/html/email/payment/reply-name
252
+         * @see client/html/email/reply-email
253
+         * @see client/html/email/from-email
254
+         * @see client/html/email/bcc-email
255
+         */
256
+        if( ( $replyEmailPayment = $view->config( 'client/html/email/payment/reply-email', $replyEmail ) ) != null ) {
257
+            $msg->addReplyTo( $replyEmailPayment, $replyNamePayment );
258
+        }
259
+
260
+
261
+        /** client/html/email/bcc-email
262
+         * @see client/html/email/payment/bcc-email
263
+         */
264
+        $bccEmail = $view->config( 'client/html/email/bcc-email' );
265
+
266
+        /** client/html/email/payment/bcc-email
267
+         * E-Mail address all payment e-mails should be also sent to
268
+         *
269
+         * Using this option you can send a copy of all payment related e-mails
270
+         * to a second e-mail account. This can be handy for testing and checking
271
+         * the e-mails sent to customers.
272
+         *
273
+         * It also allows shop owners with a very small volume of orders to be
274
+         * notified about payment changes. Be aware that this isn't useful if the
275
+         * order volumne is high or has peeks!
276
+         *
277
+         * This configuration option overwrites the e-mail address set via
278
+         * "client/html/email/bcc-email".
279
+         *
280
+         * @param string E-mail address
281
+         * @since 2014.03
282
+         * @category User
283
+         * @category Developer
284
+         * @see client/html/email/bcc-email
285
+         * @see client/html/email/reply-email
286
+         * @see client/html/email/from-email
287
+         */
288
+        if( ( $bccEmailPayment = $view->config( 'client/html/email/payment/bcc-email', $bccEmail ) ) != null ) {
289
+            $msg->addBcc( $bccEmailPayment );
290
+        }
291
+
292
+
293
+        /** client/html/email/payment/standard/template-header
294
+         * Relative path to the HTML header template of the email payment client.
295
+         *
296
+         * The template file contains the HTML code and processing instructions
297
+         * to generate the HTML code that is inserted into the HTML page header
298
+         * of the rendered page in the frontend. The configuration string is the
299
+         * path to the template file relative to the templates directory (usually
300
+         * in client/html/templates).
301
+         *
302
+         * You can overwrite the template file configuration in extensions and
303
+         * provide alternative templates. These alternative templates should be
304
+         * named like the default one but with the string "standard" replaced by
305
+         * an unique name. You may use the name of your project for this. If
306
+         * you've implemented an alternative client class as well, "standard"
307
+         * should be replaced by the name of the new class.
308
+         *
309
+         * The email payment HTML client allows to use a different template for
310
+         * each payment status value. You can create a template for each payment
311
+         * status and store it in the "email/payment/<status number>/" directory
312
+         * below the "templates" directory (usually in client/html/templates). If no
313
+         * specific layout template is found, the common template in the
314
+         * "email/payment/" directory is used.
315
+         *
316
+         * @param string Relative path to the template creating code for the HTML page head
317
+         * @since 2014.03
318
+         * @category Developer
319
+         * @see client/html/email/payment/standard/template-body
320
+         */
321
+        $tplconf = 'client/html/email/payment/standard/template-header';
322
+
323
+        $status = $view->extOrderItem->getPaymentStatus();
324
+        $default = array( 'email/payment/' . $status . '/header-default.php', 'email/payment/header-default.php' );
325
+
326
+        return $view->render( $view->config( $tplconf, $default ) ); ;
327
+    }
328
+
329
+
330
+    /**
331
+     * Returns the sub-client given by its name.
332
+     *
333
+     * @param string $type Name of the client type
334
+     * @param string|null $name Name of the sub-client (Default if null)
335
+     * @return \Aimeos\Client\Html\Iface Sub-client object
336
+     */
337
+    public function getSubClient( $type, $name = null )
338
+    {
339
+        /** client/html/email/payment/decorators/excludes
340
+         * Excludes decorators added by the "common" option from the email payment html client
341
+         *
342
+         * Decorators extend the functionality of a class by adding new aspects
343
+         * (e.g. log what is currently done), executing the methods of the underlying
344
+         * class only in certain conditions (e.g. only for logged in users) or
345
+         * modify what is returned to the caller.
346
+         *
347
+         * This option allows you to remove a decorator added via
348
+         * "client/html/common/decorators/default" before they are wrapped
349
+         * around the html client.
350
+         *
351
+         *  client/html/email/payment/decorators/excludes = array( 'decorator1' )
352
+         *
353
+         * This would remove the decorator named "decorator1" from the list of
354
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
355
+         * "client/html/common/decorators/default" to the html client.
356
+         *
357
+         * @param array List of decorator names
358
+         * @since 2014.05
359
+         * @category Developer
360
+         * @see client/html/common/decorators/default
361
+         * @see client/html/email/payment/decorators/global
362
+         * @see client/html/email/payment/decorators/local
363
+         */
364
+
365
+        /** client/html/email/payment/decorators/global
366
+         * Adds a list of globally available decorators only to the email payment html client
367
+         *
368
+         * Decorators extend the functionality of a class by adding new aspects
369
+         * (e.g. log what is currently done), executing the methods of the underlying
370
+         * class only in certain conditions (e.g. only for logged in users) or
371
+         * modify what is returned to the caller.
372
+         *
373
+         * This option allows you to wrap global decorators
374
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
375
+         *
376
+         *  client/html/email/payment/decorators/global = array( 'decorator1' )
377
+         *
378
+         * This would add the decorator named "decorator1" defined by
379
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
380
+         *
381
+         * @param array List of decorator names
382
+         * @since 2014.05
383
+         * @category Developer
384
+         * @see client/html/common/decorators/default
385
+         * @see client/html/email/payment/decorators/excludes
386
+         * @see client/html/email/payment/decorators/local
387
+         */
388
+
389
+        /** client/html/email/payment/decorators/local
390
+         * Adds a list of local decorators only to the email payment html client
391
+         *
392
+         * Decorators extend the functionality of a class by adding new aspects
393
+         * (e.g. log what is currently done), executing the methods of the underlying
394
+         * class only in certain conditions (e.g. only for logged in users) or
395
+         * modify what is returned to the caller.
396
+         *
397
+         * This option allows you to wrap local decorators
398
+         * ("\Aimeos\Client\Html\Email\Decorator\*") around the html client.
399
+         *
400
+         *  client/html/email/payment/decorators/local = array( 'decorator2' )
401
+         *
402
+         * This would add the decorator named "decorator2" defined by
403
+         * "\Aimeos\Client\Html\Email\Decorator\Decorator2" only to the html client.
404
+         *
405
+         * @param array List of decorator names
406
+         * @since 2014.05
407
+         * @category Developer
408
+         * @see client/html/common/decorators/default
409
+         * @see client/html/email/payment/decorators/excludes
410
+         * @see client/html/email/payment/decorators/global
411
+         */
412
+
413
+        return $this->createSubClient( 'email/payment/' . $type, $name );
414
+    }
415
+
416
+
417
+    /**
418
+     * Returns the list of sub-client names configured for the client.
419
+     *
420
+     * @return array List of HTML client names
421
+     */
422
+    protected function getSubClientNames()
423
+    {
424
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
425
+    }
426 426
 }
427 427
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Email/Payment/Text/Summary/Service/Standard.php 1 patch
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -19,231 +19,231 @@
 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/email/payment/text/summary/service/standard/subparts
26
-	 * List of HTML sub-clients rendered within the email payment text summary service 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/email/payment/text/summary/service/standard/subparts';
59
-	private $subPartNames = array();
60
-
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 );
73
-
74
-		$content = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
-		}
78
-		$view->summaryBody = $content;
79
-
80
-		/** client/html/email/payment/text/summary/service/standard/template-body
81
-		 * Relative path to the text body template of the email payment text summary service client.
82
-		 *
83
-		 * The template file contains the text and processing instructions
84
-		 * to generate the result shown in the body of the e-mail. 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 e-mail body
96
-		 * @since 2014.03
97
-		 * @category Developer
98
-		 * @see client/html/email/payment/text/summary/service/standard/template-header
99
-		 */
100
-		$tplconf = 'client/html/email/payment/text/summary/service/standard/template-body';
101
-		$default = 'email/common/text-summary-service-body-default.php';
102
-
103
-		return $view->render( $view->config( $tplconf, $default ) );
104
-	}
105
-
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 );
118
-
119
-		$content = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
-		}
123
-		$view->summaryHeader = $content;
124
-
125
-		/** client/html/email/payment/text/summary/service/standard/template-header
126
-		 * Relative path to the text header template of the email payment text summary service client.
127
-		 *
128
-		 * The template file contains the text and processing instructions
129
-		 * to generate the text that is inserted into the header
130
-		 * of the e-mail. 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 e-mail header
142
-		 * @since 2014.03
143
-		 * @category Developer
144
-		 * @see client/html/email/payment/text/summary/service/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/email/payment/text/summary/service/standard/template-header';
147
-		$default = 'email/common/text-summary-service-header-default.php';
148
-
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
151
-
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/email/payment/text/summary/service/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the "email payment text summary service" 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/email/payment/text/summary/service/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/email/payment/text/summary/service/decorators/global
185
-		 * @see client/html/email/payment/text/summary/service/decorators/local
186
-		 */
187
-
188
-		/** client/html/email/payment/text/summary/service/decorators/global
189
-		 * Adds a list of globally available decorators only to the "email payment text summary service" 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/email/payment/text/summary/service/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/email/payment/text/summary/service/decorators/excludes
209
-		 * @see client/html/email/payment/text/summary/service/decorators/local
210
-		 */
211
-
212
-		/** client/html/email/payment/text/summary/service/decorators/local
213
-		 * Adds a list of local decorators only to the "email payment text summary service" 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/email/payment/text/summary/service/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/email/payment/text/summary/service/decorators/excludes
233
-		 * @see client/html/email/payment/text/summary/service/decorators/global
234
-		 */
235
-
236
-		return $this->createSubClient( 'email/payment/text/summary/service/' . $type, $name );
237
-	}
238
-
239
-
240
-	/**
241
-	 * Returns the list of sub-client names configured for the client.
242
-	 *
243
-	 * @return array List of HTML client names
244
-	 */
245
-	protected function getSubClientNames()
246
-	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
-	}
25
+    /** client/html/email/payment/text/summary/service/standard/subparts
26
+     * List of HTML sub-clients rendered within the email payment text summary service 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/email/payment/text/summary/service/standard/subparts';
59
+    private $subPartNames = array();
60
+
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 );
73
+
74
+        $content = '';
75
+        foreach( $this->getSubClients() as $subclient ) {
76
+            $content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
+        }
78
+        $view->summaryBody = $content;
79
+
80
+        /** client/html/email/payment/text/summary/service/standard/template-body
81
+         * Relative path to the text body template of the email payment text summary service client.
82
+         *
83
+         * The template file contains the text and processing instructions
84
+         * to generate the result shown in the body of the e-mail. 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 e-mail body
96
+         * @since 2014.03
97
+         * @category Developer
98
+         * @see client/html/email/payment/text/summary/service/standard/template-header
99
+         */
100
+        $tplconf = 'client/html/email/payment/text/summary/service/standard/template-body';
101
+        $default = 'email/common/text-summary-service-body-default.php';
102
+
103
+        return $view->render( $view->config( $tplconf, $default ) );
104
+    }
105
+
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 );
118
+
119
+        $content = '';
120
+        foreach( $this->getSubClients() as $subclient ) {
121
+            $content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
+        }
123
+        $view->summaryHeader = $content;
124
+
125
+        /** client/html/email/payment/text/summary/service/standard/template-header
126
+         * Relative path to the text header template of the email payment text summary service client.
127
+         *
128
+         * The template file contains the text and processing instructions
129
+         * to generate the text that is inserted into the header
130
+         * of the e-mail. 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 e-mail header
142
+         * @since 2014.03
143
+         * @category Developer
144
+         * @see client/html/email/payment/text/summary/service/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/email/payment/text/summary/service/standard/template-header';
147
+        $default = 'email/common/text-summary-service-header-default.php';
148
+
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151
+
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/email/payment/text/summary/service/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the "email payment text summary service" 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/email/payment/text/summary/service/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/email/payment/text/summary/service/decorators/global
185
+         * @see client/html/email/payment/text/summary/service/decorators/local
186
+         */
187
+
188
+        /** client/html/email/payment/text/summary/service/decorators/global
189
+         * Adds a list of globally available decorators only to the "email payment text summary service" 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/email/payment/text/summary/service/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/email/payment/text/summary/service/decorators/excludes
209
+         * @see client/html/email/payment/text/summary/service/decorators/local
210
+         */
211
+
212
+        /** client/html/email/payment/text/summary/service/decorators/local
213
+         * Adds a list of local decorators only to the "email payment text summary service" 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/email/payment/text/summary/service/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/email/payment/text/summary/service/decorators/excludes
233
+         * @see client/html/email/payment/text/summary/service/decorators/global
234
+         */
235
+
236
+        return $this->createSubClient( 'email/payment/text/summary/service/' . $type, $name );
237
+    }
238
+
239
+
240
+    /**
241
+     * Returns the list of sub-client names configured for the client.
242
+     *
243
+     * @return array List of HTML client names
244
+     */
245
+    protected function getSubClientNames()
246
+    {
247
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
+    }
249 249
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Email/Payment/Text/Summary/Coupon/Standard.php 1 patch
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -19,231 +19,231 @@
 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/email/payment/text/summary/coupon/standard/subparts
26
-	 * List of HTML sub-clients rendered within the email payment text summary coupon 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/email/payment/text/summary/coupon/standard/subparts';
59
-	private $subPartNames = array();
60
-
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 );
73
-
74
-		$content = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
-		}
78
-		$view->summaryBody = $content;
79
-
80
-		/** client/html/email/payment/text/summary/coupon/standard/template-body
81
-		 * Relative path to the text body template of the email payment text summary coupon client.
82
-		 *
83
-		 * The template file contains the text and processing instructions
84
-		 * to generate the result shown in the body of the e-mail. 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 e-mail body
96
-		 * @since 2014.03
97
-		 * @category Developer
98
-		 * @see client/html/email/payment/text/summary/coupon/standard/template-header
99
-		 */
100
-		$tplconf = 'client/html/email/payment/text/summary/coupon/standard/template-body';
101
-		$default = 'email/common/text-summary-coupon-body-default.php';
102
-
103
-		return $view->render( $view->config( $tplconf, $default ) );
104
-	}
105
-
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 );
118
-
119
-		$content = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
-		}
123
-		$view->summaryHeader = $content;
124
-
125
-		/** client/html/email/payment/text/summary/coupon/standard/template-header
126
-		 * Relative path to the text header template of the email payment text summary coupon client.
127
-		 *
128
-		 * The template file contains the text and processing instructions
129
-		 * to generate the text that is inserted into the header
130
-		 * of the e-mail. 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 e-mail header
142
-		 * @since 2014.03
143
-		 * @category Developer
144
-		 * @see client/html/email/payment/text/summary/coupon/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/email/payment/text/summary/coupon/standard/template-header';
147
-		$default = 'email/common/text-summary-coupon-header-default.php';
148
-
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
151
-
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/email/payment/text/summary/coupon/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the "email payment text summary coupon" 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/email/payment/text/summary/coupon/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/email/payment/text/summary/coupon/decorators/global
185
-		 * @see client/html/email/payment/text/summary/coupon/decorators/local
186
-		 */
187
-
188
-		/** client/html/email/payment/text/summary/coupon/decorators/global
189
-		 * Adds a list of globally available decorators only to the "email payment text summary coupon" 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/email/payment/text/summary/coupon/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/email/payment/text/summary/coupon/decorators/excludes
209
-		 * @see client/html/email/payment/text/summary/coupon/decorators/local
210
-		 */
211
-
212
-		/** client/html/email/payment/text/summary/coupon/decorators/local
213
-		 * Adds a list of local decorators only to the "email payment text summary coupon" 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/email/payment/text/summary/coupon/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/email/payment/text/summary/coupon/decorators/excludes
233
-		 * @see client/html/email/payment/text/summary/coupon/decorators/global
234
-		 */
235
-
236
-		return $this->createSubClient( 'email/payment/text/summary/coupon/' . $type, $name );
237
-	}
238
-
239
-
240
-	/**
241
-	 * Returns the list of sub-client names configured for the client.
242
-	 *
243
-	 * @return array List of HTML client names
244
-	 */
245
-	protected function getSubClientNames()
246
-	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
-	}
25
+    /** client/html/email/payment/text/summary/coupon/standard/subparts
26
+     * List of HTML sub-clients rendered within the email payment text summary coupon 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/email/payment/text/summary/coupon/standard/subparts';
59
+    private $subPartNames = array();
60
+
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 );
73
+
74
+        $content = '';
75
+        foreach( $this->getSubClients() as $subclient ) {
76
+            $content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
+        }
78
+        $view->summaryBody = $content;
79
+
80
+        /** client/html/email/payment/text/summary/coupon/standard/template-body
81
+         * Relative path to the text body template of the email payment text summary coupon client.
82
+         *
83
+         * The template file contains the text and processing instructions
84
+         * to generate the result shown in the body of the e-mail. 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 e-mail body
96
+         * @since 2014.03
97
+         * @category Developer
98
+         * @see client/html/email/payment/text/summary/coupon/standard/template-header
99
+         */
100
+        $tplconf = 'client/html/email/payment/text/summary/coupon/standard/template-body';
101
+        $default = 'email/common/text-summary-coupon-body-default.php';
102
+
103
+        return $view->render( $view->config( $tplconf, $default ) );
104
+    }
105
+
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 );
118
+
119
+        $content = '';
120
+        foreach( $this->getSubClients() as $subclient ) {
121
+            $content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
+        }
123
+        $view->summaryHeader = $content;
124
+
125
+        /** client/html/email/payment/text/summary/coupon/standard/template-header
126
+         * Relative path to the text header template of the email payment text summary coupon client.
127
+         *
128
+         * The template file contains the text and processing instructions
129
+         * to generate the text that is inserted into the header
130
+         * of the e-mail. 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 e-mail header
142
+         * @since 2014.03
143
+         * @category Developer
144
+         * @see client/html/email/payment/text/summary/coupon/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/email/payment/text/summary/coupon/standard/template-header';
147
+        $default = 'email/common/text-summary-coupon-header-default.php';
148
+
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151
+
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/email/payment/text/summary/coupon/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the "email payment text summary coupon" 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/email/payment/text/summary/coupon/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/email/payment/text/summary/coupon/decorators/global
185
+         * @see client/html/email/payment/text/summary/coupon/decorators/local
186
+         */
187
+
188
+        /** client/html/email/payment/text/summary/coupon/decorators/global
189
+         * Adds a list of globally available decorators only to the "email payment text summary coupon" 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/email/payment/text/summary/coupon/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/email/payment/text/summary/coupon/decorators/excludes
209
+         * @see client/html/email/payment/text/summary/coupon/decorators/local
210
+         */
211
+
212
+        /** client/html/email/payment/text/summary/coupon/decorators/local
213
+         * Adds a list of local decorators only to the "email payment text summary coupon" 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/email/payment/text/summary/coupon/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/email/payment/text/summary/coupon/decorators/excludes
233
+         * @see client/html/email/payment/text/summary/coupon/decorators/global
234
+         */
235
+
236
+        return $this->createSubClient( 'email/payment/text/summary/coupon/' . $type, $name );
237
+    }
238
+
239
+
240
+    /**
241
+     * Returns the list of sub-client names configured for the client.
242
+     *
243
+     * @return array List of HTML client names
244
+     */
245
+    protected function getSubClientNames()
246
+    {
247
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
+    }
249 249
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Email/Payment/Text/Summary/Detail/Standard.php 1 patch
Indentation   +225 added lines, -225 removed lines patch added patch discarded remove patch
@@ -19,251 +19,251 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Summary\Detail\Base
22
+    extends \Aimeos\Client\Html\Common\Summary\Detail\Base
23 23
 {
24
-	/** client/html/email/payment/text/summary/detail/standard/subparts
25
-	 * List of HTML sub-clients rendered within the email payment text summary detail section
26
-	 *
27
-	 * The output of the frontend is composed of the code generated by the HTML
28
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
29
-	 * that are responsible for rendering certain sub-parts of the output. The
30
-	 * sub-clients can contain HTML clients themselves and therefore a
31
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
32
-	 * the output that is placed inside the container of its parent.
33
-	 *
34
-	 * At first, always the HTML code generated by the parent is printed, then
35
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
36
-	 * determines the order of the output of these sub-clients inside the parent
37
-	 * container. If the configured list of clients is
38
-	 *
39
-	 *  array( "subclient1", "subclient2" )
40
-	 *
41
-	 * you can easily change the order of the output by reordering the subparts:
42
-	 *
43
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
44
-	 *
45
-	 * You can also remove one or more parts if they shouldn't be rendered:
46
-	 *
47
-	 *  client/html/<clients>/subparts = array( "subclient1" )
48
-	 *
49
-	 * As the clients only generates structural HTML, the layout defined via CSS
50
-	 * should support adding, removing or reordering content by a fluid like
51
-	 * design.
52
-	 *
53
-	 * @param array List of sub-client names
54
-	 * @since 2014.03
55
-	 * @category Developer
56
-	 */
57
-	private $subPartPath = 'client/html/email/payment/text/summary/detail/standard/subparts';
58
-	private $subPartNames = array();
24
+    /** client/html/email/payment/text/summary/detail/standard/subparts
25
+     * List of HTML sub-clients rendered within the email payment text summary detail section
26
+     *
27
+     * The output of the frontend is composed of the code generated by the HTML
28
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
29
+     * that are responsible for rendering certain sub-parts of the output. The
30
+     * sub-clients can contain HTML clients themselves and therefore a
31
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
32
+     * the output that is placed inside the container of its parent.
33
+     *
34
+     * At first, always the HTML code generated by the parent is printed, then
35
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
36
+     * determines the order of the output of these sub-clients inside the parent
37
+     * container. If the configured list of clients is
38
+     *
39
+     *  array( "subclient1", "subclient2" )
40
+     *
41
+     * you can easily change the order of the output by reordering the subparts:
42
+     *
43
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
44
+     *
45
+     * You can also remove one or more parts if they shouldn't be rendered:
46
+     *
47
+     *  client/html/<clients>/subparts = array( "subclient1" )
48
+     *
49
+     * As the clients only generates structural HTML, the layout defined via CSS
50
+     * should support adding, removing or reordering content by a fluid like
51
+     * design.
52
+     *
53
+     * @param array List of sub-client names
54
+     * @since 2014.03
55
+     * @category Developer
56
+     */
57
+    private $subPartPath = 'client/html/email/payment/text/summary/detail/standard/subparts';
58
+    private $subPartNames = array();
59 59
 
60 60
 
61
-	/**
62
-	 * Returns the HTML code for insertion into the body.
63
-	 *
64
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
65
-	 * @param array &$tags Result array for the list of tags that are associated to the output
66
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
67
-	 * @return string HTML code
68
-	 */
69
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
70
-	{
71
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
61
+    /**
62
+     * Returns the HTML code for insertion into the body.
63
+     *
64
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
65
+     * @param array &$tags Result array for the list of tags that are associated to the output
66
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
67
+     * @return string HTML code
68
+     */
69
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
70
+    {
71
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
72 72
 
73
-		$content = '';
74
-		foreach( $this->getSubClients() as $subclient ) {
75
-			$content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
76
-		}
77
-		$view->summaryBody = $content;
73
+        $content = '';
74
+        foreach( $this->getSubClients() as $subclient ) {
75
+            $content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
76
+        }
77
+        $view->summaryBody = $content;
78 78
 
79
-		/** client/html/email/payment/text/summary/detail/standard/template-body
80
-		 * Relative path to the text body template of the email payment text summary detail client.
81
-		 *
82
-		 * The template file contains the text and processing instructions
83
-		 * to generate the result shown in the body of the e-mail. The
84
-		 * configuration string is the path to the template file relative
85
-		 * to the templates directory (usually in client/html/templates).
86
-		 *
87
-		 * You can overwrite the template file configuration in extensions and
88
-		 * provide alternative templates. These alternative templates should be
89
-		 * named like the default one but with the string "standard" replaced by
90
-		 * an unique name. You may use the name of your project for this. If
91
-		 * you've implemented an alternative client class as well, "standard"
92
-		 * should be replaced by the name of the new class.
93
-		 *
94
-		 * @param string Relative path to the template creating code for the e-mail body
95
-		 * @since 2014.03
96
-		 * @category Developer
97
-		 * @see client/html/email/payment/text/summary/detail/standard/template-header
98
-		 */
99
-		$tplconf = 'client/html/email/payment/text/summary/detail/standard/template-body';
100
-		$default = 'email/common/text-summary-detail-body-default.php';
79
+        /** client/html/email/payment/text/summary/detail/standard/template-body
80
+         * Relative path to the text body template of the email payment text summary detail client.
81
+         *
82
+         * The template file contains the text and processing instructions
83
+         * to generate the result shown in the body of the e-mail. The
84
+         * configuration string is the path to the template file relative
85
+         * to the templates directory (usually in client/html/templates).
86
+         *
87
+         * You can overwrite the template file configuration in extensions and
88
+         * provide alternative templates. These alternative templates should be
89
+         * named like the default one but with the string "standard" replaced by
90
+         * an unique name. You may use the name of your project for this. If
91
+         * you've implemented an alternative client class as well, "standard"
92
+         * should be replaced by the name of the new class.
93
+         *
94
+         * @param string Relative path to the template creating code for the e-mail body
95
+         * @since 2014.03
96
+         * @category Developer
97
+         * @see client/html/email/payment/text/summary/detail/standard/template-header
98
+         */
99
+        $tplconf = 'client/html/email/payment/text/summary/detail/standard/template-body';
100
+        $default = 'email/common/text-summary-detail-body-default.php';
101 101
 
102
-		return $view->render( $view->config( $tplconf, $default ) );
103
-	}
102
+        return $view->render( $view->config( $tplconf, $default ) );
103
+    }
104 104
 
105 105
 
106
-	/**
107
-	 * Returns the HTML string for insertion into the header.
108
-	 *
109
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
110
-	 * @param array &$tags Result array for the list of tags that are associated to the output
111
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
112
-	 * @return string|null String including HTML tags for the header on error
113
-	 */
114
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
115
-	{
116
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
106
+    /**
107
+     * Returns the HTML string for insertion into the header.
108
+     *
109
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
110
+     * @param array &$tags Result array for the list of tags that are associated to the output
111
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
112
+     * @return string|null String including HTML tags for the header on error
113
+     */
114
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
115
+    {
116
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
117 117
 
118
-		$content = '';
119
-		foreach( $this->getSubClients() as $subclient ) {
120
-			$content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
121
-		}
122
-		$view->summaryHeader = $content;
118
+        $content = '';
119
+        foreach( $this->getSubClients() as $subclient ) {
120
+            $content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
121
+        }
122
+        $view->summaryHeader = $content;
123 123
 
124
-		/** client/html/email/payment/text/summary/detail/standard/template-header
125
-		 * Relative path to the text header template of the email payment text summary detail client.
126
-		 *
127
-		 * The template file contains the text and processing instructions
128
-		 * to generate the text that is inserted into the header
129
-		 * of the e-mail. The configuration string is the
130
-		 * path to the template file relative to the templates directory (usually
131
-		 * in client/html/templates).
132
-		 *
133
-		 * You can overwrite the template file configuration in extensions and
134
-		 * provide alternative templates. These alternative templates should be
135
-		 * named like the default one but with the string "standard" replaced by
136
-		 * an unique name. You may use the name of your project for this. If
137
-		 * you've implemented an alternative client class as well, "standard"
138
-		 * should be replaced by the name of the new class.
139
-		 *
140
-		 * @param string Relative path to the template creating code for the e-mail header
141
-		 * @since 2014.03
142
-		 * @category Developer
143
-		 * @see client/html/email/payment/text/summary/detail/standard/template-body
144
-		 */
145
-		$tplconf = 'client/html/email/payment/text/summary/detail/standard/template-header';
146
-		$default = 'email/common/text-summary-detail-header-default.php';
124
+        /** client/html/email/payment/text/summary/detail/standard/template-header
125
+         * Relative path to the text header template of the email payment text summary detail client.
126
+         *
127
+         * The template file contains the text and processing instructions
128
+         * to generate the text that is inserted into the header
129
+         * of the e-mail. The configuration string is the
130
+         * path to the template file relative to the templates directory (usually
131
+         * in client/html/templates).
132
+         *
133
+         * You can overwrite the template file configuration in extensions and
134
+         * provide alternative templates. These alternative templates should be
135
+         * named like the default one but with the string "standard" replaced by
136
+         * an unique name. You may use the name of your project for this. If
137
+         * you've implemented an alternative client class as well, "standard"
138
+         * should be replaced by the name of the new class.
139
+         *
140
+         * @param string Relative path to the template creating code for the e-mail header
141
+         * @since 2014.03
142
+         * @category Developer
143
+         * @see client/html/email/payment/text/summary/detail/standard/template-body
144
+         */
145
+        $tplconf = 'client/html/email/payment/text/summary/detail/standard/template-header';
146
+        $default = 'email/common/text-summary-detail-header-default.php';
147 147
 
148
-		return $view->render( $view->config( $tplconf, $default ) );
149
-	}
148
+        return $view->render( $view->config( $tplconf, $default ) );
149
+    }
150 150
 
151 151
 
152
-	/**
153
-	 * Returns the sub-client given by its name.
154
-	 *
155
-	 * @param string $type Name of the client type
156
-	 * @param string|null $name Name of the sub-client (Default if null)
157
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
158
-	 */
159
-	public function getSubClient( $type, $name = null )
160
-	{
161
-		/** client/html/email/payment/text/summary/detail/decorators/excludes
162
-		 * Excludes decorators added by the "common" option from the "email payment text summary detail" html client
163
-		 *
164
-		 * Decorators extend the functionality of a class by adding new aspects
165
-		 * (e.g. log what is currently done), executing the methods of the underlying
166
-		 * class only in certain conditions (e.g. only for logged in users) or
167
-		 * modify what is returned to the caller.
168
-		 *
169
-		 * This option allows you to remove a decorator added via
170
-		 * "client/html/common/decorators/default" before they are wrapped
171
-		 * around the html client.
172
-		 *
173
-		 *  client/html/email/payment/text/summary/detail/decorators/excludes = array( 'decorator1' )
174
-		 *
175
-		 * This would remove the decorator named "decorator1" from the list of
176
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
177
-		 * "client/html/common/decorators/default" to the html client.
178
-		 *
179
-		 * @param array List of decorator names
180
-		 * @since 2015.08
181
-		 * @category Developer
182
-		 * @see client/html/common/decorators/default
183
-		 * @see client/html/email/payment/text/summary/detail/decorators/global
184
-		 * @see client/html/email/payment/text/summary/detail/decorators/local
185
-		 */
152
+    /**
153
+     * Returns the sub-client given by its name.
154
+     *
155
+     * @param string $type Name of the client type
156
+     * @param string|null $name Name of the sub-client (Default if null)
157
+     * @return \Aimeos\Client\Html\Iface Sub-client object
158
+     */
159
+    public function getSubClient( $type, $name = null )
160
+    {
161
+        /** client/html/email/payment/text/summary/detail/decorators/excludes
162
+         * Excludes decorators added by the "common" option from the "email payment text summary detail" html client
163
+         *
164
+         * Decorators extend the functionality of a class by adding new aspects
165
+         * (e.g. log what is currently done), executing the methods of the underlying
166
+         * class only in certain conditions (e.g. only for logged in users) or
167
+         * modify what is returned to the caller.
168
+         *
169
+         * This option allows you to remove a decorator added via
170
+         * "client/html/common/decorators/default" before they are wrapped
171
+         * around the html client.
172
+         *
173
+         *  client/html/email/payment/text/summary/detail/decorators/excludes = array( 'decorator1' )
174
+         *
175
+         * This would remove the decorator named "decorator1" from the list of
176
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
177
+         * "client/html/common/decorators/default" to the html client.
178
+         *
179
+         * @param array List of decorator names
180
+         * @since 2015.08
181
+         * @category Developer
182
+         * @see client/html/common/decorators/default
183
+         * @see client/html/email/payment/text/summary/detail/decorators/global
184
+         * @see client/html/email/payment/text/summary/detail/decorators/local
185
+         */
186 186
 
187
-		/** client/html/email/payment/text/summary/detail/decorators/global
188
-		 * Adds a list of globally available decorators only to the "email payment text summary detail" html client
189
-		 *
190
-		 * Decorators extend the functionality of a class by adding new aspects
191
-		 * (e.g. log what is currently done), executing the methods of the underlying
192
-		 * class only in certain conditions (e.g. only for logged in users) or
193
-		 * modify what is returned to the caller.
194
-		 *
195
-		 * This option allows you to wrap global decorators
196
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
197
-		 *
198
-		 *  client/html/email/payment/text/summary/detail/decorators/global = array( 'decorator1' )
199
-		 *
200
-		 * This would add the decorator named "decorator1" defined by
201
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
202
-		 *
203
-		 * @param array List of decorator names
204
-		 * @since 2015.08
205
-		 * @category Developer
206
-		 * @see client/html/common/decorators/default
207
-		 * @see client/html/email/payment/text/summary/detail/decorators/excludes
208
-		 * @see client/html/email/payment/text/summary/detail/decorators/local
209
-		 */
187
+        /** client/html/email/payment/text/summary/detail/decorators/global
188
+         * Adds a list of globally available decorators only to the "email payment text summary detail" html client
189
+         *
190
+         * Decorators extend the functionality of a class by adding new aspects
191
+         * (e.g. log what is currently done), executing the methods of the underlying
192
+         * class only in certain conditions (e.g. only for logged in users) or
193
+         * modify what is returned to the caller.
194
+         *
195
+         * This option allows you to wrap global decorators
196
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
197
+         *
198
+         *  client/html/email/payment/text/summary/detail/decorators/global = array( 'decorator1' )
199
+         *
200
+         * This would add the decorator named "decorator1" defined by
201
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
202
+         *
203
+         * @param array List of decorator names
204
+         * @since 2015.08
205
+         * @category Developer
206
+         * @see client/html/common/decorators/default
207
+         * @see client/html/email/payment/text/summary/detail/decorators/excludes
208
+         * @see client/html/email/payment/text/summary/detail/decorators/local
209
+         */
210 210
 
211
-		/** client/html/email/payment/text/summary/detail/decorators/local
212
-		 * Adds a list of local decorators only to the "email payment text summary detail" html client
213
-		 *
214
-		 * Decorators extend the functionality of a class by adding new aspects
215
-		 * (e.g. log what is currently done), executing the methods of the underlying
216
-		 * class only in certain conditions (e.g. only for logged in users) or
217
-		 * modify what is returned to the caller.
218
-		 *
219
-		 * This option allows you to wrap local decorators
220
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
221
-		 *
222
-		 *  client/html/email/payment/text/summary/detail/decorators/local = array( 'decorator2' )
223
-		 *
224
-		 * This would add the decorator named "decorator2" defined by
225
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
226
-		 *
227
-		 * @param array List of decorator names
228
-		 * @since 2015.08
229
-		 * @category Developer
230
-		 * @see client/html/common/decorators/default
231
-		 * @see client/html/email/payment/text/summary/detail/decorators/excludes
232
-		 * @see client/html/email/payment/text/summary/detail/decorators/global
233
-		 */
211
+        /** client/html/email/payment/text/summary/detail/decorators/local
212
+         * Adds a list of local decorators only to the "email payment text summary detail" html client
213
+         *
214
+         * Decorators extend the functionality of a class by adding new aspects
215
+         * (e.g. log what is currently done), executing the methods of the underlying
216
+         * class only in certain conditions (e.g. only for logged in users) or
217
+         * modify what is returned to the caller.
218
+         *
219
+         * This option allows you to wrap local decorators
220
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
221
+         *
222
+         *  client/html/email/payment/text/summary/detail/decorators/local = array( 'decorator2' )
223
+         *
224
+         * This would add the decorator named "decorator2" defined by
225
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
226
+         *
227
+         * @param array List of decorator names
228
+         * @since 2015.08
229
+         * @category Developer
230
+         * @see client/html/common/decorators/default
231
+         * @see client/html/email/payment/text/summary/detail/decorators/excludes
232
+         * @see client/html/email/payment/text/summary/detail/decorators/global
233
+         */
234 234
 
235
-		return $this->createSubClient( 'email/payment/text/summary/detail/' . $type, $name );
236
-	}
235
+        return $this->createSubClient( 'email/payment/text/summary/detail/' . $type, $name );
236
+    }
237 237
 
238 238
 
239
-	/**
240
-	 * Returns the list of sub-client names configured for the client.
241
-	 *
242
-	 * @return array List of HTML client names
243
-	 */
244
-	protected function getSubClientNames()
245
-	{
246
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
247
-	}
239
+    /**
240
+     * Returns the list of sub-client names configured for the client.
241
+     *
242
+     * @return array List of HTML client names
243
+     */
244
+    protected function getSubClientNames()
245
+    {
246
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
247
+    }
248 248
 
249 249
 
250
-	/**
251
-	 * Sets the necessary parameter values in the view.
252
-	 *
253
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
254
-	 * @param array &$tags Result array for the list of tags that are associated to the output
255
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
256
-	 * @return \Aimeos\MW\View\Iface Modified view object
257
-	 */
258
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
259
-	{
260
-		// we can't cache the calculation because the same client object is used for all e-mails
261
-		$view->summaryTaxRates = $this->getTaxRates( $view->extOrderBaseItem );
250
+    /**
251
+     * Sets the necessary parameter values in the view.
252
+     *
253
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
254
+     * @param array &$tags Result array for the list of tags that are associated to the output
255
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
256
+     * @return \Aimeos\MW\View\Iface Modified view object
257
+     */
258
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
259
+    {
260
+        // we can't cache the calculation because the same client object is used for all e-mails
261
+        $view->summaryTaxRates = $this->getTaxRates( $view->extOrderBaseItem );
262 262
 
263
-		if( $view->extOrderItem->getPaymentStatus() >= $this->getDownloadPaymentStatus() ) {
264
-			$view->summaryShowDownloadAttributes = true;
265
-		}
263
+        if( $view->extOrderItem->getPaymentStatus() >= $this->getDownloadPaymentStatus() ) {
264
+            $view->summaryShowDownloadAttributes = true;
265
+        }
266 266
 
267
-		return $view;
268
-	}
267
+        return $view;
268
+    }
269 269
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Email/Payment/Text/Summary/Standard.php 1 patch
Indentation   +262 added lines, -262 removed lines patch added patch discarded remove patch
@@ -19,291 +19,291 @@
 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/email/payment/text/summary/standard/subparts
26
-	 * List of HTML sub-clients rendered within the email payment text summary 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/email/payment/text/summary/standard/subparts';
25
+    /** client/html/email/payment/text/summary/standard/subparts
26
+     * List of HTML sub-clients rendered within the email payment text summary 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/email/payment/text/summary/standard/subparts';
59 59
 
60
-	/** client/html/email/payment/text/summary/address/name
61
-	 * Name of the address part used by the email payment text client implementation
62
-	 *
63
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Summary\Address\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
-	 */
60
+    /** client/html/email/payment/text/summary/address/name
61
+     * Name of the address part used by the email payment text client implementation
62
+     *
63
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Summary\Address\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 70
 
71
-	/** client/html/email/payment/text/summary/service/name
72
-	 * Name of the service part used by the email payment text client implementation
73
-	 *
74
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Summary\Service\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
-	 */
71
+    /** client/html/email/payment/text/summary/service/name
72
+     * Name of the service part used by the email payment text client implementation
73
+     *
74
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Summary\Service\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 81
 
82
-	/** client/html/email/payment/text/summary/coupon/name
83
-	 * Name of the coupon part used by the email payment text client implementation
84
-	 *
85
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Summary\Coupon\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.05
90
-	 * @category Developer
91
-	 */
82
+    /** client/html/email/payment/text/summary/coupon/name
83
+     * Name of the coupon part used by the email payment text client implementation
84
+     *
85
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Summary\Coupon\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.05
90
+     * @category Developer
91
+     */
92 92
 
93
-	/** client/html/email/payment/text/summary/detail/name
94
-	 * Name of the detail part used by the email payment text client implementation
95
-	 *
96
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Detail\Address\Myname".
97
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
98
-	 *
99
-	 * @param string Last part of the client class name
100
-	 * @since 2014.03
101
-	 * @category Developer
102
-	 */
103
-	private $subPartNames = array( 'address', 'service', 'coupon', 'detail' );
93
+    /** client/html/email/payment/text/summary/detail/name
94
+     * Name of the detail part used by the email payment text client implementation
95
+     *
96
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Detail\Address\Myname".
97
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
98
+     *
99
+     * @param string Last part of the client class name
100
+     * @since 2014.03
101
+     * @category Developer
102
+     */
103
+    private $subPartNames = array( 'address', 'service', 'coupon', 'detail' );
104 104
 
105 105
 
106
-	/**
107
-	 * Returns the HTML code for insertion into the body.
108
-	 *
109
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
110
-	 * @param array &$tags Result array for the list of tags that are associated to the output
111
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
112
-	 * @return string HTML code
113
-	 */
114
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
115
-	{
116
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
106
+    /**
107
+     * Returns the HTML code for insertion into the body.
108
+     *
109
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
110
+     * @param array &$tags Result array for the list of tags that are associated to the output
111
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
112
+     * @return string HTML code
113
+     */
114
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
115
+    {
116
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
117 117
 
118
-		$content = '';
119
-		foreach( $this->getSubClients() as $subclient ) {
120
-			$content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
121
-		}
122
-		$view->summaryBody = $content;
118
+        $content = '';
119
+        foreach( $this->getSubClients() as $subclient ) {
120
+            $content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
121
+        }
122
+        $view->summaryBody = $content;
123 123
 
124
-		/** client/html/email/payment/text/summary/standard/template-body
125
-		 * Relative path to the text body template of the email payment text summary client.
126
-		 *
127
-		 * The template file contains the text and processing instructions
128
-		 * to generate the result shown in the body of the e-mail. The
129
-		 * configuration string is the path to the template file relative
130
-		 * to the templates directory (usually in client/html/templates).
131
-		 *
132
-		 * You can overwrite the template file configuration in extensions and
133
-		 * provide alternative templates. These alternative templates should be
134
-		 * named like the default one but with the string "standard" replaced by
135
-		 * an unique name. You may use the name of your project for this. If
136
-		 * you've implemented an alternative client class as well, "standard"
137
-		 * should be replaced by the name of the new class.
138
-		 *
139
-		 * @param string Relative path to the template creating code for the e-mail body
140
-		 * @since 2014.03
141
-		 * @category Developer
142
-		 * @see client/html/email/payment/text/summary/standard/template-header
143
-		 */
144
-		$tplconf = 'client/html/email/payment/text/summary/standard/template-body';
145
-		$default = 'email/common/text-summary-body-default.php';
124
+        /** client/html/email/payment/text/summary/standard/template-body
125
+         * Relative path to the text body template of the email payment text summary client.
126
+         *
127
+         * The template file contains the text and processing instructions
128
+         * to generate the result shown in the body of the e-mail. The
129
+         * configuration string is the path to the template file relative
130
+         * to the templates directory (usually in client/html/templates).
131
+         *
132
+         * You can overwrite the template file configuration in extensions and
133
+         * provide alternative templates. These alternative templates should be
134
+         * named like the default one but with the string "standard" replaced by
135
+         * an unique name. You may use the name of your project for this. If
136
+         * you've implemented an alternative client class as well, "standard"
137
+         * should be replaced by the name of the new class.
138
+         *
139
+         * @param string Relative path to the template creating code for the e-mail body
140
+         * @since 2014.03
141
+         * @category Developer
142
+         * @see client/html/email/payment/text/summary/standard/template-header
143
+         */
144
+        $tplconf = 'client/html/email/payment/text/summary/standard/template-body';
145
+        $default = 'email/common/text-summary-body-default.php';
146 146
 
147
-		return $view->render( $view->config( $tplconf, $default ) );
148
-	}
147
+        return $view->render( $view->config( $tplconf, $default ) );
148
+    }
149 149
 
150 150
 
151
-	/**
152
-	 * Returns the HTML string for insertion into the header.
153
-	 *
154
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
155
-	 * @param array &$tags Result array for the list of tags that are associated to the output
156
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
157
-	 * @return string|null String including HTML tags for the header on error
158
-	 */
159
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
160
-	{
161
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
151
+    /**
152
+     * Returns the HTML string for insertion into the header.
153
+     *
154
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
155
+     * @param array &$tags Result array for the list of tags that are associated to the output
156
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
157
+     * @return string|null String including HTML tags for the header on error
158
+     */
159
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
160
+    {
161
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
162 162
 
163
-		$content = '';
164
-		foreach( $this->getSubClients() as $subclient ) {
165
-			$content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
166
-		}
167
-		$view->summaryHeader = $content;
163
+        $content = '';
164
+        foreach( $this->getSubClients() as $subclient ) {
165
+            $content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
166
+        }
167
+        $view->summaryHeader = $content;
168 168
 
169
-		/** client/html/email/payment/text/summary/standard/template-header
170
-		 * Relative path to the text header template of the email payment text summary client.
171
-		 *
172
-		 * The template file contains the text and processing instructions
173
-		 * to generate the text that is inserted into the header
174
-		 * of the e-mail. The configuration string is the
175
-		 * path to the template file relative to the templates directory (usually
176
-		 * in client/html/templates).
177
-		 *
178
-		 * You can overwrite the template file configuration in extensions and
179
-		 * provide alternative templates. These alternative templates should be
180
-		 * named like the default one but with the string "standard" replaced by
181
-		 * an unique name. You may use the name of your project for this. If
182
-		 * you've implemented an alternative client class as well, "standard"
183
-		 * should be replaced by the name of the new class.
184
-		 *
185
-		 * @param string Relative path to the template creating code for the e-mail header
186
-		 * @since 2014.03
187
-		 * @category Developer
188
-		 * @see client/html/email/payment/text/summary/standard/template-body
189
-		 */
190
-		$tplconf = 'client/html/email/payment/text/summary/standard/template-header';
191
-		$default = 'email/common/text-summary-header-default.php';
169
+        /** client/html/email/payment/text/summary/standard/template-header
170
+         * Relative path to the text header template of the email payment text summary client.
171
+         *
172
+         * The template file contains the text and processing instructions
173
+         * to generate the text that is inserted into the header
174
+         * of the e-mail. The configuration string is the
175
+         * path to the template file relative to the templates directory (usually
176
+         * in client/html/templates).
177
+         *
178
+         * You can overwrite the template file configuration in extensions and
179
+         * provide alternative templates. These alternative templates should be
180
+         * named like the default one but with the string "standard" replaced by
181
+         * an unique name. You may use the name of your project for this. If
182
+         * you've implemented an alternative client class as well, "standard"
183
+         * should be replaced by the name of the new class.
184
+         *
185
+         * @param string Relative path to the template creating code for the e-mail header
186
+         * @since 2014.03
187
+         * @category Developer
188
+         * @see client/html/email/payment/text/summary/standard/template-body
189
+         */
190
+        $tplconf = 'client/html/email/payment/text/summary/standard/template-header';
191
+        $default = 'email/common/text-summary-header-default.php';
192 192
 
193
-		return $view->render( $view->config( $tplconf, $default ) );
194
-	}
193
+        return $view->render( $view->config( $tplconf, $default ) );
194
+    }
195 195
 
196 196
 
197
-	/**
198
-	 * Returns the sub-client given by its name.
199
-	 *
200
-	 * @param string $type Name of the client type
201
-	 * @param string|null $name Name of the sub-client (Default if null)
202
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
203
-	 */
204
-	public function getSubClient( $type, $name = null )
205
-	{
206
-		/** client/html/email/payment/text/summary/decorators/excludes
207
-		 * Excludes decorators added by the "common" option from the "email payment text summary" html client
208
-		 *
209
-		 * Decorators extend the functionality of a class by adding new aspects
210
-		 * (e.g. log what is currently done), executing the methods of the underlying
211
-		 * class only in certain conditions (e.g. only for logged in users) or
212
-		 * modify what is returned to the caller.
213
-		 *
214
-		 * This option allows you to remove a decorator added via
215
-		 * "client/html/common/decorators/default" before they are wrapped
216
-		 * around the html client.
217
-		 *
218
-		 *  client/html/email/payment/text/summary/decorators/excludes = array( 'decorator1' )
219
-		 *
220
-		 * This would remove the decorator named "decorator1" from the list of
221
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
222
-		 * "client/html/common/decorators/default" to the html client.
223
-		 *
224
-		 * @param array List of decorator names
225
-		 * @since 2015.08
226
-		 * @category Developer
227
-		 * @see client/html/common/decorators/default
228
-		 * @see client/html/email/payment/text/summary/decorators/global
229
-		 * @see client/html/email/payment/text/summary/decorators/local
230
-		 */
197
+    /**
198
+     * Returns the sub-client given by its name.
199
+     *
200
+     * @param string $type Name of the client type
201
+     * @param string|null $name Name of the sub-client (Default if null)
202
+     * @return \Aimeos\Client\Html\Iface Sub-client object
203
+     */
204
+    public function getSubClient( $type, $name = null )
205
+    {
206
+        /** client/html/email/payment/text/summary/decorators/excludes
207
+         * Excludes decorators added by the "common" option from the "email payment text summary" html client
208
+         *
209
+         * Decorators extend the functionality of a class by adding new aspects
210
+         * (e.g. log what is currently done), executing the methods of the underlying
211
+         * class only in certain conditions (e.g. only for logged in users) or
212
+         * modify what is returned to the caller.
213
+         *
214
+         * This option allows you to remove a decorator added via
215
+         * "client/html/common/decorators/default" before they are wrapped
216
+         * around the html client.
217
+         *
218
+         *  client/html/email/payment/text/summary/decorators/excludes = array( 'decorator1' )
219
+         *
220
+         * This would remove the decorator named "decorator1" from the list of
221
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
222
+         * "client/html/common/decorators/default" to the html client.
223
+         *
224
+         * @param array List of decorator names
225
+         * @since 2015.08
226
+         * @category Developer
227
+         * @see client/html/common/decorators/default
228
+         * @see client/html/email/payment/text/summary/decorators/global
229
+         * @see client/html/email/payment/text/summary/decorators/local
230
+         */
231 231
 
232
-		/** client/html/email/payment/text/summary/decorators/global
233
-		 * Adds a list of globally available decorators only to the "email payment text summary" html client
234
-		 *
235
-		 * Decorators extend the functionality of a class by adding new aspects
236
-		 * (e.g. log what is currently done), executing the methods of the underlying
237
-		 * class only in certain conditions (e.g. only for logged in users) or
238
-		 * modify what is returned to the caller.
239
-		 *
240
-		 * This option allows you to wrap global decorators
241
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
242
-		 *
243
-		 *  client/html/email/payment/text/summary/decorators/global = array( 'decorator1' )
244
-		 *
245
-		 * This would add the decorator named "decorator1" defined by
246
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
247
-		 *
248
-		 * @param array List of decorator names
249
-		 * @since 2015.08
250
-		 * @category Developer
251
-		 * @see client/html/common/decorators/default
252
-		 * @see client/html/email/payment/text/summary/decorators/excludes
253
-		 * @see client/html/email/payment/text/summary/decorators/local
254
-		 */
232
+        /** client/html/email/payment/text/summary/decorators/global
233
+         * Adds a list of globally available decorators only to the "email payment text summary" html client
234
+         *
235
+         * Decorators extend the functionality of a class by adding new aspects
236
+         * (e.g. log what is currently done), executing the methods of the underlying
237
+         * class only in certain conditions (e.g. only for logged in users) or
238
+         * modify what is returned to the caller.
239
+         *
240
+         * This option allows you to wrap global decorators
241
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
242
+         *
243
+         *  client/html/email/payment/text/summary/decorators/global = array( 'decorator1' )
244
+         *
245
+         * This would add the decorator named "decorator1" defined by
246
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
247
+         *
248
+         * @param array List of decorator names
249
+         * @since 2015.08
250
+         * @category Developer
251
+         * @see client/html/common/decorators/default
252
+         * @see client/html/email/payment/text/summary/decorators/excludes
253
+         * @see client/html/email/payment/text/summary/decorators/local
254
+         */
255 255
 
256
-		/** client/html/email/payment/text/summary/decorators/local
257
-		 * Adds a list of local decorators only to the "email payment text summary" html client
258
-		 *
259
-		 * Decorators extend the functionality of a class by adding new aspects
260
-		 * (e.g. log what is currently done), executing the methods of the underlying
261
-		 * class only in certain conditions (e.g. only for logged in users) or
262
-		 * modify what is returned to the caller.
263
-		 *
264
-		 * This option allows you to wrap local decorators
265
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
266
-		 *
267
-		 *  client/html/email/payment/text/summary/decorators/local = array( 'decorator2' )
268
-		 *
269
-		 * This would add the decorator named "decorator2" defined by
270
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
271
-		 *
272
-		 * @param array List of decorator names
273
-		 * @since 2015.08
274
-		 * @category Developer
275
-		 * @see client/html/common/decorators/default
276
-		 * @see client/html/email/payment/text/summary/decorators/excludes
277
-		 * @see client/html/email/payment/text/summary/decorators/global
278
-		 */
256
+        /** client/html/email/payment/text/summary/decorators/local
257
+         * Adds a list of local decorators only to the "email payment text summary" html client
258
+         *
259
+         * Decorators extend the functionality of a class by adding new aspects
260
+         * (e.g. log what is currently done), executing the methods of the underlying
261
+         * class only in certain conditions (e.g. only for logged in users) or
262
+         * modify what is returned to the caller.
263
+         *
264
+         * This option allows you to wrap local decorators
265
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
266
+         *
267
+         *  client/html/email/payment/text/summary/decorators/local = array( 'decorator2' )
268
+         *
269
+         * This would add the decorator named "decorator2" defined by
270
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
271
+         *
272
+         * @param array List of decorator names
273
+         * @since 2015.08
274
+         * @category Developer
275
+         * @see client/html/common/decorators/default
276
+         * @see client/html/email/payment/text/summary/decorators/excludes
277
+         * @see client/html/email/payment/text/summary/decorators/global
278
+         */
279 279
 
280
-		return $this->createSubClient( 'email/payment/text/summary/' . $type, $name );
281
-	}
280
+        return $this->createSubClient( 'email/payment/text/summary/' . $type, $name );
281
+    }
282 282
 
283 283
 
284
-	/**
285
-	 * Returns the list of sub-client names configured for the client.
286
-	 *
287
-	 * @return array List of HTML client names
288
-	 */
289
-	protected function getSubClientNames()
290
-	{
291
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
292
-	}
284
+    /**
285
+     * Returns the list of sub-client names configured for the client.
286
+     *
287
+     * @return array List of HTML client names
288
+     */
289
+    protected function getSubClientNames()
290
+    {
291
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
292
+    }
293 293
 
294 294
 
295
-	/**
296
-	 * Sets the necessary parameter values in the view.
297
-	 *
298
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
299
-	 * @param array &$tags Result array for the list of tags that are associated to the output
300
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
301
-	 * @return \Aimeos\MW\View\Iface Modified view object
302
-	 */
303
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
304
-	{
305
-		$view->summaryBasket = $view->extOrderBaseItem;
295
+    /**
296
+     * Sets the necessary parameter values in the view.
297
+     *
298
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
299
+     * @param array &$tags Result array for the list of tags that are associated to the output
300
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
301
+     * @return \Aimeos\MW\View\Iface Modified view object
302
+     */
303
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
304
+    {
305
+        $view->summaryBasket = $view->extOrderBaseItem;
306 306
 
307
-		return $view;
308
-	}
307
+        return $view;
308
+    }
309 309
 }
310 310
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Email/Payment/Text/Summary/Address/Standard.php 1 patch
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -19,231 +19,231 @@
 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/email/payment/text/summary/address/standard/subparts
26
-	 * List of HTML sub-clients rendered within the email payment text summary address 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/email/payment/text/summary/address/standard/subparts';
59
-	private $subPartNames = array();
60
-
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 );
73
-
74
-		$content = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
-		}
78
-		$view->summaryBody = $content;
79
-
80
-		/** client/html/email/payment/text/summary/address/standard/template-body
81
-		 * Relative path to the text body template of the email payment text summary address client.
82
-		 *
83
-		 * The template file contains the text and processing instructions
84
-		 * to generate the result shown in the body of the e-mail. 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 e-mail body
96
-		 * @since 2014.03
97
-		 * @category Developer
98
-		 * @see client/html/email/payment/text/summary/address/standard/template-header
99
-		 */
100
-		$tplconf = 'client/html/email/payment/text/summary/address/standard/template-body';
101
-		$default = 'email/common/text-summary-address-body-default.php';
102
-
103
-		return $view->render( $view->config( $tplconf, $default ) );
104
-	}
105
-
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 );
118
-
119
-		$content = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
-		}
123
-		$view->summaryHeader = $content;
124
-
125
-		/** client/html/email/payment/text/summary/address/standard/template-header
126
-		 * Relative path to the text header template of the email payment text summary address client.
127
-		 *
128
-		 * The template file contains the text and processing instructions
129
-		 * to generate the text that is inserted into the header
130
-		 * of the e-mail. 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 e-mail header
142
-		 * @since 2014.03
143
-		 * @category Developer
144
-		 * @see client/html/email/payment/text/summary/address/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/email/payment/text/summary/address/standard/template-header';
147
-		$default = 'email/common/text-summary-address-header-default.php';
148
-
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
151
-
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/email/payment/text/summary/address/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the "email payment text summary address" 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/email/payment/text/summary/address/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/email/payment/text/summary/address/decorators/global
185
-		 * @see client/html/email/payment/text/summary/address/decorators/local
186
-		 */
187
-
188
-		/** client/html/email/payment/text/summary/address/decorators/global
189
-		 * Adds a list of globally available decorators only to the "email payment text summary address" 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/email/payment/text/summary/address/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/email/payment/text/summary/address/decorators/excludes
209
-		 * @see client/html/email/payment/text/summary/address/decorators/local
210
-		 */
211
-
212
-		/** client/html/email/payment/text/summary/address/decorators/local
213
-		 * Adds a list of local decorators only to the "email payment text summary address" 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/email/payment/text/summary/address/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/email/payment/text/summary/address/decorators/excludes
233
-		 * @see client/html/email/payment/text/summary/address/decorators/global
234
-		 */
235
-
236
-		return $this->createSubClient( 'email/payment/text/summary/address/' . $type, $name );
237
-	}
238
-
239
-
240
-	/**
241
-	 * Returns the list of sub-client names configured for the client.
242
-	 *
243
-	 * @return array List of HTML client names
244
-	 */
245
-	protected function getSubClientNames()
246
-	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
-	}
25
+    /** client/html/email/payment/text/summary/address/standard/subparts
26
+     * List of HTML sub-clients rendered within the email payment text summary address 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/email/payment/text/summary/address/standard/subparts';
59
+    private $subPartNames = array();
60
+
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 );
73
+
74
+        $content = '';
75
+        foreach( $this->getSubClients() as $subclient ) {
76
+            $content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
+        }
78
+        $view->summaryBody = $content;
79
+
80
+        /** client/html/email/payment/text/summary/address/standard/template-body
81
+         * Relative path to the text body template of the email payment text summary address client.
82
+         *
83
+         * The template file contains the text and processing instructions
84
+         * to generate the result shown in the body of the e-mail. 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 e-mail body
96
+         * @since 2014.03
97
+         * @category Developer
98
+         * @see client/html/email/payment/text/summary/address/standard/template-header
99
+         */
100
+        $tplconf = 'client/html/email/payment/text/summary/address/standard/template-body';
101
+        $default = 'email/common/text-summary-address-body-default.php';
102
+
103
+        return $view->render( $view->config( $tplconf, $default ) );
104
+    }
105
+
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 );
118
+
119
+        $content = '';
120
+        foreach( $this->getSubClients() as $subclient ) {
121
+            $content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
+        }
123
+        $view->summaryHeader = $content;
124
+
125
+        /** client/html/email/payment/text/summary/address/standard/template-header
126
+         * Relative path to the text header template of the email payment text summary address client.
127
+         *
128
+         * The template file contains the text and processing instructions
129
+         * to generate the text that is inserted into the header
130
+         * of the e-mail. 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 e-mail header
142
+         * @since 2014.03
143
+         * @category Developer
144
+         * @see client/html/email/payment/text/summary/address/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/email/payment/text/summary/address/standard/template-header';
147
+        $default = 'email/common/text-summary-address-header-default.php';
148
+
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151
+
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/email/payment/text/summary/address/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the "email payment text summary address" 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/email/payment/text/summary/address/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/email/payment/text/summary/address/decorators/global
185
+         * @see client/html/email/payment/text/summary/address/decorators/local
186
+         */
187
+
188
+        /** client/html/email/payment/text/summary/address/decorators/global
189
+         * Adds a list of globally available decorators only to the "email payment text summary address" 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/email/payment/text/summary/address/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/email/payment/text/summary/address/decorators/excludes
209
+         * @see client/html/email/payment/text/summary/address/decorators/local
210
+         */
211
+
212
+        /** client/html/email/payment/text/summary/address/decorators/local
213
+         * Adds a list of local decorators only to the "email payment text summary address" 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/email/payment/text/summary/address/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/email/payment/text/summary/address/decorators/excludes
233
+         * @see client/html/email/payment/text/summary/address/decorators/global
234
+         */
235
+
236
+        return $this->createSubClient( 'email/payment/text/summary/address/' . $type, $name );
237
+    }
238
+
239
+
240
+    /**
241
+     * Returns the list of sub-client names configured for the client.
242
+     *
243
+     * @return array List of HTML client names
244
+     */
245
+    protected function getSubClientNames()
246
+    {
247
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
+    }
249 249
 }
Please login to merge, or discard this patch.
client/html/src/Client/Html/Email/Payment/Text/Standard.php 1 patch
Indentation   +277 added lines, -277 removed lines patch added patch discarded remove patch
@@ -19,306 +19,306 @@
 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/email/payment/text/standard/subparts
26
-	 * List of HTML sub-clients rendered within the email payment text 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/email/payment/text/standard/subparts';
25
+    /** client/html/email/payment/text/standard/subparts
26
+     * List of HTML sub-clients rendered within the email payment text 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/email/payment/text/standard/subparts';
59 59
 
60
-	/** client/html/email/payment/text/salutation/name
61
-	 * Name of the salutation part used by the email payment text client implementation
62
-	 *
63
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Salutation\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
-	 */
60
+    /** client/html/email/payment/text/salutation/name
61
+     * Name of the salutation part used by the email payment text client implementation
62
+     *
63
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Salutation\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 70
 
71
-	/** client/html/email/payment/text/intro/name
72
-	 * Name of the introduction part used by the email payment text client implementation
73
-	 *
74
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Intro\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
-	 */
71
+    /** client/html/email/payment/text/intro/name
72
+     * Name of the introduction part used by the email payment text client implementation
73
+     *
74
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Intro\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 81
 
82
-	/** client/html/email/payment/text/summary/name
83
-	 * Name of the summary part used by the email payment text client implementation
84
-	 *
85
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Summary\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.03
90
-	 * @category Developer
91
-	 */
82
+    /** client/html/email/payment/text/summary/name
83
+     * Name of the summary part used by the email payment text client implementation
84
+     *
85
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Summary\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.03
90
+     * @category Developer
91
+     */
92 92
 
93
-	/** client/html/email/payment/text/outro/name
94
-	 * Name of the footer part used by the email payment text client implementation
95
-	 *
96
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Outro\Myname".
97
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
98
-	 *
99
-	 * @param string Last part of the client class name
100
-	 * @since 2014.03
101
-	 * @category Developer
102
-	 */
93
+    /** client/html/email/payment/text/outro/name
94
+     * Name of the footer part used by the email payment text client implementation
95
+     *
96
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Outro\Myname".
97
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
98
+     *
99
+     * @param string Last part of the client class name
100
+     * @since 2014.03
101
+     * @category Developer
102
+     */
103 103
 
104
-	/** client/html/email/payment/text/legal/name
105
-	 * Name of the legal part used by the email payment text client implementation
106
-	 *
107
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Legal\Myname".
108
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
109
-	 *
110
-	 * @param string Last part of the client class name
111
-	 * @since 2014.03
112
-	 * @category Developer
113
-	 */
114
-	private $subPartNames = array( 'salutation', 'intro', 'summary', 'outro', 'legal' );
104
+    /** client/html/email/payment/text/legal/name
105
+     * Name of the legal part used by the email payment text client implementation
106
+     *
107
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Email\Payment\Text\Legal\Myname".
108
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
109
+     *
110
+     * @param string Last part of the client class name
111
+     * @since 2014.03
112
+     * @category Developer
113
+     */
114
+    private $subPartNames = array( 'salutation', 'intro', 'summary', 'outro', 'legal' );
115 115
 
116 116
 
117
-	/**
118
-	 * Returns the HTML code for insertion into the body.
119
-	 *
120
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
121
-	 * @param array &$tags Result array for the list of tags that are associated to the output
122
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
123
-	 * @return string HTML code
124
-	 */
125
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
126
-	{
127
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
117
+    /**
118
+     * Returns the HTML code for insertion into the body.
119
+     *
120
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
121
+     * @param array &$tags Result array for the list of tags that are associated to the output
122
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
123
+     * @return string HTML code
124
+     */
125
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
126
+    {
127
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
128 128
 
129
-		$content = '';
130
-		foreach( $this->getSubClients() as $subclient ) {
131
-			$content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
132
-		}
133
-		$view->textBody = $content;
129
+        $content = '';
130
+        foreach( $this->getSubClients() as $subclient ) {
131
+            $content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
132
+        }
133
+        $view->textBody = $content;
134 134
 
135
-		/** client/html/email/payment/text/standard/template-body
136
-		 * Relative path to the text body template of the email payment text client.
137
-		 *
138
-		 * The template file contains the text and processing instructions
139
-		 * to generate the result shown in the body of the e-mail. The
140
-		 * configuration string is the path to the template file relative
141
-		 * to the templates directory (usually in client/html/templates).
142
-		 *
143
-		 * You can overwrite the template file configuration in extensions and
144
-		 * provide alternative templates. These alternative templates should be
145
-		 * named like the default one but with the string "standard" replaced by
146
-		 * an unique name. You may use the name of your project for this. If
147
-		 * you've implemented an alternative client class as well, "standard"
148
-		 * should be replaced by the name of the new class.
149
-		 *
150
-		 * The email payment text client allows to use a different template for
151
-		 * each payment status value. You can create a template for each payment
152
-		 * status and store it in the "email/payment/<status number>/" directory
153
-		 * below the "templates" directory (usually in client/html/templates). If no
154
-		 * specific layout template is found, the common template in the
155
-		 * "email/payment/" directory is used.
156
-		 *
157
-		 * @param string Relative path to the template creating code for the e-mail body
158
-		 * @since 2014.03
159
-		 * @category Developer
160
-		 * @see client/html/email/payment/text/standard/template-header
161
-		 */
162
-		$tplconf = 'client/html/email/payment/text/standard/template-body';
135
+        /** client/html/email/payment/text/standard/template-body
136
+         * Relative path to the text body template of the email payment text client.
137
+         *
138
+         * The template file contains the text and processing instructions
139
+         * to generate the result shown in the body of the e-mail. The
140
+         * configuration string is the path to the template file relative
141
+         * to the templates directory (usually in client/html/templates).
142
+         *
143
+         * You can overwrite the template file configuration in extensions and
144
+         * provide alternative templates. These alternative templates should be
145
+         * named like the default one but with the string "standard" replaced by
146
+         * an unique name. You may use the name of your project for this. If
147
+         * you've implemented an alternative client class as well, "standard"
148
+         * should be replaced by the name of the new class.
149
+         *
150
+         * The email payment text client allows to use a different template for
151
+         * each payment status value. You can create a template for each payment
152
+         * status and store it in the "email/payment/<status number>/" directory
153
+         * below the "templates" directory (usually in client/html/templates). If no
154
+         * specific layout template is found, the common template in the
155
+         * "email/payment/" directory is used.
156
+         *
157
+         * @param string Relative path to the template creating code for the e-mail body
158
+         * @since 2014.03
159
+         * @category Developer
160
+         * @see client/html/email/payment/text/standard/template-header
161
+         */
162
+        $tplconf = 'client/html/email/payment/text/standard/template-body';
163 163
 
164
-		$status = $view->extOrderItem->getPaymentStatus();
165
-		$default = array( 'email/payment/' . $status . '/text-body-default.php', 'email/common/text-body-default.php' );
164
+        $status = $view->extOrderItem->getPaymentStatus();
165
+        $default = array( 'email/payment/' . $status . '/text-body-default.php', 'email/common/text-body-default.php' );
166 166
 
167
-		$text = $view->render( $view->config( $tplconf, $default ) );
168
-		$view->mail()->setBody( $text );
169
-		return $text;
170
-	}
167
+        $text = $view->render( $view->config( $tplconf, $default ) );
168
+        $view->mail()->setBody( $text );
169
+        return $text;
170
+    }
171 171
 
172 172
 
173
-	/**
174
-	 * Returns the HTML string for insertion into the header.
175
-	 *
176
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
177
-	 * @param array &$tags Result array for the list of tags that are associated to the output
178
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
179
-	 * @return string|null String including HTML tags for the header on error
180
-	 */
181
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
182
-	{
183
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
173
+    /**
174
+     * Returns the HTML string for insertion into the header.
175
+     *
176
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
177
+     * @param array &$tags Result array for the list of tags that are associated to the output
178
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
179
+     * @return string|null String including HTML tags for the header on error
180
+     */
181
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
182
+    {
183
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
184 184
 
185
-		$content = '';
186
-		foreach( $this->getSubClients() as $subclient ) {
187
-			$content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
188
-		}
189
-		$view->textHeader = $content;
185
+        $content = '';
186
+        foreach( $this->getSubClients() as $subclient ) {
187
+            $content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
188
+        }
189
+        $view->textHeader = $content;
190 190
 
191
-		/** client/html/email/payment/text/standard/template-header
192
-		 * Relative path to the text header template of the email payment text client.
193
-		 *
194
-		 * The template file contains the text and processing instructions
195
-		 * to generate the text that is inserted into the header
196
-		 * of the e-mail. The configuration string is the
197
-		 * path to the template file relative to the templates directory (usually
198
-		 * in client/html/templates).
199
-		 *
200
-		 * You can overwrite the template file configuration in extensions and
201
-		 * provide alternative templates. These alternative templates should be
202
-		 * named like the default one but with the string "standard" replaced by
203
-		 * an unique name. You may use the name of your project for this. If
204
-		 * you've implemented an alternative client class as well, "standard"
205
-		 * should be replaced by the name of the new class.
206
-		 *
207
-		 * The email payment text client allows to use a different template for
208
-		 * each payment status value. You can create a template for each payment
209
-		 * status and store it in the "email/payment/<status number>/" directory
210
-		 * below the "templates" directory (usually in client/html/templates). If no
211
-		 * specific layout template is found, the common template in the
212
-		 * "email/payment/" directory is used.
213
-		 *
214
-		 * @param string Relative path to the template creating code for the e-mail header
215
-		 * @since 2014.03
216
-		 * @category Developer
217
-		 * @see client/html/email/payment/text/standard/template-body
218
-		 */
219
-		$tplconf = 'client/html/email/payment/text/standard/template-header';
191
+        /** client/html/email/payment/text/standard/template-header
192
+         * Relative path to the text header template of the email payment text client.
193
+         *
194
+         * The template file contains the text and processing instructions
195
+         * to generate the text that is inserted into the header
196
+         * of the e-mail. The configuration string is the
197
+         * path to the template file relative to the templates directory (usually
198
+         * in client/html/templates).
199
+         *
200
+         * You can overwrite the template file configuration in extensions and
201
+         * provide alternative templates. These alternative templates should be
202
+         * named like the default one but with the string "standard" replaced by
203
+         * an unique name. You may use the name of your project for this. If
204
+         * you've implemented an alternative client class as well, "standard"
205
+         * should be replaced by the name of the new class.
206
+         *
207
+         * The email payment text client allows to use a different template for
208
+         * each payment status value. You can create a template for each payment
209
+         * status and store it in the "email/payment/<status number>/" directory
210
+         * below the "templates" directory (usually in client/html/templates). If no
211
+         * specific layout template is found, the common template in the
212
+         * "email/payment/" directory is used.
213
+         *
214
+         * @param string Relative path to the template creating code for the e-mail header
215
+         * @since 2014.03
216
+         * @category Developer
217
+         * @see client/html/email/payment/text/standard/template-body
218
+         */
219
+        $tplconf = 'client/html/email/payment/text/standard/template-header';
220 220
 
221
-		$status = $view->extOrderItem->getPaymentStatus();
222
-		$default = array( 'email/payment/' . $status . '/text-header-default.php', 'email/common/text-header-default.php' );
221
+        $status = $view->extOrderItem->getPaymentStatus();
222
+        $default = array( 'email/payment/' . $status . '/text-header-default.php', 'email/common/text-header-default.php' );
223 223
 
224
-		return $view->render( $view->config( $tplconf, $default ) );
225
-	}
224
+        return $view->render( $view->config( $tplconf, $default ) );
225
+    }
226 226
 
227 227
 
228
-	/**
229
-	 * Returns the sub-client given by its name.
230
-	 *
231
-	 * @param string $type Name of the client type
232
-	 * @param string|null $name Name of the sub-client (Default if null)
233
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
234
-	 */
235
-	public function getSubClient( $type, $name = null )
236
-	{
237
-		/** client/html/email/payment/text/decorators/excludes
238
-		 * Excludes decorators added by the "common" option from the "email payment text" html client
239
-		 *
240
-		 * Decorators extend the functionality of a class by adding new aspects
241
-		 * (e.g. log what is currently done), executing the methods of the underlying
242
-		 * class only in certain conditions (e.g. only for logged in users) or
243
-		 * modify what is returned to the caller.
244
-		 *
245
-		 * This option allows you to remove a decorator added via
246
-		 * "client/html/common/decorators/default" before they are wrapped
247
-		 * around the html client.
248
-		 *
249
-		 *  client/html/email/payment/text/decorators/excludes = array( 'decorator1' )
250
-		 *
251
-		 * This would remove the decorator named "decorator1" from the list of
252
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
253
-		 * "client/html/common/decorators/default" to the html client.
254
-		 *
255
-		 * @param array List of decorator names
256
-		 * @since 2015.08
257
-		 * @category Developer
258
-		 * @see client/html/common/decorators/default
259
-		 * @see client/html/email/payment/text/decorators/global
260
-		 * @see client/html/email/payment/text/decorators/local
261
-		 */
228
+    /**
229
+     * Returns the sub-client given by its name.
230
+     *
231
+     * @param string $type Name of the client type
232
+     * @param string|null $name Name of the sub-client (Default if null)
233
+     * @return \Aimeos\Client\Html\Iface Sub-client object
234
+     */
235
+    public function getSubClient( $type, $name = null )
236
+    {
237
+        /** client/html/email/payment/text/decorators/excludes
238
+         * Excludes decorators added by the "common" option from the "email payment text" html client
239
+         *
240
+         * Decorators extend the functionality of a class by adding new aspects
241
+         * (e.g. log what is currently done), executing the methods of the underlying
242
+         * class only in certain conditions (e.g. only for logged in users) or
243
+         * modify what is returned to the caller.
244
+         *
245
+         * This option allows you to remove a decorator added via
246
+         * "client/html/common/decorators/default" before they are wrapped
247
+         * around the html client.
248
+         *
249
+         *  client/html/email/payment/text/decorators/excludes = array( 'decorator1' )
250
+         *
251
+         * This would remove the decorator named "decorator1" from the list of
252
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
253
+         * "client/html/common/decorators/default" to the html client.
254
+         *
255
+         * @param array List of decorator names
256
+         * @since 2015.08
257
+         * @category Developer
258
+         * @see client/html/common/decorators/default
259
+         * @see client/html/email/payment/text/decorators/global
260
+         * @see client/html/email/payment/text/decorators/local
261
+         */
262 262
 
263
-		/** client/html/email/payment/text/decorators/global
264
-		 * Adds a list of globally available decorators only to the "email payment text" html client
265
-		 *
266
-		 * Decorators extend the functionality of a class by adding new aspects
267
-		 * (e.g. log what is currently done), executing the methods of the underlying
268
-		 * class only in certain conditions (e.g. only for logged in users) or
269
-		 * modify what is returned to the caller.
270
-		 *
271
-		 * This option allows you to wrap global decorators
272
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
273
-		 *
274
-		 *  client/html/email/payment/text/decorators/global = array( 'decorator1' )
275
-		 *
276
-		 * This would add the decorator named "decorator1" defined by
277
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
278
-		 *
279
-		 * @param array List of decorator names
280
-		 * @since 2015.08
281
-		 * @category Developer
282
-		 * @see client/html/common/decorators/default
283
-		 * @see client/html/email/payment/text/decorators/excludes
284
-		 * @see client/html/email/payment/text/decorators/local
285
-		 */
263
+        /** client/html/email/payment/text/decorators/global
264
+         * Adds a list of globally available decorators only to the "email payment text" html client
265
+         *
266
+         * Decorators extend the functionality of a class by adding new aspects
267
+         * (e.g. log what is currently done), executing the methods of the underlying
268
+         * class only in certain conditions (e.g. only for logged in users) or
269
+         * modify what is returned to the caller.
270
+         *
271
+         * This option allows you to wrap global decorators
272
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
273
+         *
274
+         *  client/html/email/payment/text/decorators/global = array( 'decorator1' )
275
+         *
276
+         * This would add the decorator named "decorator1" defined by
277
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
278
+         *
279
+         * @param array List of decorator names
280
+         * @since 2015.08
281
+         * @category Developer
282
+         * @see client/html/common/decorators/default
283
+         * @see client/html/email/payment/text/decorators/excludes
284
+         * @see client/html/email/payment/text/decorators/local
285
+         */
286 286
 
287
-		/** client/html/email/payment/text/decorators/local
288
-		 * Adds a list of local decorators only to the "email payment text" html client
289
-		 *
290
-		 * Decorators extend the functionality of a class by adding new aspects
291
-		 * (e.g. log what is currently done), executing the methods of the underlying
292
-		 * class only in certain conditions (e.g. only for logged in users) or
293
-		 * modify what is returned to the caller.
294
-		 *
295
-		 * This option allows you to wrap local decorators
296
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
297
-		 *
298
-		 *  client/html/email/payment/text/decorators/local = array( 'decorator2' )
299
-		 *
300
-		 * This would add the decorator named "decorator2" defined by
301
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
302
-		 *
303
-		 * @param array List of decorator names
304
-		 * @since 2015.08
305
-		 * @category Developer
306
-		 * @see client/html/common/decorators/default
307
-		 * @see client/html/email/payment/text/decorators/excludes
308
-		 * @see client/html/email/payment/text/decorators/global
309
-		 */
287
+        /** client/html/email/payment/text/decorators/local
288
+         * Adds a list of local decorators only to the "email payment text" html client
289
+         *
290
+         * Decorators extend the functionality of a class by adding new aspects
291
+         * (e.g. log what is currently done), executing the methods of the underlying
292
+         * class only in certain conditions (e.g. only for logged in users) or
293
+         * modify what is returned to the caller.
294
+         *
295
+         * This option allows you to wrap local decorators
296
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
297
+         *
298
+         *  client/html/email/payment/text/decorators/local = array( 'decorator2' )
299
+         *
300
+         * This would add the decorator named "decorator2" defined by
301
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
302
+         *
303
+         * @param array List of decorator names
304
+         * @since 2015.08
305
+         * @category Developer
306
+         * @see client/html/common/decorators/default
307
+         * @see client/html/email/payment/text/decorators/excludes
308
+         * @see client/html/email/payment/text/decorators/global
309
+         */
310 310
 
311
-		return $this->createSubClient( 'email/payment/text/' . $type, $name );
312
-	}
311
+        return $this->createSubClient( 'email/payment/text/' . $type, $name );
312
+    }
313 313
 
314 314
 
315
-	/**
316
-	 * Returns the list of sub-client names configured for the client.
317
-	 *
318
-	 * @return array List of HTML client names
319
-	 */
320
-	protected function getSubClientNames()
321
-	{
322
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
323
-	}
315
+    /**
316
+     * Returns the list of sub-client names configured for the client.
317
+     *
318
+     * @return array List of HTML client names
319
+     */
320
+    protected function getSubClientNames()
321
+    {
322
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
323
+    }
324 324
 }
325 325
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Email/Payment/Text/Outro/Standard.php 1 patch
Indentation   +225 added lines, -225 removed lines patch added patch discarded remove patch
@@ -19,249 +19,249 @@
 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/email/payment/text/outro/standard/subparts
26
-	 * List of HTML sub-clients rendered within the email payment text footer 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/email/payment/text/outro/standard/subparts';
59
-	private $subPartNames = array();
25
+    /** client/html/email/payment/text/outro/standard/subparts
26
+     * List of HTML sub-clients rendered within the email payment text footer 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/email/payment/text/outro/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
-		$content = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
-		}
78
-		$view->outroBody = $content;
74
+        $content = '';
75
+        foreach( $this->getSubClients() as $subclient ) {
76
+            $content .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
+        }
78
+        $view->outroBody = $content;
79 79
 
80
-		/** client/html/email/payment/text/outro/standard/template-body
81
-		 * Relative path to the text body template of the email payment text footer client.
82
-		 *
83
-		 * The template file contains the text and processing instructions
84
-		 * to generate the result shown in the body of the e-mail. 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
-		 * The email payment text client allows to use a different template for
96
-		 * each payment status value. You can create a template for each payment
97
-		 * status and store it in the "email/payment/<status number>/" directory
98
-		 * below the "templates" directory (usually in client/html/templates). If no
99
-		 * specific layout template is found, the common template in the
100
-		 * "email/payment/" directory is used.
101
-		 *
102
-		 * @param string Relative path to the template creating code for the e-mail body
103
-		 * @since 2014.03
104
-		 * @category Developer
105
-		 * @see client/html/email/payment/text/outro/standard/template-header
106
-		 */
107
-		$tplconf = 'client/html/email/payment/text/outro/standard/template-body';
80
+        /** client/html/email/payment/text/outro/standard/template-body
81
+         * Relative path to the text body template of the email payment text footer client.
82
+         *
83
+         * The template file contains the text and processing instructions
84
+         * to generate the result shown in the body of the e-mail. 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
+         * The email payment text client allows to use a different template for
96
+         * each payment status value. You can create a template for each payment
97
+         * status and store it in the "email/payment/<status number>/" directory
98
+         * below the "templates" directory (usually in client/html/templates). If no
99
+         * specific layout template is found, the common template in the
100
+         * "email/payment/" directory is used.
101
+         *
102
+         * @param string Relative path to the template creating code for the e-mail body
103
+         * @since 2014.03
104
+         * @category Developer
105
+         * @see client/html/email/payment/text/outro/standard/template-header
106
+         */
107
+        $tplconf = 'client/html/email/payment/text/outro/standard/template-body';
108 108
 
109
-		$status = $view->extOrderItem->getPaymentStatus();
110
-		$default = array( 'email/payment/' . $status . '/text-outro-body-default.php', 'email/common/text-outro-body-default.php' );
109
+        $status = $view->extOrderItem->getPaymentStatus();
110
+        $default = array( 'email/payment/' . $status . '/text-outro-body-default.php', 'email/common/text-outro-body-default.php' );
111 111
 
112
-		return $view->render( $view->config( $tplconf, $default ) );
113
-	}
112
+        return $view->render( $view->config( $tplconf, $default ) );
113
+    }
114 114
 
115 115
 
116
-	/**
117
-	 * Returns the HTML string for insertion into the header.
118
-	 *
119
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
120
-	 * @param array &$tags Result array for the list of tags that are associated to the output
121
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
122
-	 * @return string|null String including HTML tags for the header on error
123
-	 */
124
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
125
-	{
126
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
116
+    /**
117
+     * Returns the HTML string for insertion into the header.
118
+     *
119
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
120
+     * @param array &$tags Result array for the list of tags that are associated to the output
121
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
122
+     * @return string|null String including HTML tags for the header on error
123
+     */
124
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
125
+    {
126
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
127 127
 
128
-		$content = '';
129
-		foreach( $this->getSubClients() as $subclient ) {
130
-			$content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
131
-		}
132
-		$view->outroHeader = $content;
128
+        $content = '';
129
+        foreach( $this->getSubClients() as $subclient ) {
130
+            $content .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
131
+        }
132
+        $view->outroHeader = $content;
133 133
 
134
-		/** client/html/email/payment/text/outro/standard/template-header
135
-		 * Relative path to the HTML header template of the email payment text footer client.
136
-		 *
137
-		 * The template file contains the text and processing instructions
138
-		 * to generate the text that is inserted into the header
139
-		 * of the e-mail. The configuration string is the
140
-		 * path to the template file relative to the templates directory (usually
141
-		 * in client/html/templates).
142
-		 *
143
-		 * You can overwrite the template file configuration in extensions and
144
-		 * provide alternative templates. These alternative templates should be
145
-		 * named like the default one but with the string "standard" replaced by
146
-		 * an unique name. You may use the name of your project for this. If
147
-		 * you've implemented an alternative client class as well, "standard"
148
-		 * should be replaced by the name of the new class.
149
-		 *
150
-		 * The email payment text client allows to use a different template for
151
-		 * each payment status value. You can create a template for each payment
152
-		 * status and store it in the "email/payment/<status number>/" directory
153
-		 * below the "templates" directory (usually in client/html/templates). If no
154
-		 * specific layout template is found, the common template in the
155
-		 * "email/payment/" directory is used.
156
-		 *
157
-		 * @param string Relative path to the template creating code for the e-mail header
158
-		 * @since 2014.03
159
-		 * @category Developer
160
-		 * @see client/html/email/payment/text/outro/standard/template-body
161
-		 */
162
-		$tplconf = 'client/html/email/payment/text/outro/standard/template-header';
134
+        /** client/html/email/payment/text/outro/standard/template-header
135
+         * Relative path to the HTML header template of the email payment text footer client.
136
+         *
137
+         * The template file contains the text and processing instructions
138
+         * to generate the text that is inserted into the header
139
+         * of the e-mail. The configuration string is the
140
+         * path to the template file relative to the templates directory (usually
141
+         * in client/html/templates).
142
+         *
143
+         * You can overwrite the template file configuration in extensions and
144
+         * provide alternative templates. These alternative templates should be
145
+         * named like the default one but with the string "standard" replaced by
146
+         * an unique name. You may use the name of your project for this. If
147
+         * you've implemented an alternative client class as well, "standard"
148
+         * should be replaced by the name of the new class.
149
+         *
150
+         * The email payment text client allows to use a different template for
151
+         * each payment status value. You can create a template for each payment
152
+         * status and store it in the "email/payment/<status number>/" directory
153
+         * below the "templates" directory (usually in client/html/templates). If no
154
+         * specific layout template is found, the common template in the
155
+         * "email/payment/" directory is used.
156
+         *
157
+         * @param string Relative path to the template creating code for the e-mail header
158
+         * @since 2014.03
159
+         * @category Developer
160
+         * @see client/html/email/payment/text/outro/standard/template-body
161
+         */
162
+        $tplconf = 'client/html/email/payment/text/outro/standard/template-header';
163 163
 
164
-		$status = $view->extOrderItem->getPaymentStatus();
165
-		$default = array( 'email/payment/' . $status . '/text-outro-header-default.php', 'email/common/text-outro-header-default.php' );
164
+        $status = $view->extOrderItem->getPaymentStatus();
165
+        $default = array( 'email/payment/' . $status . '/text-outro-header-default.php', 'email/common/text-outro-header-default.php' );
166 166
 
167
-		return $view->render( $view->config( $tplconf, $default ) );
168
-	}
167
+        return $view->render( $view->config( $tplconf, $default ) );
168
+    }
169 169
 
170 170
 
171
-	/**
172
-	 * Returns the sub-client given by its name.
173
-	 *
174
-	 * @param string $type Name of the client type
175
-	 * @param string|null $name Name of the sub-client (Default if null)
176
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
177
-	 */
178
-	public function getSubClient( $type, $name = null )
179
-	{
180
-		/** client/html/email/payment/text/outro/decorators/excludes
181
-		 * Excludes decorators added by the "common" option from the "email payment text outro" html client
182
-		 *
183
-		 * Decorators extend the functionality of a class by adding new aspects
184
-		 * (e.g. log what is currently done), executing the methods of the underlying
185
-		 * class only in certain conditions (e.g. only for logged in users) or
186
-		 * modify what is returned to the caller.
187
-		 *
188
-		 * This option allows you to remove a decorator added via
189
-		 * "client/html/common/decorators/default" before they are wrapped
190
-		 * around the html client.
191
-		 *
192
-		 *  client/html/email/payment/text/outro/decorators/excludes = array( 'decorator1' )
193
-		 *
194
-		 * This would remove the decorator named "decorator1" from the list of
195
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
196
-		 * "client/html/common/decorators/default" to the html client.
197
-		 *
198
-		 * @param array List of decorator names
199
-		 * @since 2015.08
200
-		 * @category Developer
201
-		 * @see client/html/common/decorators/default
202
-		 * @see client/html/email/payment/text/outro/decorators/global
203
-		 * @see client/html/email/payment/text/outro/decorators/local
204
-		 */
171
+    /**
172
+     * Returns the sub-client given by its name.
173
+     *
174
+     * @param string $type Name of the client type
175
+     * @param string|null $name Name of the sub-client (Default if null)
176
+     * @return \Aimeos\Client\Html\Iface Sub-client object
177
+     */
178
+    public function getSubClient( $type, $name = null )
179
+    {
180
+        /** client/html/email/payment/text/outro/decorators/excludes
181
+         * Excludes decorators added by the "common" option from the "email payment text outro" html client
182
+         *
183
+         * Decorators extend the functionality of a class by adding new aspects
184
+         * (e.g. log what is currently done), executing the methods of the underlying
185
+         * class only in certain conditions (e.g. only for logged in users) or
186
+         * modify what is returned to the caller.
187
+         *
188
+         * This option allows you to remove a decorator added via
189
+         * "client/html/common/decorators/default" before they are wrapped
190
+         * around the html client.
191
+         *
192
+         *  client/html/email/payment/text/outro/decorators/excludes = array( 'decorator1' )
193
+         *
194
+         * This would remove the decorator named "decorator1" from the list of
195
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
196
+         * "client/html/common/decorators/default" to the html client.
197
+         *
198
+         * @param array List of decorator names
199
+         * @since 2015.08
200
+         * @category Developer
201
+         * @see client/html/common/decorators/default
202
+         * @see client/html/email/payment/text/outro/decorators/global
203
+         * @see client/html/email/payment/text/outro/decorators/local
204
+         */
205 205
 
206
-		/** client/html/email/payment/text/outro/decorators/global
207
-		 * Adds a list of globally available decorators only to the "email payment text outro" html client
208
-		 *
209
-		 * Decorators extend the functionality of a class by adding new aspects
210
-		 * (e.g. log what is currently done), executing the methods of the underlying
211
-		 * class only in certain conditions (e.g. only for logged in users) or
212
-		 * modify what is returned to the caller.
213
-		 *
214
-		 * This option allows you to wrap global decorators
215
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
216
-		 *
217
-		 *  client/html/email/payment/text/outro/decorators/global = array( 'decorator1' )
218
-		 *
219
-		 * This would add the decorator named "decorator1" defined by
220
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
221
-		 *
222
-		 * @param array List of decorator names
223
-		 * @since 2015.08
224
-		 * @category Developer
225
-		 * @see client/html/common/decorators/default
226
-		 * @see client/html/email/payment/text/outro/decorators/excludes
227
-		 * @see client/html/email/payment/text/outro/decorators/local
228
-		 */
206
+        /** client/html/email/payment/text/outro/decorators/global
207
+         * Adds a list of globally available decorators only to the "email payment text outro" html client
208
+         *
209
+         * Decorators extend the functionality of a class by adding new aspects
210
+         * (e.g. log what is currently done), executing the methods of the underlying
211
+         * class only in certain conditions (e.g. only for logged in users) or
212
+         * modify what is returned to the caller.
213
+         *
214
+         * This option allows you to wrap global decorators
215
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
216
+         *
217
+         *  client/html/email/payment/text/outro/decorators/global = array( 'decorator1' )
218
+         *
219
+         * This would add the decorator named "decorator1" defined by
220
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
221
+         *
222
+         * @param array List of decorator names
223
+         * @since 2015.08
224
+         * @category Developer
225
+         * @see client/html/common/decorators/default
226
+         * @see client/html/email/payment/text/outro/decorators/excludes
227
+         * @see client/html/email/payment/text/outro/decorators/local
228
+         */
229 229
 
230
-		/** client/html/email/payment/text/outro/decorators/local
231
-		 * Adds a list of local decorators only to the "email payment text outro" html client
232
-		 *
233
-		 * Decorators extend the functionality of a class by adding new aspects
234
-		 * (e.g. log what is currently done), executing the methods of the underlying
235
-		 * class only in certain conditions (e.g. only for logged in users) or
236
-		 * modify what is returned to the caller.
237
-		 *
238
-		 * This option allows you to wrap local decorators
239
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
240
-		 *
241
-		 *  client/html/email/payment/text/outro/decorators/local = array( 'decorator2' )
242
-		 *
243
-		 * This would add the decorator named "decorator2" defined by
244
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
245
-		 *
246
-		 * @param array List of decorator names
247
-		 * @since 2015.08
248
-		 * @category Developer
249
-		 * @see client/html/common/decorators/default
250
-		 * @see client/html/email/payment/text/outro/decorators/excludes
251
-		 * @see client/html/email/payment/text/outro/decorators/global
252
-		 */
230
+        /** client/html/email/payment/text/outro/decorators/local
231
+         * Adds a list of local decorators only to the "email payment text outro" html client
232
+         *
233
+         * Decorators extend the functionality of a class by adding new aspects
234
+         * (e.g. log what is currently done), executing the methods of the underlying
235
+         * class only in certain conditions (e.g. only for logged in users) or
236
+         * modify what is returned to the caller.
237
+         *
238
+         * This option allows you to wrap local decorators
239
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
240
+         *
241
+         *  client/html/email/payment/text/outro/decorators/local = array( 'decorator2' )
242
+         *
243
+         * This would add the decorator named "decorator2" defined by
244
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
245
+         *
246
+         * @param array List of decorator names
247
+         * @since 2015.08
248
+         * @category Developer
249
+         * @see client/html/common/decorators/default
250
+         * @see client/html/email/payment/text/outro/decorators/excludes
251
+         * @see client/html/email/payment/text/outro/decorators/global
252
+         */
253 253
 
254
-		return $this->createSubClient( 'email/payment/text/outro/' . $type, $name );
255
-	}
254
+        return $this->createSubClient( 'email/payment/text/outro/' . $type, $name );
255
+    }
256 256
 
257 257
 
258
-	/**
259
-	 * Returns the list of sub-client names configured for the client.
260
-	 *
261
-	 * @return array List of HTML client names
262
-	 */
263
-	protected function getSubClientNames()
264
-	{
265
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
266
-	}
258
+    /**
259
+     * Returns the list of sub-client names configured for the client.
260
+     *
261
+     * @return array List of HTML client names
262
+     */
263
+    protected function getSubClientNames()
264
+    {
265
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
266
+    }
267 267
 }
268 268
\ No newline at end of file
Please login to merge, or discard this patch.