Completed
Push — master ( b4d1c4...5b98ac )
by Aimeos
05:50
created
client/html/src/Client/Html/Checkout/Standard/Order/Account/Standard.php 1 patch
Indentation   +328 added lines, -328 removed lines patch added patch discarded remove patch
@@ -18,333 +18,333 @@
 block discarded – undo
18 18
  * @subpackage Html
19 19
  */
20 20
 class Standard
21
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
22
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
21
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
22
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
23 23
 {
24
-	/** client/html/checkout/standard/order/account/standard/subparts
25
-	 * List of HTML sub-clients rendered within the checkout standard order account 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 2015.09
55
-	 * @category Developer
56
-	 */
57
-	private $subPartPath = 'client/html/checkout/standard/order/account/standard/subparts';
58
-	private $subPartNames = array();
59
-
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 );
72
-
73
-		$html = '';
74
-		foreach( $this->getSubClients() as $subclient ) {
75
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
76
-		}
77
-		$view->accountBody = $html;
78
-
79
-		/** client/html/checkout/standard/order/account/standard/template-body
80
-		 * Relative path to the HTML body template of the checkout standard order account client.
81
-		 *
82
-		 * The template file contains the HTML code and processing instructions
83
-		 * to generate the result shown in the body of the frontend. 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 HTML page body
95
-		 * @since 2015.09
96
-		 * @category Developer
97
-		 * @see client/html/checkout/standard/order/account/standard/template-header
98
-		 */
99
-		$tplconf = 'client/html/checkout/standard/order/account/standard/template-body';
100
-		$default = 'checkout/standard/order-account-body-default.php';
101
-
102
-		return $view->render( $view->config( $tplconf, $default ) );
103
-	}
104
-
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 );
117
-
118
-		$html = '';
119
-		foreach( $this->getSubClients() as $subclient ) {
120
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
121
-		}
122
-		$view->accountHeader = $html;
123
-
124
-		/** client/html/checkout/standard/order/account/standard/template-header
125
-		 * Relative path to the HTML header template of the checkout standard order account client.
126
-		 *
127
-		 * The template file contains the HTML code and processing instructions
128
-		 * to generate the HTML code that is inserted into the HTML page header
129
-		 * of the rendered page in the frontend. 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 HTML page head
141
-		 * @since 2015.09
142
-		 * @category Developer
143
-		 * @see client/html/checkout/standard/order/account/standard/template-body
144
-		 */
145
-		$tplconf = 'client/html/checkout/standard/order/account/standard/template-header';
146
-		$default = 'checkout/standard/order-account-header-default.php';
147
-
148
-		return $view->render( $view->config( $tplconf, $default ) );
149
-	}
150
-
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/checkout/standard/order/account/decorators/excludes
162
-		 * Excludes decorators added by the "common" option from the checkout standard order account 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/checkout/standard/order/account/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.09
181
-		 * @category Developer
182
-		 * @see client/html/common/decorators/default
183
-		 * @see client/html/checkout/standard/order/account/decorators/global
184
-		 * @see client/html/checkout/standard/order/account/decorators/local
185
-		 */
186
-
187
-		/** client/html/checkout/standard/order/account/decorators/global
188
-		 * Adds a list of globally available decorators only to the checkout standard order account 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/checkout/standard/order/account/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.09
205
-		 * @category Developer
206
-		 * @see client/html/common/decorators/default
207
-		 * @see client/html/checkout/standard/order/account/decorators/excludes
208
-		 * @see client/html/checkout/standard/order/account/decorators/local
209
-		 */
210
-
211
-		/** client/html/checkout/standard/order/account/decorators/local
212
-		 * Adds a list of local decorators only to the checkout standard order account 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/checkout/standard/order/account/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.09
229
-		 * @category Developer
230
-		 * @see client/html/common/decorators/default
231
-		 * @see client/html/checkout/standard/order/account/decorators/excludes
232
-		 * @see client/html/checkout/standard/order/account/decorators/global
233
-		 */
234
-
235
-		return $this->createSubClient( 'checkout/standard/order/account/' . $type, $name );
236
-	}
237
-
238
-
239
-	/**
240
-	 * Processes the input, e.g. provides the account form.
241
-	 * A view must be available and this method doesn't generate any output
242
-	 * besides setting view variables.
243
-	 */
244
-	public function process()
245
-	{
246
-		$view = $this->getView();
247
-		$basket = $view->orderBasket;
248
-
249
-		if( $basket->getCustomerId() == '' )
250
-		{
251
-			$email = '<unknown>';
252
-			$context = $this->getContext();
253
-
254
-			try
255
-			{
256
-				$addr = $basket->getAddress( \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT );
257
-				$email = $addr->getEmail();
258
-
259
-				$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer' );
260
-				$search = $manager->createSearch();
261
-				$search->setConditions( $search->compare( '==', 'customer.code', $email ) );
262
-				$search->setSlice( 0, 1 );
263
-				$result = $manager->searchItems( $search );
264
-
265
-				if( ( $item = reset( $result ) ) === false )
266
-				{
267
-					$password = substr( md5( microtime( true ) . getmypid() . rand() ), -8 );
268
-					$item = $this->addCustomerData( $manager->createItem(), $addr, $addr->getEmail(), $password );
269
-					$manager->saveItem( $item );
270
-
271
-					$msg = $item->toArray();
272
-					$msg['customer.password'] = $password;
273
-					$context->getMessageQueue( 'mq-email', 'customer/email/account' )->add( json_encode( $msg ) );
274
-					$context->setUserId( $item->getId() );
275
-				}
276
-
277
-				$basket->setCustomerId( $item->getId() );
278
-
279
-				$orderBaseManager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' );
280
-				$orderBaseManager->saveItem( $basket, false );
281
-			}
282
-			catch( \Exception $e )
283
-			{
284
-				$msg = sprintf( 'Unable to create an account for "%1$s": %2$s', $email, $e->getMessage() );
285
-				$context->getLogger()->log( $msg, \Aimeos\MW\Logger\Base::INFO );
286
-			}
287
-		}
288
-
289
-		parent::process();
290
-	}
291
-
292
-
293
-	/**
294
-	 * Returns the list of sub-client names configured for the client.
295
-	 *
296
-	 * @return array List of HTML client names
297
-	 */
298
-	protected function getSubClientNames()
299
-	{
300
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
301
-	}
302
-
303
-
304
-	/**
305
-	 * Adds the customer and address data to the given customer item
306
-	 *
307
-	 * @param \Aimeos\MShop\Customer\Item\Iface $customer Customer object
308
-	 * @param \Aimeos\MShop\Common\Item\Address\Iface $address Billing address object
309
-	 * @param string $code Unique customer code, e.g. user name or e-mail address
310
-	 * @param string $password Plain-text password for the customer
311
-	 * @return \Aimeos\MShop\Customer\Item\Iface Customer object filled with data
312
-	 */
313
-	protected function addCustomerData( \Aimeos\MShop\Customer\Item\Iface $customer,
314
-		\Aimeos\MShop\Common\Item\Address\Iface $address, $code, $password )
315
-	{
316
-		$label = $address->getLastname();
317
-
318
-		if( ( $part = $address->getFirstname() ) !== '' ) {
319
-			$label = $part . ' ' . $label;
320
-		}
321
-
322
-		if( ( $part = $address->getCompany() ) !== '' ) {
323
-			$label .= ' (' . $part . ')';
324
-		}
325
-
326
-		$customer->setPaymentAddress( $address );
327
-		$customer->setCode( $code );
328
-		$customer->setPassword( $password );
329
-		$customer->setLabel( $label );
330
-		$customer->setStatus( 1 );
331
-
332
-		/** client/html/checkout/standard/order/account/standard/groupids
333
-		 * List of groups new customers should be assigned to
334
-		 *
335
-		 * Newly created customers will be assigned automatically to the groups
336
-		 * given by their IDs. This is especially useful if those groups limit
337
-		 * functionality for those users.
338
-		 *
339
-		 * @param array List of group IDs
340
-		 * @since 2016.03
341
-		 * @category User
342
-		 * @category Developer
343
-		 */
344
-		$config = $this->getContext()->getConfig();
345
-		$gids = (array) $config->get( 'client/html/checkout/standard/order/account/standard/groupids', array() );
346
-		$customer->setGroups( $gids );
347
-
348
-		return $customer;
349
-	}
24
+    /** client/html/checkout/standard/order/account/standard/subparts
25
+     * List of HTML sub-clients rendered within the checkout standard order account 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 2015.09
55
+     * @category Developer
56
+     */
57
+    private $subPartPath = 'client/html/checkout/standard/order/account/standard/subparts';
58
+    private $subPartNames = array();
59
+
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 );
72
+
73
+        $html = '';
74
+        foreach( $this->getSubClients() as $subclient ) {
75
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
76
+        }
77
+        $view->accountBody = $html;
78
+
79
+        /** client/html/checkout/standard/order/account/standard/template-body
80
+         * Relative path to the HTML body template of the checkout standard order account client.
81
+         *
82
+         * The template file contains the HTML code and processing instructions
83
+         * to generate the result shown in the body of the frontend. 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 HTML page body
95
+         * @since 2015.09
96
+         * @category Developer
97
+         * @see client/html/checkout/standard/order/account/standard/template-header
98
+         */
99
+        $tplconf = 'client/html/checkout/standard/order/account/standard/template-body';
100
+        $default = 'checkout/standard/order-account-body-default.php';
101
+
102
+        return $view->render( $view->config( $tplconf, $default ) );
103
+    }
104
+
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 );
117
+
118
+        $html = '';
119
+        foreach( $this->getSubClients() as $subclient ) {
120
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
121
+        }
122
+        $view->accountHeader = $html;
123
+
124
+        /** client/html/checkout/standard/order/account/standard/template-header
125
+         * Relative path to the HTML header template of the checkout standard order account client.
126
+         *
127
+         * The template file contains the HTML code and processing instructions
128
+         * to generate the HTML code that is inserted into the HTML page header
129
+         * of the rendered page in the frontend. 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 HTML page head
141
+         * @since 2015.09
142
+         * @category Developer
143
+         * @see client/html/checkout/standard/order/account/standard/template-body
144
+         */
145
+        $tplconf = 'client/html/checkout/standard/order/account/standard/template-header';
146
+        $default = 'checkout/standard/order-account-header-default.php';
147
+
148
+        return $view->render( $view->config( $tplconf, $default ) );
149
+    }
150
+
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/checkout/standard/order/account/decorators/excludes
162
+         * Excludes decorators added by the "common" option from the checkout standard order account 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/checkout/standard/order/account/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.09
181
+         * @category Developer
182
+         * @see client/html/common/decorators/default
183
+         * @see client/html/checkout/standard/order/account/decorators/global
184
+         * @see client/html/checkout/standard/order/account/decorators/local
185
+         */
186
+
187
+        /** client/html/checkout/standard/order/account/decorators/global
188
+         * Adds a list of globally available decorators only to the checkout standard order account 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/checkout/standard/order/account/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.09
205
+         * @category Developer
206
+         * @see client/html/common/decorators/default
207
+         * @see client/html/checkout/standard/order/account/decorators/excludes
208
+         * @see client/html/checkout/standard/order/account/decorators/local
209
+         */
210
+
211
+        /** client/html/checkout/standard/order/account/decorators/local
212
+         * Adds a list of local decorators only to the checkout standard order account 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/checkout/standard/order/account/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.09
229
+         * @category Developer
230
+         * @see client/html/common/decorators/default
231
+         * @see client/html/checkout/standard/order/account/decorators/excludes
232
+         * @see client/html/checkout/standard/order/account/decorators/global
233
+         */
234
+
235
+        return $this->createSubClient( 'checkout/standard/order/account/' . $type, $name );
236
+    }
237
+
238
+
239
+    /**
240
+     * Processes the input, e.g. provides the account form.
241
+     * A view must be available and this method doesn't generate any output
242
+     * besides setting view variables.
243
+     */
244
+    public function process()
245
+    {
246
+        $view = $this->getView();
247
+        $basket = $view->orderBasket;
248
+
249
+        if( $basket->getCustomerId() == '' )
250
+        {
251
+            $email = '<unknown>';
252
+            $context = $this->getContext();
253
+
254
+            try
255
+            {
256
+                $addr = $basket->getAddress( \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT );
257
+                $email = $addr->getEmail();
258
+
259
+                $manager = \Aimeos\MShop\Factory::createManager( $context, 'customer' );
260
+                $search = $manager->createSearch();
261
+                $search->setConditions( $search->compare( '==', 'customer.code', $email ) );
262
+                $search->setSlice( 0, 1 );
263
+                $result = $manager->searchItems( $search );
264
+
265
+                if( ( $item = reset( $result ) ) === false )
266
+                {
267
+                    $password = substr( md5( microtime( true ) . getmypid() . rand() ), -8 );
268
+                    $item = $this->addCustomerData( $manager->createItem(), $addr, $addr->getEmail(), $password );
269
+                    $manager->saveItem( $item );
270
+
271
+                    $msg = $item->toArray();
272
+                    $msg['customer.password'] = $password;
273
+                    $context->getMessageQueue( 'mq-email', 'customer/email/account' )->add( json_encode( $msg ) );
274
+                    $context->setUserId( $item->getId() );
275
+                }
276
+
277
+                $basket->setCustomerId( $item->getId() );
278
+
279
+                $orderBaseManager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' );
280
+                $orderBaseManager->saveItem( $basket, false );
281
+            }
282
+            catch( \Exception $e )
283
+            {
284
+                $msg = sprintf( 'Unable to create an account for "%1$s": %2$s', $email, $e->getMessage() );
285
+                $context->getLogger()->log( $msg, \Aimeos\MW\Logger\Base::INFO );
286
+            }
287
+        }
288
+
289
+        parent::process();
290
+    }
291
+
292
+
293
+    /**
294
+     * Returns the list of sub-client names configured for the client.
295
+     *
296
+     * @return array List of HTML client names
297
+     */
298
+    protected function getSubClientNames()
299
+    {
300
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
301
+    }
302
+
303
+
304
+    /**
305
+     * Adds the customer and address data to the given customer item
306
+     *
307
+     * @param \Aimeos\MShop\Customer\Item\Iface $customer Customer object
308
+     * @param \Aimeos\MShop\Common\Item\Address\Iface $address Billing address object
309
+     * @param string $code Unique customer code, e.g. user name or e-mail address
310
+     * @param string $password Plain-text password for the customer
311
+     * @return \Aimeos\MShop\Customer\Item\Iface Customer object filled with data
312
+     */
313
+    protected function addCustomerData( \Aimeos\MShop\Customer\Item\Iface $customer,
314
+        \Aimeos\MShop\Common\Item\Address\Iface $address, $code, $password )
315
+    {
316
+        $label = $address->getLastname();
317
+
318
+        if( ( $part = $address->getFirstname() ) !== '' ) {
319
+            $label = $part . ' ' . $label;
320
+        }
321
+
322
+        if( ( $part = $address->getCompany() ) !== '' ) {
323
+            $label .= ' (' . $part . ')';
324
+        }
325
+
326
+        $customer->setPaymentAddress( $address );
327
+        $customer->setCode( $code );
328
+        $customer->setPassword( $password );
329
+        $customer->setLabel( $label );
330
+        $customer->setStatus( 1 );
331
+
332
+        /** client/html/checkout/standard/order/account/standard/groupids
333
+         * List of groups new customers should be assigned to
334
+         *
335
+         * Newly created customers will be assigned automatically to the groups
336
+         * given by their IDs. This is especially useful if those groups limit
337
+         * functionality for those users.
338
+         *
339
+         * @param array List of group IDs
340
+         * @since 2016.03
341
+         * @category User
342
+         * @category Developer
343
+         */
344
+        $config = $this->getContext()->getConfig();
345
+        $gids = (array) $config->get( 'client/html/checkout/standard/order/account/standard/groupids', array() );
346
+        $customer->setGroups( $gids );
347
+
348
+        return $customer;
349
+    }
350 350
 }
351 351
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/Summary/Service/Standard.php 1 patch
Indentation   +235 added lines, -235 removed lines patch added patch discarded remove patch
@@ -19,263 +19,263 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Summary\Service\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Summary\Service\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	/** client/html/checkout/standard/summary/service/standard/subparts
26
-	 * List of HTML sub-clients rendered within the checkout standard 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 2015.11
56
-	 * @category Developer
57
-	 */
58
-	private $subPartPath = 'client/html/checkout/standard/summary/service/standard/subparts';
59
-	private $subPartNames = array();
60
-	private $cache;
25
+    /** client/html/checkout/standard/summary/service/standard/subparts
26
+     * List of HTML sub-clients rendered within the checkout standard 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 2015.11
56
+     * @category Developer
57
+     */
58
+    private $subPartPath = 'client/html/checkout/standard/summary/service/standard/subparts';
59
+    private $subPartNames = array();
60
+    private $cache;
61 61
 
62 62
 
63
-	/**
64
-	 * Returns the HTML code for insertion into the body.
65
-	 *
66
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
67
-	 * @param array &$tags Result array for the list of tags that are associated to the output
68
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
69
-	 * @return string HTML code
70
-	*/
71
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
72
-	{
73
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
63
+    /**
64
+     * Returns the HTML code for insertion into the body.
65
+     *
66
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
67
+     * @param array &$tags Result array for the list of tags that are associated to the output
68
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
69
+     * @return string HTML code
70
+     */
71
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
72
+    {
73
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
74 74
 
75
-		$html = '';
76
-		foreach( $this->getSubClients() as $subclient ) {
77
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
78
-		}
79
-		$view->serviceBody = $html;
75
+        $html = '';
76
+        foreach( $this->getSubClients() as $subclient ) {
77
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
78
+        }
79
+        $view->serviceBody = $html;
80 80
 
81
-		/** client/html/checkout/standard/summary/service/standard/template-body
82
-		 * Relative path to the HTML body template of the checkout standard summary service client.
83
-		 *
84
-		 * The template file contains the HTML code and processing instructions
85
-		 * to generate the result shown in the body of the frontend. The
86
-		 * configuration string is the path to the template file relative
87
-		 * to the templates directory (usually in client/html/templates).
88
-		 *
89
-		 * You can overwrite the template file configuration in extensions and
90
-		 * provide alternative templates. These alternative templates should be
91
-		 * named like the default one but with the string "standard" replaced by
92
-		 * an unique name. You may use the name of your project for this. If
93
-		 * you've implemented an alternative client class as well, "standard"
94
-		 * (second one) should be replaced by the name of the new class in lower
95
-		 * case.
96
-		 *
97
-		 * @param string Relative path to the template creating code for the HTML page body
98
-		 * @since 2015.11
99
-		 * @category Developer
100
-		 * @see client/html/checkout/standard/summary/service/standard/template-header
101
-		 */
102
-		$tplconf = 'client/html/checkout/standard/summary/service/standard/template-body';
103
-		$default = 'common/summary/service-body-default.php';
81
+        /** client/html/checkout/standard/summary/service/standard/template-body
82
+         * Relative path to the HTML body template of the checkout standard summary service client.
83
+         *
84
+         * The template file contains the HTML code and processing instructions
85
+         * to generate the result shown in the body of the frontend. The
86
+         * configuration string is the path to the template file relative
87
+         * to the templates directory (usually in client/html/templates).
88
+         *
89
+         * You can overwrite the template file configuration in extensions and
90
+         * provide alternative templates. These alternative templates should be
91
+         * named like the default one but with the string "standard" replaced by
92
+         * an unique name. You may use the name of your project for this. If
93
+         * you've implemented an alternative client class as well, "standard"
94
+         * (second one) should be replaced by the name of the new class in lower
95
+         * case.
96
+         *
97
+         * @param string Relative path to the template creating code for the HTML page body
98
+         * @since 2015.11
99
+         * @category Developer
100
+         * @see client/html/checkout/standard/summary/service/standard/template-header
101
+         */
102
+        $tplconf = 'client/html/checkout/standard/summary/service/standard/template-body';
103
+        $default = 'common/summary/service-body-default.php';
104 104
 
105
-		return $view->render( $view->config( $tplconf, $default ) );
106
-	}
105
+        return $view->render( $view->config( $tplconf, $default ) );
106
+    }
107 107
 
108 108
 
109
-	/**
110
-	 * Returns the HTML string for insertion into the header.
111
-	 *
112
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
113
-	 * @param array &$tags Result array for the list of tags that are associated to the output
114
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
115
-	 * @return string|null String including HTML tags for the header on error
116
-	 */
117
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
118
-	{
119
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
109
+    /**
110
+     * Returns the HTML string for insertion into the header.
111
+     *
112
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
113
+     * @param array &$tags Result array for the list of tags that are associated to the output
114
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
115
+     * @return string|null String including HTML tags for the header on error
116
+     */
117
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
118
+    {
119
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
120 120
 
121
-		$html = '';
122
-		foreach( $this->getSubClients() as $subclient ) {
123
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
124
-		}
125
-		$view->serviceHeader = $html;
121
+        $html = '';
122
+        foreach( $this->getSubClients() as $subclient ) {
123
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
124
+        }
125
+        $view->serviceHeader = $html;
126 126
 
127
-		/** client/html/checkout/standard/summary/service/standard/template-header
128
-		 * Relative path to the HTML header template of the checkout standard summary service client.
129
-		 *
130
-		 * The template file contains the HTML code and processing instructions
131
-		 * to generate the HTML code that is inserted into the HTML page header
132
-		 * of the rendered page in the frontend. The configuration string is the
133
-		 * path to the template file relative to the templates directory (usually
134
-		 * in client/html/templates).
135
-		 *
136
-		 * You can overwrite the template file configuration in extensions and
137
-		 * provide alternative templates. These alternative templates should be
138
-		 * named like the default one but with the string "standard" replaced by
139
-		 * an unique name. You may use the name of your project for this. If
140
-		 * you've implemented an alternative client class as well, "standard"
141
-		 * (second one) should be replaced by the name of the new class in lower
142
-		 * case.
143
-		 *
144
-		 * @param string Relative path to the template creating code for the HTML page head
145
-		 * @since 2015.11
146
-		 * @category Developer
147
-		 * @see client/html/checkout/standard/summary/service/standard/template-body
148
-		 */
149
-		$tplconf = 'client/html/checkout/standard/summary/service/standard/template-header';
150
-		$default = 'common/summary/service-header-default.php';
127
+        /** client/html/checkout/standard/summary/service/standard/template-header
128
+         * Relative path to the HTML header template of the checkout standard summary service client.
129
+         *
130
+         * The template file contains the HTML code and processing instructions
131
+         * to generate the HTML code that is inserted into the HTML page header
132
+         * of the rendered page in the frontend. The configuration string is the
133
+         * path to the template file relative to the templates directory (usually
134
+         * in client/html/templates).
135
+         *
136
+         * You can overwrite the template file configuration in extensions and
137
+         * provide alternative templates. These alternative templates should be
138
+         * named like the default one but with the string "standard" replaced by
139
+         * an unique name. You may use the name of your project for this. If
140
+         * you've implemented an alternative client class as well, "standard"
141
+         * (second one) should be replaced by the name of the new class in lower
142
+         * case.
143
+         *
144
+         * @param string Relative path to the template creating code for the HTML page head
145
+         * @since 2015.11
146
+         * @category Developer
147
+         * @see client/html/checkout/standard/summary/service/standard/template-body
148
+         */
149
+        $tplconf = 'client/html/checkout/standard/summary/service/standard/template-header';
150
+        $default = 'common/summary/service-header-default.php';
151 151
 
152
-		return $view->render( $view->config( $tplconf, $default ) );
153
-	}
152
+        return $view->render( $view->config( $tplconf, $default ) );
153
+    }
154 154
 
155 155
 
156
-	/**
157
-	 * Returns the sub-client given by its name.
158
-	 *
159
-	 * @param string $type Name of the client type
160
-	 * @param string|null $name Name of the sub-client (Default if null)
161
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
162
-	 */
163
-	public function getSubClient( $type, $name = null )
164
-	{
165
-		/** client/html/checkout/standard/summary/service/decorators/excludes
166
-		 * Excludes decorators added by the "common" option from the checkout standard summary service html client
167
-		 *
168
-		 * Decorators extend the functionality of a class by adding new aspects
169
-		 * (e.g. log what is currently done), executing the methods of the underlying
170
-		 * class only in certain conditions (e.g. only for logged in users) or
171
-		 * modify what is returned to the caller.
172
-		 *
173
-		 * This option allows you to remove a decorator added via
174
-		 * "client/html/common/decorators/default" before they are wrapped
175
-		 * around the html client.
176
-		 *
177
-		 *  client/html/checkout/standard/summary/service/decorators/excludes = array( 'decorator1' )
178
-		 *
179
-		 * This would remove the decorator named "decorator1" from the list of
180
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
181
-		 * "client/html/common/decorators/default" to the html client.
182
-		 *
183
-		 * @param array List of decorator names
184
-		 * @since 2015.08
185
-		 * @category Developer
186
-		 * @see client/html/common/decorators/default
187
-		 * @see client/html/checkout/standard/summary/service/decorators/global
188
-		 * @see client/html/checkout/standard/summary/service/decorators/local
189
-		 */
156
+    /**
157
+     * Returns the sub-client given by its name.
158
+     *
159
+     * @param string $type Name of the client type
160
+     * @param string|null $name Name of the sub-client (Default if null)
161
+     * @return \Aimeos\Client\Html\Iface Sub-client object
162
+     */
163
+    public function getSubClient( $type, $name = null )
164
+    {
165
+        /** client/html/checkout/standard/summary/service/decorators/excludes
166
+         * Excludes decorators added by the "common" option from the checkout standard summary service html client
167
+         *
168
+         * Decorators extend the functionality of a class by adding new aspects
169
+         * (e.g. log what is currently done), executing the methods of the underlying
170
+         * class only in certain conditions (e.g. only for logged in users) or
171
+         * modify what is returned to the caller.
172
+         *
173
+         * This option allows you to remove a decorator added via
174
+         * "client/html/common/decorators/default" before they are wrapped
175
+         * around the html client.
176
+         *
177
+         *  client/html/checkout/standard/summary/service/decorators/excludes = array( 'decorator1' )
178
+         *
179
+         * This would remove the decorator named "decorator1" from the list of
180
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
181
+         * "client/html/common/decorators/default" to the html client.
182
+         *
183
+         * @param array List of decorator names
184
+         * @since 2015.08
185
+         * @category Developer
186
+         * @see client/html/common/decorators/default
187
+         * @see client/html/checkout/standard/summary/service/decorators/global
188
+         * @see client/html/checkout/standard/summary/service/decorators/local
189
+         */
190 190
 
191
-		/** client/html/checkout/standard/summary/service/decorators/global
192
-		 * Adds a list of globally available decorators only to the checkout standard summary service html client
193
-		 *
194
-		 * Decorators extend the functionality of a class by adding new aspects
195
-		 * (e.g. log what is currently done), executing the methods of the underlying
196
-		 * class only in certain conditions (e.g. only for logged in users) or
197
-		 * modify what is returned to the caller.
198
-		 *
199
-		 * This option allows you to wrap global decorators
200
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
201
-		 *
202
-		 *  client/html/checkout/standard/summary/service/decorators/global = array( 'decorator1' )
203
-		 *
204
-		 * This would add the decorator named "decorator1" defined by
205
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
206
-		 *
207
-		 * @param array List of decorator names
208
-		 * @since 2015.08
209
-		 * @category Developer
210
-		 * @see client/html/common/decorators/default
211
-		 * @see client/html/checkout/standard/summary/service/decorators/excludes
212
-		 * @see client/html/checkout/standard/summary/service/decorators/local
213
-		 */
191
+        /** client/html/checkout/standard/summary/service/decorators/global
192
+         * Adds a list of globally available decorators only to the checkout standard summary service html client
193
+         *
194
+         * Decorators extend the functionality of a class by adding new aspects
195
+         * (e.g. log what is currently done), executing the methods of the underlying
196
+         * class only in certain conditions (e.g. only for logged in users) or
197
+         * modify what is returned to the caller.
198
+         *
199
+         * This option allows you to wrap global decorators
200
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
201
+         *
202
+         *  client/html/checkout/standard/summary/service/decorators/global = array( 'decorator1' )
203
+         *
204
+         * This would add the decorator named "decorator1" defined by
205
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
206
+         *
207
+         * @param array List of decorator names
208
+         * @since 2015.08
209
+         * @category Developer
210
+         * @see client/html/common/decorators/default
211
+         * @see client/html/checkout/standard/summary/service/decorators/excludes
212
+         * @see client/html/checkout/standard/summary/service/decorators/local
213
+         */
214 214
 
215
-		/** client/html/checkout/standard/summary/service/decorators/local
216
-		 * Adds a list of local decorators only to the checkout standard summary service html client
217
-		 *
218
-		 * Decorators extend the functionality of a class by adding new aspects
219
-		 * (e.g. log what is currently done), executing the methods of the underlying
220
-		 * class only in certain conditions (e.g. only for logged in users) or
221
-		 * modify what is returned to the caller.
222
-		 *
223
-		 * This option allows you to wrap local decorators
224
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
225
-		 *
226
-		 *  client/html/checkout/standard/summary/service/decorators/local = array( 'decorator2' )
227
-		 *
228
-		 * This would add the decorator named "decorator2" defined by
229
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
230
-		 *
231
-		 * @param array List of decorator names
232
-		 * @since 2015.08
233
-		 * @category Developer
234
-		 * @see client/html/common/decorators/default
235
-		 * @see client/html/checkout/standard/summary/service/decorators/excludes
236
-		 * @see client/html/checkout/standard/summary/service/decorators/global
237
-		 */
215
+        /** client/html/checkout/standard/summary/service/decorators/local
216
+         * Adds a list of local decorators only to the checkout standard summary service html client
217
+         *
218
+         * Decorators extend the functionality of a class by adding new aspects
219
+         * (e.g. log what is currently done), executing the methods of the underlying
220
+         * class only in certain conditions (e.g. only for logged in users) or
221
+         * modify what is returned to the caller.
222
+         *
223
+         * This option allows you to wrap local decorators
224
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
225
+         *
226
+         *  client/html/checkout/standard/summary/service/decorators/local = array( 'decorator2' )
227
+         *
228
+         * This would add the decorator named "decorator2" defined by
229
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
230
+         *
231
+         * @param array List of decorator names
232
+         * @since 2015.08
233
+         * @category Developer
234
+         * @see client/html/common/decorators/default
235
+         * @see client/html/checkout/standard/summary/service/decorators/excludes
236
+         * @see client/html/checkout/standard/summary/service/decorators/global
237
+         */
238 238
 
239
-		return $this->createSubClient( 'checkout/standard/summary/service/' . $type, $name );
240
-	}
239
+        return $this->createSubClient( 'checkout/standard/summary/service/' . $type, $name );
240
+    }
241 241
 
242 242
 
243
-	/**
244
-	 * Returns the list of sub-client names configured for the client.
245
-	 *
246
-	 * @return array List of HTML client names
247
-	 */
248
-	protected function getSubClientNames()
249
-	{
250
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
251
-	}
243
+    /**
244
+     * Returns the list of sub-client names configured for the client.
245
+     *
246
+     * @return array List of HTML client names
247
+     */
248
+    protected function getSubClientNames()
249
+    {
250
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
251
+    }
252 252
 
253 253
 
254
-	/**
255
-	 * Sets the necessary parameter values in the view.
256
-	 *
257
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
258
-	 * @param array &$tags Result array for the list of tags that are associated to the output
259
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
260
-	 * @return \Aimeos\MW\View\Iface Modified view object
261
-	 */
262
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
263
-	{
264
-		$view = parent::setViewParams( $view, $tags, $expire );
254
+    /**
255
+     * Sets the necessary parameter values in the view.
256
+     *
257
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
258
+     * @param array &$tags Result array for the list of tags that are associated to the output
259
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
260
+     * @return \Aimeos\MW\View\Iface Modified view object
261
+     */
262
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
263
+    {
264
+        $view = parent::setViewParams( $view, $tags, $expire );
265 265
 
266
-		if( !isset( $this->cache ) )
267
-		{
268
-			$target = $view->config( 'client/html/checkout/standard/url/target' );
269
-			$cntl = $view->config( 'client/html/checkout/standard/url/controller', 'checkout' );
270
-			$action = $view->config( 'client/html/checkout/standard/url/action', 'index' );
271
-			$config = $view->config( 'client/html/checkout/standard/url/config', array() );
266
+        if( !isset( $this->cache ) )
267
+        {
268
+            $target = $view->config( 'client/html/checkout/standard/url/target' );
269
+            $cntl = $view->config( 'client/html/checkout/standard/url/controller', 'checkout' );
270
+            $action = $view->config( 'client/html/checkout/standard/url/action', 'index' );
271
+            $config = $view->config( 'client/html/checkout/standard/url/config', array() );
272 272
 
273
-			$view->summaryUrlServicePayment = $view->url( $target, $cntl, $action, array( 'c_step' => 'payment' ), array(), $config );
274
-			$view->summaryUrlServiceDelivery = $view->url( $target, $cntl, $action, array( 'c_step' => 'delivery' ), array(), $config );
273
+            $view->summaryUrlServicePayment = $view->url( $target, $cntl, $action, array( 'c_step' => 'payment' ), array(), $config );
274
+            $view->summaryUrlServiceDelivery = $view->url( $target, $cntl, $action, array( 'c_step' => 'delivery' ), array(), $config );
275 275
 
276
-			$this->cache = $view;
277
-		}
276
+            $this->cache = $view;
277
+        }
278 278
 
279
-		return $this->cache;
280
-	}
279
+        return $this->cache;
280
+    }
281 281
 }
282 282
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/Summary/Option/Standard.php 1 patch
Indentation   +219 added lines, -219 removed lines patch added patch discarded remove patch
@@ -19,242 +19,242 @@
 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\Iface
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
+    implements \Aimeos\Client\Html\Iface
24 24
 {
25
-	/** client/html/checkout/standard/summary/option/standard/subparts
26
-	 * List of HTML sub-clients rendered within the checkout standard summary option 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/checkout/standard/summary/option/standard/subparts';
25
+    /** client/html/checkout/standard/summary/option/standard/subparts
26
+     * List of HTML sub-clients rendered within the checkout standard summary option 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/checkout/standard/summary/option/standard/subparts';
59 59
 
60
-	/** client/html/checkout/standard/summary/option/terms/name
61
-	 * Name of the terms part used by the checkout standard summary option client implementation
62
-	 *
63
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Option\Terms\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
-	private $subPartNames = array( 'terms' );
60
+    /** client/html/checkout/standard/summary/option/terms/name
61
+     * Name of the terms part used by the checkout standard summary option client implementation
62
+     *
63
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Option\Terms\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
+    private $subPartNames = array( 'terms' );
71 71
 
72 72
 
73
-	/**
74
-	 * Returns the HTML code for insertion into the body.
75
-	 *
76
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
77
-	 * @param array &$tags Result array for the list of tags that are associated to the output
78
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
79
-	 * @return string HTML code
80
-	 */
81
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
82
-	{
83
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
73
+    /**
74
+     * Returns the HTML code for insertion into the body.
75
+     *
76
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
77
+     * @param array &$tags Result array for the list of tags that are associated to the output
78
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
79
+     * @return string HTML code
80
+     */
81
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
82
+    {
83
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
84 84
 
85
-		$html = '';
86
-		foreach( $this->getSubClients() as $subclient ) {
87
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
88
-		}
89
-		$view->optionBody = $html;
85
+        $html = '';
86
+        foreach( $this->getSubClients() as $subclient ) {
87
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
88
+        }
89
+        $view->optionBody = $html;
90 90
 
91
-		/** client/html/checkout/standard/summary/option/standard/template-body
92
-		 * Relative path to the HTML body template of the checkout standard summary option client.
93
-		 *
94
-		 * The template file contains the HTML code and processing instructions
95
-		 * to generate the result shown in the body of the frontend. The
96
-		 * configuration string is the path to the template file relative
97
-		 * to the templates directory (usually in client/html/templates).
98
-		 *
99
-		 * You can overwrite the template file configuration in extensions and
100
-		 * provide alternative templates. These alternative templates should be
101
-		 * named like the default one but with the string "standard" replaced by
102
-		 * an unique name. You may use the name of your project for this. If
103
-		 * you've implemented an alternative client class as well, "standard"
104
-		 * should be replaced by the name of the new class.
105
-		 *
106
-		 * @param string Relative path to the template creating code for the HTML page body
107
-		 * @since 2014.03
108
-		 * @category Developer
109
-		 * @see client/html/checkout/standard/summary/option/standard/template-header
110
-		 */
111
-		$tplconf = 'client/html/checkout/standard/summary/option/standard/template-body';
112
-		$default = 'checkout/standard/summary-option-body-default.php';
91
+        /** client/html/checkout/standard/summary/option/standard/template-body
92
+         * Relative path to the HTML body template of the checkout standard summary option client.
93
+         *
94
+         * The template file contains the HTML code and processing instructions
95
+         * to generate the result shown in the body of the frontend. The
96
+         * configuration string is the path to the template file relative
97
+         * to the templates directory (usually in client/html/templates).
98
+         *
99
+         * You can overwrite the template file configuration in extensions and
100
+         * provide alternative templates. These alternative templates should be
101
+         * named like the default one but with the string "standard" replaced by
102
+         * an unique name. You may use the name of your project for this. If
103
+         * you've implemented an alternative client class as well, "standard"
104
+         * should be replaced by the name of the new class.
105
+         *
106
+         * @param string Relative path to the template creating code for the HTML page body
107
+         * @since 2014.03
108
+         * @category Developer
109
+         * @see client/html/checkout/standard/summary/option/standard/template-header
110
+         */
111
+        $tplconf = 'client/html/checkout/standard/summary/option/standard/template-body';
112
+        $default = 'checkout/standard/summary-option-body-default.php';
113 113
 
114
-		return $view->render( $view->config( $tplconf, $default ) );
115
-	}
114
+        return $view->render( $view->config( $tplconf, $default ) );
115
+    }
116 116
 
117 117
 
118
-	/**
119
-	 * Returns the HTML string for insertion into the header.
120
-	 *
121
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
122
-	 * @param array &$tags Result array for the list of tags that are associated to the output
123
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
124
-	 * @return string|null String including HTML tags for the header on error
125
-	 */
126
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
127
-	{
128
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
118
+    /**
119
+     * Returns the HTML string for insertion into the header.
120
+     *
121
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
122
+     * @param array &$tags Result array for the list of tags that are associated to the output
123
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
124
+     * @return string|null String including HTML tags for the header on error
125
+     */
126
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
127
+    {
128
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
129 129
 
130
-		$html = '';
131
-		foreach( $this->getSubClients() as $subclient ) {
132
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
133
-		}
134
-		$view->optionHeader = $html;
130
+        $html = '';
131
+        foreach( $this->getSubClients() as $subclient ) {
132
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
133
+        }
134
+        $view->optionHeader = $html;
135 135
 
136
-		/** client/html/checkout/standard/summary/option/standard/template-header
137
-		 * Relative path to the HTML header template of the checkout standard summary option client.
138
-		 *
139
-		 * The template file contains the HTML code and processing instructions
140
-		 * to generate the HTML code that is inserted into the HTML page header
141
-		 * of the rendered page in the frontend. The configuration string is the
142
-		 * path to the template file relative to the templates directory (usually
143
-		 * in client/html/templates).
144
-		 *
145
-		 * You can overwrite the template file configuration in extensions and
146
-		 * provide alternative templates. These alternative templates should be
147
-		 * named like the default one but with the string "standard" replaced by
148
-		 * an unique name. You may use the name of your project for this. If
149
-		 * you've implemented an alternative client class as well, "standard"
150
-		 * should be replaced by the name of the new class.
151
-		 *
152
-		 * @param string Relative path to the template creating code for the HTML page head
153
-		 * @since 2014.03
154
-		 * @category Developer
155
-		 * @see client/html/checkout/standard/summary/option/standard/template-body
156
-		 */
157
-		$tplconf = 'client/html/checkout/standard/summary/option/standard/template-header';
158
-		$default = 'checkout/standard/summary-option-header-default.php';
136
+        /** client/html/checkout/standard/summary/option/standard/template-header
137
+         * Relative path to the HTML header template of the checkout standard summary option client.
138
+         *
139
+         * The template file contains the HTML code and processing instructions
140
+         * to generate the HTML code that is inserted into the HTML page header
141
+         * of the rendered page in the frontend. The configuration string is the
142
+         * path to the template file relative to the templates directory (usually
143
+         * in client/html/templates).
144
+         *
145
+         * You can overwrite the template file configuration in extensions and
146
+         * provide alternative templates. These alternative templates should be
147
+         * named like the default one but with the string "standard" replaced by
148
+         * an unique name. You may use the name of your project for this. If
149
+         * you've implemented an alternative client class as well, "standard"
150
+         * should be replaced by the name of the new class.
151
+         *
152
+         * @param string Relative path to the template creating code for the HTML page head
153
+         * @since 2014.03
154
+         * @category Developer
155
+         * @see client/html/checkout/standard/summary/option/standard/template-body
156
+         */
157
+        $tplconf = 'client/html/checkout/standard/summary/option/standard/template-header';
158
+        $default = 'checkout/standard/summary-option-header-default.php';
159 159
 
160
-		return $view->render( $view->config( $tplconf, $default ) );
161
-	}
160
+        return $view->render( $view->config( $tplconf, $default ) );
161
+    }
162 162
 
163 163
 
164
-	/**
165
-	 * Returns the sub-client given by its name.
166
-	 *
167
-	 * @param string $type Name of the client type
168
-	 * @param string|null $name Name of the sub-client (Default if null)
169
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
170
-	 */
171
-	public function getSubClient( $type, $name = null )
172
-	{
173
-		/** client/html/checkout/standard/summary/option/decorators/excludes
174
-		 * Excludes decorators added by the "common" option from the checkout standard summary option html client
175
-		 *
176
-		 * Decorators extend the functionality of a class by adding new aspects
177
-		 * (e.g. log what is currently done), executing the methods of the underlying
178
-		 * class only in certain conditions (e.g. only for logged in users) or
179
-		 * modify what is returned to the caller.
180
-		 *
181
-		 * This option allows you to remove a decorator added via
182
-		 * "client/html/common/decorators/default" before they are wrapped
183
-		 * around the html client.
184
-		 *
185
-		 *  client/html/checkout/standard/summary/option/decorators/excludes = array( 'decorator1' )
186
-		 *
187
-		 * This would remove the decorator named "decorator1" from the list of
188
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
189
-		 * "client/html/common/decorators/default" to the html client.
190
-		 *
191
-		 * @param array List of decorator names
192
-		 * @since 2015.08
193
-		 * @category Developer
194
-		 * @see client/html/common/decorators/default
195
-		 * @see client/html/checkout/standard/summary/option/decorators/global
196
-		 * @see client/html/checkout/standard/summary/option/decorators/local
197
-		 */
164
+    /**
165
+     * Returns the sub-client given by its name.
166
+     *
167
+     * @param string $type Name of the client type
168
+     * @param string|null $name Name of the sub-client (Default if null)
169
+     * @return \Aimeos\Client\Html\Iface Sub-client object
170
+     */
171
+    public function getSubClient( $type, $name = null )
172
+    {
173
+        /** client/html/checkout/standard/summary/option/decorators/excludes
174
+         * Excludes decorators added by the "common" option from the checkout standard summary option html client
175
+         *
176
+         * Decorators extend the functionality of a class by adding new aspects
177
+         * (e.g. log what is currently done), executing the methods of the underlying
178
+         * class only in certain conditions (e.g. only for logged in users) or
179
+         * modify what is returned to the caller.
180
+         *
181
+         * This option allows you to remove a decorator added via
182
+         * "client/html/common/decorators/default" before they are wrapped
183
+         * around the html client.
184
+         *
185
+         *  client/html/checkout/standard/summary/option/decorators/excludes = array( 'decorator1' )
186
+         *
187
+         * This would remove the decorator named "decorator1" from the list of
188
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
189
+         * "client/html/common/decorators/default" to the html client.
190
+         *
191
+         * @param array List of decorator names
192
+         * @since 2015.08
193
+         * @category Developer
194
+         * @see client/html/common/decorators/default
195
+         * @see client/html/checkout/standard/summary/option/decorators/global
196
+         * @see client/html/checkout/standard/summary/option/decorators/local
197
+         */
198 198
 
199
-		/** client/html/checkout/standard/summary/option/decorators/global
200
-		 * Adds a list of globally available decorators only to the checkout standard summary option html client
201
-		 *
202
-		 * Decorators extend the functionality of a class by adding new aspects
203
-		 * (e.g. log what is currently done), executing the methods of the underlying
204
-		 * class only in certain conditions (e.g. only for logged in users) or
205
-		 * modify what is returned to the caller.
206
-		 *
207
-		 * This option allows you to wrap global decorators
208
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
209
-		 *
210
-		 *  client/html/checkout/standard/summary/option/decorators/global = array( 'decorator1' )
211
-		 *
212
-		 * This would add the decorator named "decorator1" defined by
213
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
214
-		 *
215
-		 * @param array List of decorator names
216
-		 * @since 2015.08
217
-		 * @category Developer
218
-		 * @see client/html/common/decorators/default
219
-		 * @see client/html/checkout/standard/summary/option/decorators/excludes
220
-		 * @see client/html/checkout/standard/summary/option/decorators/local
221
-		 */
199
+        /** client/html/checkout/standard/summary/option/decorators/global
200
+         * Adds a list of globally available decorators only to the checkout standard summary option html client
201
+         *
202
+         * Decorators extend the functionality of a class by adding new aspects
203
+         * (e.g. log what is currently done), executing the methods of the underlying
204
+         * class only in certain conditions (e.g. only for logged in users) or
205
+         * modify what is returned to the caller.
206
+         *
207
+         * This option allows you to wrap global decorators
208
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
209
+         *
210
+         *  client/html/checkout/standard/summary/option/decorators/global = array( 'decorator1' )
211
+         *
212
+         * This would add the decorator named "decorator1" defined by
213
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
214
+         *
215
+         * @param array List of decorator names
216
+         * @since 2015.08
217
+         * @category Developer
218
+         * @see client/html/common/decorators/default
219
+         * @see client/html/checkout/standard/summary/option/decorators/excludes
220
+         * @see client/html/checkout/standard/summary/option/decorators/local
221
+         */
222 222
 
223
-		/** client/html/checkout/standard/summary/option/decorators/local
224
-		 * Adds a list of local decorators only to the checkout standard summary option html client
225
-		 *
226
-		 * Decorators extend the functionality of a class by adding new aspects
227
-		 * (e.g. log what is currently done), executing the methods of the underlying
228
-		 * class only in certain conditions (e.g. only for logged in users) or
229
-		 * modify what is returned to the caller.
230
-		 *
231
-		 * This option allows you to wrap local decorators
232
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
233
-		 *
234
-		 *  client/html/checkout/standard/summary/option/decorators/local = array( 'decorator2' )
235
-		 *
236
-		 * This would add the decorator named "decorator2" defined by
237
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
238
-		 *
239
-		 * @param array List of decorator names
240
-		 * @since 2015.08
241
-		 * @category Developer
242
-		 * @see client/html/common/decorators/default
243
-		 * @see client/html/checkout/standard/summary/option/decorators/excludes
244
-		 * @see client/html/checkout/standard/summary/option/decorators/global
245
-		 */
223
+        /** client/html/checkout/standard/summary/option/decorators/local
224
+         * Adds a list of local decorators only to the checkout standard summary option html client
225
+         *
226
+         * Decorators extend the functionality of a class by adding new aspects
227
+         * (e.g. log what is currently done), executing the methods of the underlying
228
+         * class only in certain conditions (e.g. only for logged in users) or
229
+         * modify what is returned to the caller.
230
+         *
231
+         * This option allows you to wrap local decorators
232
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
233
+         *
234
+         *  client/html/checkout/standard/summary/option/decorators/local = array( 'decorator2' )
235
+         *
236
+         * This would add the decorator named "decorator2" defined by
237
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
238
+         *
239
+         * @param array List of decorator names
240
+         * @since 2015.08
241
+         * @category Developer
242
+         * @see client/html/common/decorators/default
243
+         * @see client/html/checkout/standard/summary/option/decorators/excludes
244
+         * @see client/html/checkout/standard/summary/option/decorators/global
245
+         */
246 246
 
247
-		return $this->createSubClient( 'checkout/standard/summary/option/' . $type, $name );
248
-	}
247
+        return $this->createSubClient( 'checkout/standard/summary/option/' . $type, $name );
248
+    }
249 249
 
250 250
 
251
-	/**
252
-	 * Returns the list of sub-client names configured for the client.
253
-	 *
254
-	 * @return array List of HTML client names
255
-	 */
256
-	protected function getSubClientNames()
257
-	{
258
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
259
-	}
251
+    /**
252
+     * Returns the list of sub-client names configured for the client.
253
+     *
254
+     * @return array List of HTML client names
255
+     */
256
+    protected function getSubClientNames()
257
+    {
258
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
259
+    }
260 260
 }
261 261
\ No newline at end of file
Please login to merge, or discard this patch.
html/src/Client/Html/Checkout/Standard/Summary/Option/Terms/Standard.php 1 patch
Indentation   +230 added lines, -230 removed lines patch added patch discarded remove patch
@@ -19,258 +19,258 @@
 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\Iface
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
+    implements \Aimeos\Client\Html\Iface
24 24
 {
25
-	/** client/html/checkout/standard/summary/option/terms/standard/subparts
26
-	 * List of HTML sub-clients rendered within the checkout standard summary option terms 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/checkout/standard/summary/option/terms/standard/subparts';
59
-	private $subPartNames = array();
25
+    /** client/html/checkout/standard/summary/option/terms/standard/subparts
26
+     * List of HTML sub-clients rendered within the checkout standard summary option terms 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/checkout/standard/summary/option/terms/standard/subparts';
59
+    private $subPartNames = array();
60 60
 
61 61
 
62
-	/**
63
-	 * Returns the HTML code for insertion into the body.
64
-	 *
65
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
-	 * @param array &$tags Result array for the list of tags that are associated to the output
67
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
-	 * @return string HTML code
69
-	 */
70
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
-	{
72
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
62
+    /**
63
+     * Returns the HTML code for insertion into the body.
64
+     *
65
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
+     * @param array &$tags Result array for the list of tags that are associated to the output
67
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
+     * @return string HTML code
69
+     */
70
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
+    {
72
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
73 73
 
74
-		$html = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
-		}
78
-		$view->optionBody = $html;
74
+        $html = '';
75
+        foreach( $this->getSubClients() as $subclient ) {
76
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
+        }
78
+        $view->optionBody = $html;
79 79
 
80
-		/** client/html/checkout/standard/summary/option/terms/standard/template-body
81
-		 * Relative path to the HTML body template of the checkout standard summary option terms client.
82
-		 *
83
-		 * The template file contains the HTML code and processing instructions
84
-		 * to generate the result shown in the body of the frontend. The
85
-		 * configuration string is the path to the template file relative
86
-		 * to the templates directory (usually in client/html/templates).
87
-		 *
88
-		 * You can overwrite the template file configuration in extensions and
89
-		 * provide alternative templates. These alternative templates should be
90
-		 * named like the default one but with the string "standard" replaced by
91
-		 * an unique name. You may use the name of your project for this. If
92
-		 * you've implemented an alternative client class as well, "standard"
93
-		 * should be replaced by the name of the new class.
94
-		 *
95
-		 * @param string Relative path to the template creating code for the HTML page body
96
-		 * @since 2014.03
97
-		 * @category Developer
98
-		 * @see client/html/checkout/standard/summary/option/terms/standard/template-header
99
-		 */
100
-		$tplconf = 'client/html/checkout/standard/summary/option/terms/standard/template-body';
101
-		$default = 'checkout/standard/summary-option-terms-body-default.php';
80
+        /** client/html/checkout/standard/summary/option/terms/standard/template-body
81
+         * Relative path to the HTML body template of the checkout standard summary option terms client.
82
+         *
83
+         * The template file contains the HTML code and processing instructions
84
+         * to generate the result shown in the body of the frontend. The
85
+         * configuration string is the path to the template file relative
86
+         * to the templates directory (usually in client/html/templates).
87
+         *
88
+         * You can overwrite the template file configuration in extensions and
89
+         * provide alternative templates. These alternative templates should be
90
+         * named like the default one but with the string "standard" replaced by
91
+         * an unique name. You may use the name of your project for this. If
92
+         * you've implemented an alternative client class as well, "standard"
93
+         * should be replaced by the name of the new class.
94
+         *
95
+         * @param string Relative path to the template creating code for the HTML page body
96
+         * @since 2014.03
97
+         * @category Developer
98
+         * @see client/html/checkout/standard/summary/option/terms/standard/template-header
99
+         */
100
+        $tplconf = 'client/html/checkout/standard/summary/option/terms/standard/template-body';
101
+        $default = 'checkout/standard/summary-option-terms-body-default.php';
102 102
 
103
-		return $view->render( $view->config( $tplconf, $default ) );
104
-	}
103
+        return $view->render( $view->config( $tplconf, $default ) );
104
+    }
105 105
 
106 106
 
107
-	/**
108
-	 * Returns the HTML string for insertion into the header.
109
-	 *
110
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
-	 * @param array &$tags Result array for the list of tags that are associated to the output
112
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
114
-	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
-	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
107
+    /**
108
+     * Returns the HTML string for insertion into the header.
109
+     *
110
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
+     * @param array &$tags Result array for the list of tags that are associated to the output
112
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
+     * @return string|null String including HTML tags for the header on error
114
+     */
115
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
+    {
117
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
118 118
 
119
-		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
-		}
123
-		$view->optionHeader = $html;
119
+        $html = '';
120
+        foreach( $this->getSubClients() as $subclient ) {
121
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
+        }
123
+        $view->optionHeader = $html;
124 124
 
125
-		/** client/html/checkout/standard/summary/option/terms/standard/template-header
126
-		 * Relative path to the HTML header template of the checkout standard summary option terms client.
127
-		 *
128
-		 * The template file contains the HTML code and processing instructions
129
-		 * to generate the HTML code that is inserted into the HTML page header
130
-		 * of the rendered page in the frontend. The configuration string is the
131
-		 * path to the template file relative to the templates directory (usually
132
-		 * in client/html/templates).
133
-		 *
134
-		 * You can overwrite the template file configuration in extensions and
135
-		 * provide alternative templates. These alternative templates should be
136
-		 * named like the default one but with the string "standard" replaced by
137
-		 * an unique name. You may use the name of your project for this. If
138
-		 * you've implemented an alternative client class as well, "standard"
139
-		 * should be replaced by the name of the new class.
140
-		 *
141
-		 * @param string Relative path to the template creating code for the HTML page head
142
-		 * @since 2014.03
143
-		 * @category Developer
144
-		 * @see client/html/checkout/standard/summary/option/terms/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/checkout/standard/summary/option/terms/standard/template-header';
147
-		$default = 'checkout/standard/summary-option-terms-header-default.php';
125
+        /** client/html/checkout/standard/summary/option/terms/standard/template-header
126
+         * Relative path to the HTML header template of the checkout standard summary option terms client.
127
+         *
128
+         * The template file contains the HTML code and processing instructions
129
+         * to generate the HTML code that is inserted into the HTML page header
130
+         * of the rendered page in the frontend. The configuration string is the
131
+         * path to the template file relative to the templates directory (usually
132
+         * in client/html/templates).
133
+         *
134
+         * You can overwrite the template file configuration in extensions and
135
+         * provide alternative templates. These alternative templates should be
136
+         * named like the default one but with the string "standard" replaced by
137
+         * an unique name. You may use the name of your project for this. If
138
+         * you've implemented an alternative client class as well, "standard"
139
+         * should be replaced by the name of the new class.
140
+         *
141
+         * @param string Relative path to the template creating code for the HTML page head
142
+         * @since 2014.03
143
+         * @category Developer
144
+         * @see client/html/checkout/standard/summary/option/terms/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/checkout/standard/summary/option/terms/standard/template-header';
147
+        $default = 'checkout/standard/summary-option-terms-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151 151
 
152 152
 
153
-	/**
154
-	 * Returns the sub-client given by its name.
155
-	 *
156
-	 * @param string $type Name of the client type
157
-	 * @param string|null $name Name of the sub-client (Default if null)
158
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
159
-	 */
160
-	public function getSubClient( $type, $name = null )
161
-	{
162
-		/** client/html/checkout/standard/summary/option/terms/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the checkout standard summary option terms 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/checkout/standard/summary/option/terms/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/checkout/standard/summary/option/terms/decorators/global
185
-		 * @see client/html/checkout/standard/summary/option/terms/decorators/local
186
-		 */
153
+    /**
154
+     * Returns the sub-client given by its name.
155
+     *
156
+     * @param string $type Name of the client type
157
+     * @param string|null $name Name of the sub-client (Default if null)
158
+     * @return \Aimeos\Client\Html\Iface Sub-client object
159
+     */
160
+    public function getSubClient( $type, $name = null )
161
+    {
162
+        /** client/html/checkout/standard/summary/option/terms/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the checkout standard summary option terms 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/checkout/standard/summary/option/terms/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/checkout/standard/summary/option/terms/decorators/global
185
+         * @see client/html/checkout/standard/summary/option/terms/decorators/local
186
+         */
187 187
 
188
-		/** client/html/checkout/standard/summary/option/terms/decorators/global
189
-		 * Adds a list of globally available decorators only to the checkout standard summary option terms 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/checkout/standard/summary/option/terms/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/checkout/standard/summary/option/terms/decorators/excludes
209
-		 * @see client/html/checkout/standard/summary/option/terms/decorators/local
210
-		 */
188
+        /** client/html/checkout/standard/summary/option/terms/decorators/global
189
+         * Adds a list of globally available decorators only to the checkout standard summary option terms 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/checkout/standard/summary/option/terms/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/checkout/standard/summary/option/terms/decorators/excludes
209
+         * @see client/html/checkout/standard/summary/option/terms/decorators/local
210
+         */
211 211
 
212
-		/** client/html/checkout/standard/summary/option/terms/decorators/local
213
-		 * Adds a list of local decorators only to the checkout standard summary option terms 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/checkout/standard/summary/option/terms/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/checkout/standard/summary/option/terms/decorators/excludes
233
-		 * @see client/html/checkout/standard/summary/option/terms/decorators/global
234
-		 */
212
+        /** client/html/checkout/standard/summary/option/terms/decorators/local
213
+         * Adds a list of local decorators only to the checkout standard summary option terms 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/checkout/standard/summary/option/terms/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/checkout/standard/summary/option/terms/decorators/excludes
233
+         * @see client/html/checkout/standard/summary/option/terms/decorators/global
234
+         */
235 235
 
236
-		return $this->createSubClient( 'checkout/standard/summary/option/terms/' . $type, $name );
237
-	}
236
+        return $this->createSubClient( 'checkout/standard/summary/option/terms/' . $type, $name );
237
+    }
238 238
 
239 239
 
240
-	/**
241
-	 * Processes the input, e.g. store given values.
242
-	 * A view must be available and this method doesn't generate any output
243
-	 * besides setting view variables.
244
-	 */
245
-	public function process()
246
-	{
247
-		$view = $this->getView();
240
+    /**
241
+     * Processes the input, e.g. store given values.
242
+     * A view must be available and this method doesn't generate any output
243
+     * besides setting view variables.
244
+     */
245
+    public function process()
246
+    {
247
+        $view = $this->getView();
248 248
 
249
-		// only start if there's something to do
250
-		if( ( $option = $view->param( 'cs_option_terms', null ) ) === null ) {
251
-			return;
252
-		}
249
+        // only start if there's something to do
250
+        if( ( $option = $view->param( 'cs_option_terms', null ) ) === null ) {
251
+            return;
252
+        }
253 253
 
254
-		if( ( $option = $view->param( 'cs_option_terms_value', 0 ) ) != 1 )
255
-		{
256
-			$view->standardStepActive = 'summary';
257
-			$view->termsError = true;
254
+        if( ( $option = $view->param( 'cs_option_terms_value', 0 ) ) != 1 )
255
+        {
256
+            $view->standardStepActive = 'summary';
257
+            $view->termsError = true;
258 258
 
259
-			$error = array( $view->translate( 'client', 'Please accept the terms and conditions' ) );
260
-			$view->standardErrorList = $error + $view->get( 'standardErrorList', array() );
261
-		}
259
+            $error = array( $view->translate( 'client', 'Please accept the terms and conditions' ) );
260
+            $view->standardErrorList = $error + $view->get( 'standardErrorList', array() );
261
+        }
262 262
 
263
-		parent::process();
264
-	}
263
+        parent::process();
264
+    }
265 265
 
266 266
 
267
-	/**
268
-	 * Returns the list of sub-client names configured for the client.
269
-	 *
270
-	 * @return array List of HTML client names
271
-	 */
272
-	protected function getSubClientNames()
273
-	{
274
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
275
-	}
267
+    /**
268
+     * Returns the list of sub-client names configured for the client.
269
+     *
270
+     * @return array List of HTML client names
271
+     */
272
+    protected function getSubClientNames()
273
+    {
274
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
275
+    }
276 276
 }
277 277
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/Summary/Coupon/Standard.php 1 patch
Indentation   +235 added lines, -235 removed lines patch added patch discarded remove patch
@@ -19,263 +19,263 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Summary\Coupon\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Summary\Coupon\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	/** client/html/checkout/standard/summary/coupon/standard/subparts
26
-	 * List of HTML sub-clients rendered within the checkout standard 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 2015.11
56
-	 * @category Developer
57
-	 */
58
-	private $subPartPath = 'client/html/checkout/standard/summary/coupon/standard/subparts';
59
-	private $subPartNames = array();
60
-	private $cache;
25
+    /** client/html/checkout/standard/summary/coupon/standard/subparts
26
+     * List of HTML sub-clients rendered within the checkout standard 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 2015.11
56
+     * @category Developer
57
+     */
58
+    private $subPartPath = 'client/html/checkout/standard/summary/coupon/standard/subparts';
59
+    private $subPartNames = array();
60
+    private $cache;
61 61
 
62 62
 
63
-	/**
64
-	 * Returns the HTML code for insertion into the body.
65
-	 *
66
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
67
-	 * @param array &$tags Result array for the list of tags that are associated to the output
68
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
69
-	 * @return string HTML code
70
-	*/
71
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
72
-	{
73
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
63
+    /**
64
+     * Returns the HTML code for insertion into the body.
65
+     *
66
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
67
+     * @param array &$tags Result array for the list of tags that are associated to the output
68
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
69
+     * @return string HTML code
70
+     */
71
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
72
+    {
73
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
74 74
 
75
-		$html = '';
76
-		foreach( $this->getSubClients() as $subclient ) {
77
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
78
-		}
79
-		$view->couponBody = $html;
75
+        $html = '';
76
+        foreach( $this->getSubClients() as $subclient ) {
77
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
78
+        }
79
+        $view->couponBody = $html;
80 80
 
81
-		/** client/html/checkout/standard/summary/coupon/standard/template-body
82
-		 * Relative path to the HTML body template of the checkout standard summary coupon client.
83
-		 *
84
-		 * The template file contains the HTML code and processing instructions
85
-		 * to generate the result shown in the body of the frontend. The
86
-		 * configuration string is the path to the template file relative
87
-		 * to the templates directory (usually in client/html/templates).
88
-		 *
89
-		 * You can overwrite the template file configuration in extensions and
90
-		 * provide alternative templates. These alternative templates should be
91
-		 * named like the default one but with the string "standard" replaced by
92
-		 * an unique name. You may use the name of your project for this. If
93
-		 * you've implemented an alternative client class as well, "standard"
94
-		 * (second one) should be replaced by the name of the new class in lower
95
-		 * case.
96
-		 *
97
-		 * @param string Relative path to the template creating code for the HTML page body
98
-		 * @since 2015.11
99
-		 * @category Developer
100
-		 * @see client/html/checkout/standard/summary/coupon/standard/template-header
101
-		 */
102
-		$tplconf = 'client/html/checkout/standard/summary/coupon/standard/template-body';
103
-		$default = 'common/summary/coupon-body-default.php';
81
+        /** client/html/checkout/standard/summary/coupon/standard/template-body
82
+         * Relative path to the HTML body template of the checkout standard summary coupon client.
83
+         *
84
+         * The template file contains the HTML code and processing instructions
85
+         * to generate the result shown in the body of the frontend. The
86
+         * configuration string is the path to the template file relative
87
+         * to the templates directory (usually in client/html/templates).
88
+         *
89
+         * You can overwrite the template file configuration in extensions and
90
+         * provide alternative templates. These alternative templates should be
91
+         * named like the default one but with the string "standard" replaced by
92
+         * an unique name. You may use the name of your project for this. If
93
+         * you've implemented an alternative client class as well, "standard"
94
+         * (second one) should be replaced by the name of the new class in lower
95
+         * case.
96
+         *
97
+         * @param string Relative path to the template creating code for the HTML page body
98
+         * @since 2015.11
99
+         * @category Developer
100
+         * @see client/html/checkout/standard/summary/coupon/standard/template-header
101
+         */
102
+        $tplconf = 'client/html/checkout/standard/summary/coupon/standard/template-body';
103
+        $default = 'common/summary/coupon-body-default.php';
104 104
 
105
-		return $view->render( $view->config( $tplconf, $default ) );
106
-	}
105
+        return $view->render( $view->config( $tplconf, $default ) );
106
+    }
107 107
 
108 108
 
109
-	/**
110
-	 * Returns the HTML string for insertion into the header.
111
-	 *
112
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
113
-	 * @param array &$tags Result array for the list of tags that are associated to the output
114
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
115
-	 * @return string|null String including HTML tags for the header on error
116
-	 */
117
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
118
-	{
119
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
109
+    /**
110
+     * Returns the HTML string for insertion into the header.
111
+     *
112
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
113
+     * @param array &$tags Result array for the list of tags that are associated to the output
114
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
115
+     * @return string|null String including HTML tags for the header on error
116
+     */
117
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
118
+    {
119
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
120 120
 
121
-		$html = '';
122
-		foreach( $this->getSubClients() as $subclient ) {
123
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
124
-		}
125
-		$view->couponHeader = $html;
121
+        $html = '';
122
+        foreach( $this->getSubClients() as $subclient ) {
123
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
124
+        }
125
+        $view->couponHeader = $html;
126 126
 
127
-		/** client/html/checkout/standard/summary/coupon/standard/template-header
128
-		 * Relative path to the HTML header template of the checkout standard summary coupon client.
129
-		 *
130
-		 * The template file contains the HTML code and processing instructions
131
-		 * to generate the HTML code that is inserted into the HTML page header
132
-		 * of the rendered page in the frontend. The configuration string is the
133
-		 * path to the template file relative to the templates directory (usually
134
-		 * in client/html/templates).
135
-		 *
136
-		 * You can overwrite the template file configuration in extensions and
137
-		 * provide alternative templates. These alternative templates should be
138
-		 * named like the default one but with the string "standard" replaced by
139
-		 * an unique name. You may use the name of your project for this. If
140
-		 * you've implemented an alternative client class as well, "standard"
141
-		 * (second one) should be replaced by the name of the new class in lower
142
-		 * case.
143
-		 *
144
-		 * @param string Relative path to the template creating code for the HTML page head
145
-		 * @since 2015.11
146
-		 * @category Developer
147
-		 * @see client/html/checkout/standard/summary/coupon/standard/template-body
148
-		 */
149
-		$tplconf = 'client/html/checkout/standard/summary/coupon/standard/template-header';
150
-		$default = 'common/summary/coupon-header-default.php';
127
+        /** client/html/checkout/standard/summary/coupon/standard/template-header
128
+         * Relative path to the HTML header template of the checkout standard summary coupon client.
129
+         *
130
+         * The template file contains the HTML code and processing instructions
131
+         * to generate the HTML code that is inserted into the HTML page header
132
+         * of the rendered page in the frontend. The configuration string is the
133
+         * path to the template file relative to the templates directory (usually
134
+         * in client/html/templates).
135
+         *
136
+         * You can overwrite the template file configuration in extensions and
137
+         * provide alternative templates. These alternative templates should be
138
+         * named like the default one but with the string "standard" replaced by
139
+         * an unique name. You may use the name of your project for this. If
140
+         * you've implemented an alternative client class as well, "standard"
141
+         * (second one) should be replaced by the name of the new class in lower
142
+         * case.
143
+         *
144
+         * @param string Relative path to the template creating code for the HTML page head
145
+         * @since 2015.11
146
+         * @category Developer
147
+         * @see client/html/checkout/standard/summary/coupon/standard/template-body
148
+         */
149
+        $tplconf = 'client/html/checkout/standard/summary/coupon/standard/template-header';
150
+        $default = 'common/summary/coupon-header-default.php';
151 151
 
152
-		return $view->render( $view->config( $tplconf, $default ) );
153
-	}
152
+        return $view->render( $view->config( $tplconf, $default ) );
153
+    }
154 154
 
155 155
 
156
-	/**
157
-	 * Returns the sub-client given by its name.
158
-	 *
159
-	 * @param string $type Name of the client type
160
-	 * @param string|null $name Name of the sub-client (Default if null)
161
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
162
-	 */
163
-	public function getSubClient( $type, $name = null )
164
-	{
165
-		/** client/html/checkout/standard/summary/coupon/decorators/excludes
166
-		 * Excludes decorators added by the "common" option from the checkout standard summary coupon html client
167
-		 *
168
-		 * Decorators extend the functionality of a class by adding new aspects
169
-		 * (e.g. log what is currently done), executing the methods of the underlying
170
-		 * class only in certain conditions (e.g. only for logged in users) or
171
-		 * modify what is returned to the caller.
172
-		 *
173
-		 * This option allows you to remove a decorator added via
174
-		 * "client/html/common/decorators/default" before they are wrapped
175
-		 * around the html client.
176
-		 *
177
-		 *  client/html/checkout/standard/summary/coupon/decorators/excludes = array( 'decorator1' )
178
-		 *
179
-		 * This would remove the decorator named "decorator1" from the list of
180
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
181
-		 * "client/html/common/decorators/default" to the html client.
182
-		 *
183
-		 * @param array List of decorator names
184
-		 * @since 2015.08
185
-		 * @category Developer
186
-		 * @see client/html/common/decorators/default
187
-		 * @see client/html/checkout/standard/summary/coupon/decorators/global
188
-		 * @see client/html/checkout/standard/summary/coupon/decorators/local
189
-		 */
156
+    /**
157
+     * Returns the sub-client given by its name.
158
+     *
159
+     * @param string $type Name of the client type
160
+     * @param string|null $name Name of the sub-client (Default if null)
161
+     * @return \Aimeos\Client\Html\Iface Sub-client object
162
+     */
163
+    public function getSubClient( $type, $name = null )
164
+    {
165
+        /** client/html/checkout/standard/summary/coupon/decorators/excludes
166
+         * Excludes decorators added by the "common" option from the checkout standard summary coupon html client
167
+         *
168
+         * Decorators extend the functionality of a class by adding new aspects
169
+         * (e.g. log what is currently done), executing the methods of the underlying
170
+         * class only in certain conditions (e.g. only for logged in users) or
171
+         * modify what is returned to the caller.
172
+         *
173
+         * This option allows you to remove a decorator added via
174
+         * "client/html/common/decorators/default" before they are wrapped
175
+         * around the html client.
176
+         *
177
+         *  client/html/checkout/standard/summary/coupon/decorators/excludes = array( 'decorator1' )
178
+         *
179
+         * This would remove the decorator named "decorator1" from the list of
180
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
181
+         * "client/html/common/decorators/default" to the html client.
182
+         *
183
+         * @param array List of decorator names
184
+         * @since 2015.08
185
+         * @category Developer
186
+         * @see client/html/common/decorators/default
187
+         * @see client/html/checkout/standard/summary/coupon/decorators/global
188
+         * @see client/html/checkout/standard/summary/coupon/decorators/local
189
+         */
190 190
 
191
-		/** client/html/checkout/standard/summary/coupon/decorators/global
192
-		 * Adds a list of globally available decorators only to the checkout standard summary coupon html client
193
-		 *
194
-		 * Decorators extend the functionality of a class by adding new aspects
195
-		 * (e.g. log what is currently done), executing the methods of the underlying
196
-		 * class only in certain conditions (e.g. only for logged in users) or
197
-		 * modify what is returned to the caller.
198
-		 *
199
-		 * This option allows you to wrap global decorators
200
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
201
-		 *
202
-		 *  client/html/checkout/standard/summary/coupon/decorators/global = array( 'decorator1' )
203
-		 *
204
-		 * This would add the decorator named "decorator1" defined by
205
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
206
-		 *
207
-		 * @param array List of decorator names
208
-		 * @since 2015.08
209
-		 * @category Developer
210
-		 * @see client/html/common/decorators/default
211
-		 * @see client/html/checkout/standard/summary/coupon/decorators/excludes
212
-		 * @see client/html/checkout/standard/summary/coupon/decorators/local
213
-		 */
191
+        /** client/html/checkout/standard/summary/coupon/decorators/global
192
+         * Adds a list of globally available decorators only to the checkout standard summary coupon html client
193
+         *
194
+         * Decorators extend the functionality of a class by adding new aspects
195
+         * (e.g. log what is currently done), executing the methods of the underlying
196
+         * class only in certain conditions (e.g. only for logged in users) or
197
+         * modify what is returned to the caller.
198
+         *
199
+         * This option allows you to wrap global decorators
200
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
201
+         *
202
+         *  client/html/checkout/standard/summary/coupon/decorators/global = array( 'decorator1' )
203
+         *
204
+         * This would add the decorator named "decorator1" defined by
205
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
206
+         *
207
+         * @param array List of decorator names
208
+         * @since 2015.08
209
+         * @category Developer
210
+         * @see client/html/common/decorators/default
211
+         * @see client/html/checkout/standard/summary/coupon/decorators/excludes
212
+         * @see client/html/checkout/standard/summary/coupon/decorators/local
213
+         */
214 214
 
215
-		/** client/html/checkout/standard/summary/coupon/decorators/local
216
-		 * Adds a list of local decorators only to the checkout standard summary coupon html client
217
-		 *
218
-		 * Decorators extend the functionality of a class by adding new aspects
219
-		 * (e.g. log what is currently done), executing the methods of the underlying
220
-		 * class only in certain conditions (e.g. only for logged in users) or
221
-		 * modify what is returned to the caller.
222
-		 *
223
-		 * This option allows you to wrap local decorators
224
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
225
-		 *
226
-		 *  client/html/checkout/standard/summary/coupon/decorators/local = array( 'decorator2' )
227
-		 *
228
-		 * This would add the decorator named "decorator2" defined by
229
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
230
-		 *
231
-		 * @param array List of decorator names
232
-		 * @since 2015.08
233
-		 * @category Developer
234
-		 * @see client/html/common/decorators/default
235
-		 * @see client/html/checkout/standard/summary/coupon/decorators/excludes
236
-		 * @see client/html/checkout/standard/summary/coupon/decorators/global
237
-		 */
215
+        /** client/html/checkout/standard/summary/coupon/decorators/local
216
+         * Adds a list of local decorators only to the checkout standard summary coupon html client
217
+         *
218
+         * Decorators extend the functionality of a class by adding new aspects
219
+         * (e.g. log what is currently done), executing the methods of the underlying
220
+         * class only in certain conditions (e.g. only for logged in users) or
221
+         * modify what is returned to the caller.
222
+         *
223
+         * This option allows you to wrap local decorators
224
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
225
+         *
226
+         *  client/html/checkout/standard/summary/coupon/decorators/local = array( 'decorator2' )
227
+         *
228
+         * This would add the decorator named "decorator2" defined by
229
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
230
+         *
231
+         * @param array List of decorator names
232
+         * @since 2015.08
233
+         * @category Developer
234
+         * @see client/html/common/decorators/default
235
+         * @see client/html/checkout/standard/summary/coupon/decorators/excludes
236
+         * @see client/html/checkout/standard/summary/coupon/decorators/global
237
+         */
238 238
 
239
-		return $this->createSubClient( 'checkout/standard/summary/coupon/' . $type, $name );
240
-	}
239
+        return $this->createSubClient( 'checkout/standard/summary/coupon/' . $type, $name );
240
+    }
241 241
 
242 242
 
243
-	/**
244
-	 * Returns the list of sub-client names configured for the client.
245
-	 *
246
-	 * @return array List of HTML client names
247
-	 */
248
-	protected function getSubClientNames()
249
-	{
250
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
251
-	}
243
+    /**
244
+     * Returns the list of sub-client names configured for the client.
245
+     *
246
+     * @return array List of HTML client names
247
+     */
248
+    protected function getSubClientNames()
249
+    {
250
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
251
+    }
252 252
 
253 253
 
254
-	/**
255
-	 * Sets the necessary parameter values in the view.
256
-	 *
257
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
258
-	 * @param array &$tags Result array for the list of tags that are associated to the output
259
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
260
-	 * @return \Aimeos\MW\View\Iface Modified view object
261
-	 */
262
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
263
-	{
264
-		$view = parent::setViewParams( $view, $tags, $expire );
254
+    /**
255
+     * Sets the necessary parameter values in the view.
256
+     *
257
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
258
+     * @param array &$tags Result array for the list of tags that are associated to the output
259
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
260
+     * @return \Aimeos\MW\View\Iface Modified view object
261
+     */
262
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
263
+    {
264
+        $view = parent::setViewParams( $view, $tags, $expire );
265 265
 
266
-		if( !isset( $this->cache ) )
267
-		{
268
-			$target = $view->config( 'client/html/basket/standard/url/target' );
269
-			$cntl = $view->config( 'client/html/basket/standard/url/controller', 'basket' );
270
-			$action = $view->config( 'client/html/basket/standard/url/action', 'index' );
271
-			$config = $view->config( 'client/html/basket/standard/url/config', array() );
266
+        if( !isset( $this->cache ) )
267
+        {
268
+            $target = $view->config( 'client/html/basket/standard/url/target' );
269
+            $cntl = $view->config( 'client/html/basket/standard/url/controller', 'basket' );
270
+            $action = $view->config( 'client/html/basket/standard/url/action', 'index' );
271
+            $config = $view->config( 'client/html/basket/standard/url/config', array() );
272 272
 
273
-			$view->summaryUrlCoupon = $view->url( $target, $cntl, $action, array(), array(), $config );
274
-			$view->summaryBasket = $view->standardBasket;
273
+            $view->summaryUrlCoupon = $view->url( $target, $cntl, $action, array(), array(), $config );
274
+            $view->summaryBasket = $view->standardBasket;
275 275
 
276
-			$this->cache = $view;
277
-		}
276
+            $this->cache = $view;
277
+        }
278 278
 
279
-		return $this->cache;
280
-	}
279
+        return $this->cache;
280
+    }
281 281
 }
282 282
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/Summary/Detail/Standard.php 1 patch
Indentation   +243 added lines, -243 removed lines patch added patch discarded remove patch
@@ -19,273 +19,273 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Summary\Detail\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Summary\Detail\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	/** client/html/checkout/standard/summary/detail/standard/subparts
26
-	 * List of HTML sub-clients rendered within the checkout standard summary detail 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 2015.11
56
-	 * @category Developer
57
-	 */
58
-	private $subPartPath = 'client/html/checkout/standard/summary/detail/standard/subparts';
59
-	private $subPartNames = array();
60
-	private $cache;
25
+    /** client/html/checkout/standard/summary/detail/standard/subparts
26
+     * List of HTML sub-clients rendered within the checkout standard summary detail 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 2015.11
56
+     * @category Developer
57
+     */
58
+    private $subPartPath = 'client/html/checkout/standard/summary/detail/standard/subparts';
59
+    private $subPartNames = array();
60
+    private $cache;
61 61
 
62 62
 
63
-	/**
64
-	 * Returns the HTML code for insertion into the body.
65
-	 *
66
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
67
-	 * @param array &$tags Result array for the list of tags that are associated to the output
68
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
69
-	 * @return string HTML code
70
-	*/
71
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
72
-	{
73
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
63
+    /**
64
+     * Returns the HTML code for insertion into the body.
65
+     *
66
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
67
+     * @param array &$tags Result array for the list of tags that are associated to the output
68
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
69
+     * @return string HTML code
70
+     */
71
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
72
+    {
73
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
74 74
 
75
-		$html = '';
76
-		foreach( $this->getSubClients() as $subclient ) {
77
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
78
-		}
79
-		$view->detailBody = $html;
75
+        $html = '';
76
+        foreach( $this->getSubClients() as $subclient ) {
77
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
78
+        }
79
+        $view->detailBody = $html;
80 80
 
81
-		/** client/html/checkout/standard/summary/detail/standard/template-body
82
-		 * Relative path to the HTML body template of the checkout standard summary detail client.
83
-		 *
84
-		 * The template file contains the HTML code and processing instructions
85
-		 * to generate the result shown in the body of the frontend. The
86
-		 * configuration string is the path to the template file relative
87
-		 * to the templates directory (usually in client/html/templates).
88
-		 *
89
-		 * You can overwrite the template file configuration in extensions and
90
-		 * provide alternative templates. These alternative templates should be
91
-		 * named like the default one but with the string "standard" replaced by
92
-		 * an unique name. You may use the name of your project for this. If
93
-		 * you've implemented an alternative client class as well, "standard"
94
-		 * (second one) should be replaced by the name of the new class in lower
95
-		 * case.
96
-		 *
97
-		 * @param string Relative path to the template creating code for the HTML page body
98
-		 * @since 2015.11
99
-		 * @category Developer
100
-		 * @see client/html/checkout/standard/summary/detail/standard/template-header
101
-		 */
102
-		$tplconf = 'client/html/checkout/standard/summary/detail/standard/template-body';
103
-		$default = 'common/summary/detail-body-default.php';
81
+        /** client/html/checkout/standard/summary/detail/standard/template-body
82
+         * Relative path to the HTML body template of the checkout standard summary detail client.
83
+         *
84
+         * The template file contains the HTML code and processing instructions
85
+         * to generate the result shown in the body of the frontend. The
86
+         * configuration string is the path to the template file relative
87
+         * to the templates directory (usually in client/html/templates).
88
+         *
89
+         * You can overwrite the template file configuration in extensions and
90
+         * provide alternative templates. These alternative templates should be
91
+         * named like the default one but with the string "standard" replaced by
92
+         * an unique name. You may use the name of your project for this. If
93
+         * you've implemented an alternative client class as well, "standard"
94
+         * (second one) should be replaced by the name of the new class in lower
95
+         * case.
96
+         *
97
+         * @param string Relative path to the template creating code for the HTML page body
98
+         * @since 2015.11
99
+         * @category Developer
100
+         * @see client/html/checkout/standard/summary/detail/standard/template-header
101
+         */
102
+        $tplconf = 'client/html/checkout/standard/summary/detail/standard/template-body';
103
+        $default = 'common/summary/detail-body-default.php';
104 104
 
105
-		return $view->render( $view->config( $tplconf, $default ) );
106
-	}
105
+        return $view->render( $view->config( $tplconf, $default ) );
106
+    }
107 107
 
108 108
 
109
-	/**
110
-	 * Returns the HTML string for insertion into the header.
111
-	 *
112
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
113
-	 * @param array &$tags Result array for the list of tags that are associated to the output
114
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
115
-	 * @return string|null String including HTML tags for the header on error
116
-	 */
117
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
118
-	{
119
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
109
+    /**
110
+     * Returns the HTML string for insertion into the header.
111
+     *
112
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
113
+     * @param array &$tags Result array for the list of tags that are associated to the output
114
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
115
+     * @return string|null String including HTML tags for the header on error
116
+     */
117
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
118
+    {
119
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
120 120
 
121
-		$html = '';
122
-		foreach( $this->getSubClients() as $subclient ) {
123
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
124
-		}
125
-		$view->detailHeader = $html;
121
+        $html = '';
122
+        foreach( $this->getSubClients() as $subclient ) {
123
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
124
+        }
125
+        $view->detailHeader = $html;
126 126
 
127
-		/** client/html/checkout/standard/summary/detail/standard/template-header
128
-		 * Relative path to the HTML header template of the checkout standard summary detail client.
129
-		 *
130
-		 * The template file contains the HTML code and processing instructions
131
-		 * to generate the HTML code that is inserted into the HTML page header
132
-		 * of the rendered page in the frontend. The configuration string is the
133
-		 * path to the template file relative to the templates directory (usually
134
-		 * in client/html/templates).
135
-		 *
136
-		 * You can overwrite the template file configuration in extensions and
137
-		 * provide alternative templates. These alternative templates should be
138
-		 * named like the default one but with the string "standard" replaced by
139
-		 * an unique name. You may use the name of your project for this. If
140
-		 * you've implemented an alternative client class as well, "standard"
141
-		 * (second one) should be replaced by the name of the new class in lower
142
-		 * case.
143
-		 *
144
-		 * @param string Relative path to the template creating code for the HTML page head
145
-		 * @since 2015.11
146
-		 * @category Developer
147
-		 * @see client/html/checkout/standard/summary/detail/standard/template-body
148
-		 */
149
-		$tplconf = 'client/html/checkout/standard/summary/detail/standard/template-header';
150
-		$default = 'common/summary/detail-header-default.php';
127
+        /** client/html/checkout/standard/summary/detail/standard/template-header
128
+         * Relative path to the HTML header template of the checkout standard summary detail client.
129
+         *
130
+         * The template file contains the HTML code and processing instructions
131
+         * to generate the HTML code that is inserted into the HTML page header
132
+         * of the rendered page in the frontend. The configuration string is the
133
+         * path to the template file relative to the templates directory (usually
134
+         * in client/html/templates).
135
+         *
136
+         * You can overwrite the template file configuration in extensions and
137
+         * provide alternative templates. These alternative templates should be
138
+         * named like the default one but with the string "standard" replaced by
139
+         * an unique name. You may use the name of your project for this. If
140
+         * you've implemented an alternative client class as well, "standard"
141
+         * (second one) should be replaced by the name of the new class in lower
142
+         * case.
143
+         *
144
+         * @param string Relative path to the template creating code for the HTML page head
145
+         * @since 2015.11
146
+         * @category Developer
147
+         * @see client/html/checkout/standard/summary/detail/standard/template-body
148
+         */
149
+        $tplconf = 'client/html/checkout/standard/summary/detail/standard/template-header';
150
+        $default = 'common/summary/detail-header-default.php';
151 151
 
152
-		return $view->render( $view->config( $tplconf, $default ) );
153
-	}
152
+        return $view->render( $view->config( $tplconf, $default ) );
153
+    }
154 154
 
155 155
 
156
-	/**
157
-	 * Returns the sub-client given by its name.
158
-	 *
159
-	 * @param string $type Name of the client type
160
-	 * @param string|null $name Name of the sub-client (Default if null)
161
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
162
-	 */
163
-	public function getSubClient( $type, $name = null )
164
-	{
165
-		/** client/html/checkout/standard/summary/detail/decorators/excludes
166
-		 * Excludes decorators added by the "common" option from the checkout standard summary detail html client
167
-		 *
168
-		 * Decorators extend the functionality of a class by adding new aspects
169
-		 * (e.g. log what is currently done), executing the methods of the underlying
170
-		 * class only in certain conditions (e.g. only for logged in users) or
171
-		 * modify what is returned to the caller.
172
-		 *
173
-		 * This option allows you to remove a decorator added via
174
-		 * "client/html/common/decorators/default" before they are wrapped
175
-		 * around the html client.
176
-		 *
177
-		 *  client/html/checkout/standard/summary/detail/decorators/excludes = array( 'decorator1' )
178
-		 *
179
-		 * This would remove the decorator named "decorator1" from the list of
180
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
181
-		 * "client/html/common/decorators/default" to the html client.
182
-		 *
183
-		 * @param array List of decorator names
184
-		 * @since 2015.08
185
-		 * @category Developer
186
-		 * @see client/html/common/decorators/default
187
-		 * @see client/html/checkout/standard/summary/detail/decorators/global
188
-		 * @see client/html/checkout/standard/summary/detail/decorators/local
189
-		 */
156
+    /**
157
+     * Returns the sub-client given by its name.
158
+     *
159
+     * @param string $type Name of the client type
160
+     * @param string|null $name Name of the sub-client (Default if null)
161
+     * @return \Aimeos\Client\Html\Iface Sub-client object
162
+     */
163
+    public function getSubClient( $type, $name = null )
164
+    {
165
+        /** client/html/checkout/standard/summary/detail/decorators/excludes
166
+         * Excludes decorators added by the "common" option from the checkout standard summary detail html client
167
+         *
168
+         * Decorators extend the functionality of a class by adding new aspects
169
+         * (e.g. log what is currently done), executing the methods of the underlying
170
+         * class only in certain conditions (e.g. only for logged in users) or
171
+         * modify what is returned to the caller.
172
+         *
173
+         * This option allows you to remove a decorator added via
174
+         * "client/html/common/decorators/default" before they are wrapped
175
+         * around the html client.
176
+         *
177
+         *  client/html/checkout/standard/summary/detail/decorators/excludes = array( 'decorator1' )
178
+         *
179
+         * This would remove the decorator named "decorator1" from the list of
180
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
181
+         * "client/html/common/decorators/default" to the html client.
182
+         *
183
+         * @param array List of decorator names
184
+         * @since 2015.08
185
+         * @category Developer
186
+         * @see client/html/common/decorators/default
187
+         * @see client/html/checkout/standard/summary/detail/decorators/global
188
+         * @see client/html/checkout/standard/summary/detail/decorators/local
189
+         */
190 190
 
191
-		/** client/html/checkout/standard/summary/detail/decorators/global
192
-		 * Adds a list of globally available decorators only to the checkout standard summary detail html client
193
-		 *
194
-		 * Decorators extend the functionality of a class by adding new aspects
195
-		 * (e.g. log what is currently done), executing the methods of the underlying
196
-		 * class only in certain conditions (e.g. only for logged in users) or
197
-		 * modify what is returned to the caller.
198
-		 *
199
-		 * This option allows you to wrap global decorators
200
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
201
-		 *
202
-		 *  client/html/checkout/standard/summary/detail/decorators/global = array( 'decorator1' )
203
-		 *
204
-		 * This would add the decorator named "decorator1" defined by
205
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
206
-		 *
207
-		 * @param array List of decorator names
208
-		 * @since 2015.08
209
-		 * @category Developer
210
-		 * @see client/html/common/decorators/default
211
-		 * @see client/html/checkout/standard/summary/detail/decorators/excludes
212
-		 * @see client/html/checkout/standard/summary/detail/decorators/local
213
-		 */
191
+        /** client/html/checkout/standard/summary/detail/decorators/global
192
+         * Adds a list of globally available decorators only to the checkout standard summary detail html client
193
+         *
194
+         * Decorators extend the functionality of a class by adding new aspects
195
+         * (e.g. log what is currently done), executing the methods of the underlying
196
+         * class only in certain conditions (e.g. only for logged in users) or
197
+         * modify what is returned to the caller.
198
+         *
199
+         * This option allows you to wrap global decorators
200
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
201
+         *
202
+         *  client/html/checkout/standard/summary/detail/decorators/global = array( 'decorator1' )
203
+         *
204
+         * This would add the decorator named "decorator1" defined by
205
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
206
+         *
207
+         * @param array List of decorator names
208
+         * @since 2015.08
209
+         * @category Developer
210
+         * @see client/html/common/decorators/default
211
+         * @see client/html/checkout/standard/summary/detail/decorators/excludes
212
+         * @see client/html/checkout/standard/summary/detail/decorators/local
213
+         */
214 214
 
215
-		/** client/html/checkout/standard/summary/detail/decorators/local
216
-		 * Adds a list of local decorators only to the checkout standard summary detail html client
217
-		 *
218
-		 * Decorators extend the functionality of a class by adding new aspects
219
-		 * (e.g. log what is currently done), executing the methods of the underlying
220
-		 * class only in certain conditions (e.g. only for logged in users) or
221
-		 * modify what is returned to the caller.
222
-		 *
223
-		 * This option allows you to wrap local decorators
224
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
225
-		 *
226
-		 *  client/html/checkout/standard/summary/detail/decorators/local = array( 'decorator2' )
227
-		 *
228
-		 * This would add the decorator named "decorator2" defined by
229
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
230
-		 *
231
-		 * @param array List of decorator names
232
-		 * @since 2015.08
233
-		 * @category Developer
234
-		 * @see client/html/common/decorators/default
235
-		 * @see client/html/checkout/standard/summary/detail/decorators/excludes
236
-		 * @see client/html/checkout/standard/summary/detail/decorators/global
237
-		 */
215
+        /** client/html/checkout/standard/summary/detail/decorators/local
216
+         * Adds a list of local decorators only to the checkout standard summary detail html client
217
+         *
218
+         * Decorators extend the functionality of a class by adding new aspects
219
+         * (e.g. log what is currently done), executing the methods of the underlying
220
+         * class only in certain conditions (e.g. only for logged in users) or
221
+         * modify what is returned to the caller.
222
+         *
223
+         * This option allows you to wrap local decorators
224
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
225
+         *
226
+         *  client/html/checkout/standard/summary/detail/decorators/local = array( 'decorator2' )
227
+         *
228
+         * This would add the decorator named "decorator2" defined by
229
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
230
+         *
231
+         * @param array List of decorator names
232
+         * @since 2015.08
233
+         * @category Developer
234
+         * @see client/html/common/decorators/default
235
+         * @see client/html/checkout/standard/summary/detail/decorators/excludes
236
+         * @see client/html/checkout/standard/summary/detail/decorators/global
237
+         */
238 238
 
239
-		return $this->createSubClient( 'checkout/standard/summary/detail/' . $type, $name );
240
-	}
239
+        return $this->createSubClient( 'checkout/standard/summary/detail/' . $type, $name );
240
+    }
241 241
 
242 242
 
243
-	/**
244
-	 * Returns the list of sub-client names configured for the client.
245
-	 *
246
-	 * @return array List of HTML client names
247
-	 */
248
-	protected function getSubClientNames()
249
-	{
250
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
251
-	}
243
+    /**
244
+     * Returns the list of sub-client names configured for the client.
245
+     *
246
+     * @return array List of HTML client names
247
+     */
248
+    protected function getSubClientNames()
249
+    {
250
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
251
+    }
252 252
 
253 253
 
254
-	/**
255
-	 * Sets the necessary parameter values in the view.
256
-	 *
257
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
258
-	 * @param array &$tags Result array for the list of tags that are associated to the output
259
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
260
-	 * @return \Aimeos\MW\View\Iface Modified view object
261
-	 */
262
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
263
-	{
264
-		$view = parent::setViewParams( $view, $tags, $expire );
254
+    /**
255
+     * Sets the necessary parameter values in the view.
256
+     *
257
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
258
+     * @param array &$tags Result array for the list of tags that are associated to the output
259
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
260
+     * @return \Aimeos\MW\View\Iface Modified view object
261
+     */
262
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
263
+    {
264
+        $view = parent::setViewParams( $view, $tags, $expire );
265 265
 
266
-		if( !isset( $this->cache ) )
267
-		{
268
-			$basket = $view->standardBasket;
266
+        if( !isset( $this->cache ) )
267
+        {
268
+            $basket = $view->standardBasket;
269 269
 
270
-			$bTarget = $view->config( 'client/html/basket/standard/url/target' );
271
-			$bCntl = $view->config( 'client/html/basket/standard/url/controller', 'basket' );
272
-			$bAction = $view->config( 'client/html/basket/standard/url/action', 'index' );
273
-			$bConfig = $view->config( 'client/html/basket/standard/url/config', array() );
270
+            $bTarget = $view->config( 'client/html/basket/standard/url/target' );
271
+            $bCntl = $view->config( 'client/html/basket/standard/url/controller', 'basket' );
272
+            $bAction = $view->config( 'client/html/basket/standard/url/action', 'index' );
273
+            $bConfig = $view->config( 'client/html/basket/standard/url/config', array() );
274 274
 
275
-			$target = $view->config( 'client/html/checkout/standard/url/target' );
276
-			$cntl = $view->config( 'client/html/checkout/standard/url/controller', 'checkout' );
277
-			$action = $view->config( 'client/html/checkout/standard/url/action', 'index' );
278
-			$config = $view->config( 'client/html/checkout/standard/url/config', array() );
275
+            $target = $view->config( 'client/html/checkout/standard/url/target' );
276
+            $cntl = $view->config( 'client/html/checkout/standard/url/controller', 'checkout' );
277
+            $action = $view->config( 'client/html/checkout/standard/url/action', 'index' );
278
+            $config = $view->config( 'client/html/checkout/standard/url/config', array() );
279 279
 
280
-			$view->summaryUrlServicePayment = $view->url( $target, $cntl, $action, array( 'c_step' => 'payment' ), array(), $config );
281
-			$view->summaryUrlServiceDelivery = $view->url( $target, $cntl, $action, array( 'c_step' => 'delivery' ), array(), $config );
282
-			$view->summaryUrlBasket = $view->url( $bTarget, $bCntl, $bAction, array(), array(), $bConfig );
283
-			$view->summaryTaxRates = $this->getTaxRates( $basket );
284
-			$view->summaryBasket = $basket;
280
+            $view->summaryUrlServicePayment = $view->url( $target, $cntl, $action, array( 'c_step' => 'payment' ), array(), $config );
281
+            $view->summaryUrlServiceDelivery = $view->url( $target, $cntl, $action, array( 'c_step' => 'delivery' ), array(), $config );
282
+            $view->summaryUrlBasket = $view->url( $bTarget, $bCntl, $bAction, array(), array(), $bConfig );
283
+            $view->summaryTaxRates = $this->getTaxRates( $basket );
284
+            $view->summaryBasket = $basket;
285 285
 
286
-			$this->cache = $view;
287
-		}
286
+            $this->cache = $view;
287
+        }
288 288
 
289
-		return $this->cache;
290
-	}
289
+        return $this->cache;
290
+    }
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/Summary/Standard.php 1 patch
Indentation   +325 added lines, -325 removed lines patch added patch discarded remove patch
@@ -23,330 +23,330 @@
 block discarded – undo
23 23
  * @subpackage Html
24 24
  */
25 25
 class Standard
26
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
27
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
26
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
27
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
28 28
 {
29
-	/** client/html/checkout/standard/summary/standard/subparts
30
-	 * List of HTML sub-clients rendered within the checkout standard summary section
31
-	 *
32
-	 * The output of the frontend is composed of the code generated by the HTML
33
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
34
-	 * that are responsible for rendering certain sub-parts of the output. The
35
-	 * sub-clients can contain HTML clients themselves and therefore a
36
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
37
-	 * the output that is placed inside the container of its parent.
38
-	 *
39
-	 * At first, always the HTML code generated by the parent is printed, then
40
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
41
-	 * determines the order of the output of these sub-clients inside the parent
42
-	 * container. If the configured list of clients is
43
-	 *
44
-	 *  array( "subclient1", "subclient2" )
45
-	 *
46
-	 * you can easily change the order of the output by reordering the subparts:
47
-	 *
48
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
49
-	 *
50
-	 * You can also remove one or more parts if they shouldn't be rendered:
51
-	 *
52
-	 *  client/html/<clients>/subparts = array( "subclient1" )
53
-	 *
54
-	 * As the clients only generates structural HTML, the layout defined via CSS
55
-	 * should support adding, removing or reordering content by a fluid like
56
-	 * design.
57
-	 *
58
-	 * @param array List of sub-client names
59
-	 * @since 2014.03
60
-	 * @category Developer
61
-	 */
62
-	private $subPartPath = 'client/html/checkout/standard/summary/standard/subparts';
63
-
64
-	/** client/html/checkout/standard/summary/address/name
65
-	 * Name of the address part used by the checkout standard summary client implementation
66
-	 *
67
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Address\Myname".
68
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
69
-	 *
70
-	 * @param string Last part of the client class name
71
-	 * @since 2014.03
72
-	 * @category Developer
73
-	 */
74
-
75
-	/** client/html/checkout/standard/summary/service/name
76
-	 * Name of the service part used by the checkout standard summary client implementation
77
-	 *
78
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Service\Myname".
79
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
80
-	 *
81
-	 * @param string Last part of the client class name
82
-	 * @since 2014.03
83
-	 * @category Developer
84
-	 */
85
-
86
-	/** client/html/checkout/standard/summary/coupon/name
87
-	 * Name of the coupon part used by the checkout standard summary client implementation
88
-	 *
89
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Coupon\Myname".
90
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
91
-	 *
92
-	 * @param string Last part of the client class name
93
-	 * @since 2014.03
94
-	 * @category Developer
95
-	 */
96
-
97
-	/** client/html/checkout/standard/summary/option/name
98
-	 * Name of the option part used by the checkout standard summary client implementation
99
-	 *
100
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Option\Myname".
101
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
102
-	 *
103
-	 * @param string Last part of the client class name
104
-	 * @since 2014.03
105
-	 * @category Developer
106
-	 */
107
-
108
-	/** client/html/checkout/standard/summary/detail/name
109
-	 * Name of the detail part used by the checkout standard summary client implementation
110
-	 *
111
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Detail\Myname".
112
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
113
-	 *
114
-	 * @param string Last part of the client class name
115
-	 * @since 2014.03
116
-	 * @category Developer
117
-	 */
118
-	private $subPartNames = array( 'address', 'service', 'coupon', 'option', 'detail' );
119
-
120
-
121
-	/**
122
-	 * Returns the HTML code for insertion into the body.
123
-	 *
124
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
125
-	 * @param array &$tags Result array for the list of tags that are associated to the output
126
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
127
-	 * @return string HTML code
128
-	 */
129
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
130
-	{
131
-		$view = $this->getView();
132
-		$step = $view->get( 'standardStepActive' );
133
-		$onepage = $view->config( 'client/html/checkout/standard/onepage', array() );
134
-
135
-		if( $step != 'summary' && !( in_array( 'summary', $onepage ) && in_array( $step, $onepage ) ) ) {
136
-			return '';
137
-		}
138
-
139
-		$view = $this->setViewParams( $view, $tags, $expire );
140
-
141
-		$html = '';
142
-		foreach( $this->getSubClients() as $subclient ) {
143
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
144
-		}
145
-		$view->summaryBody = $html;
146
-
147
-		/** client/html/checkout/standard/summary/standard/template-body
148
-		 * Relative path to the HTML body template of the checkout standard summary client.
149
-		 *
150
-		 * The template file contains the HTML code and processing instructions
151
-		 * to generate the result shown in the body of the frontend. The
152
-		 * configuration string is the path to the template file relative
153
-		 * to the templates directory (usually in client/html/templates).
154
-		 *
155
-		 * You can overwrite the template file configuration in extensions and
156
-		 * provide alternative templates. These alternative templates should be
157
-		 * named like the default one but with the string "standard" replaced by
158
-		 * an unique name. You may use the name of your project for this. If
159
-		 * you've implemented an alternative client class as well, "standard"
160
-		 * should be replaced by the name of the new class.
161
-		 *
162
-		 * @param string Relative path to the template creating code for the HTML page body
163
-		 * @since 2014.03
164
-		 * @category Developer
165
-		 * @see client/html/checkout/standard/summary/standard/template-header
166
-		 */
167
-		$tplconf = 'client/html/checkout/standard/summary/standard/template-body';
168
-		$default = 'checkout/standard/summary-body-default.php';
169
-
170
-		return $view->render( $view->config( $tplconf, $default ) );
171
-	}
172
-
173
-
174
-	/**
175
-	 * Returns the HTML string for insertion into the header.
176
-	 *
177
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
178
-	 * @param array &$tags Result array for the list of tags that are associated to the output
179
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
180
-	 * @return string|null String including HTML tags for the header on error
181
-	 */
182
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
183
-	{
184
-		$view = $this->getView();
185
-		$step = $view->get( 'standardStepActive' );
186
-		$onepage = $view->config( 'client/html/checkout/standard/onepage', array() );
187
-
188
-		if( $step != 'summary' && !( in_array( 'summary', $onepage ) && in_array( $step, $onepage ) ) ) {
189
-			return '';
190
-		}
191
-
192
-		$view = $this->setViewParams( $view, $tags, $expire );
193
-
194
-		$html = '';
195
-		foreach( $this->getSubClients() as $subclient ) {
196
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
197
-		}
198
-		$view->summaryHeader = $html;
199
-
200
-		/** client/html/checkout/standard/summary/standard/template-header
201
-		 * Relative path to the HTML header template of the checkout standard summary client.
202
-		 *
203
-		 * The template file contains the HTML code and processing instructions
204
-		 * to generate the HTML code that is inserted into the HTML page header
205
-		 * of the rendered page in the frontend. The configuration string is the
206
-		 * path to the template file relative to the templates directory (usually
207
-		 * in client/html/templates).
208
-		 *
209
-		 * You can overwrite the template file configuration in extensions and
210
-		 * provide alternative templates. These alternative templates should be
211
-		 * named like the default one but with the string "standard" replaced by
212
-		 * an unique name. You may use the name of your project for this. If
213
-		 * you've implemented an alternative client class as well, "standard"
214
-		 * should be replaced by the name of the new class.
215
-		 *
216
-		 * @param string Relative path to the template creating code for the HTML page head
217
-		 * @since 2014.03
218
-		 * @category Developer
219
-		 * @see client/html/checkout/standard/summary/standard/template-body
220
-		 */
221
-		$tplconf = 'client/html/checkout/standard/summary/standard/template-header';
222
-		$default = 'checkout/standard/summary-header-default.php';
223
-
224
-		return $view->render( $view->config( $tplconf, $default ) );
225
-	}
226
-
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/checkout/standard/summary/decorators/excludes
238
-		 * Excludes decorators added by the "common" option from the checkout standard summary 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/checkout/standard/summary/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/checkout/standard/summary/decorators/global
260
-		 * @see client/html/checkout/standard/summary/decorators/local
261
-		 */
262
-
263
-		/** client/html/checkout/standard/summary/decorators/global
264
-		 * Adds a list of globally available decorators only to the checkout standard summary 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/checkout/standard/summary/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/checkout/standard/summary/decorators/excludes
284
-		 * @see client/html/checkout/standard/summary/decorators/local
285
-		 */
286
-
287
-		/** client/html/checkout/standard/summary/decorators/local
288
-		 * Adds a list of local decorators only to the checkout standard summary 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/checkout/standard/summary/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/checkout/standard/summary/decorators/excludes
308
-		 * @see client/html/checkout/standard/summary/decorators/global
309
-		 */
310
-
311
-		return $this->createSubClient( 'checkout/standard/summary/' . $type, $name );
312
-	}
313
-
314
-
315
-	/**
316
-	 * Processes the input, e.g. store given values.
317
-	 * A view must be available and this method doesn't generate any output
318
-	 * besides setting view variables.
319
-	 */
320
-	public function process()
321
-	{
322
-		$view = $this->getView();
323
-
324
-		if( $view->param( 'cs_order', null ) === null ) {
325
-			return;
326
-		}
327
-
328
-		try
329
-		{
330
-			$controller = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'basket' );
331
-			$controller->get()->check( \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL );
332
-
333
-			parent::process();
334
-		}
335
-		catch( \Exception $e )
336
-		{
337
-			$view->standardStepActive = 'summary';
338
-			throw $e;
339
-		}
340
-	}
341
-
342
-
343
-	/**
344
-	 * Returns the list of sub-client names configured for the client.
345
-	 *
346
-	 * @return array List of HTML client names
347
-	 */
348
-	protected function getSubClientNames()
349
-	{
350
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
351
-	}
29
+    /** client/html/checkout/standard/summary/standard/subparts
30
+     * List of HTML sub-clients rendered within the checkout standard summary section
31
+     *
32
+     * The output of the frontend is composed of the code generated by the HTML
33
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
34
+     * that are responsible for rendering certain sub-parts of the output. The
35
+     * sub-clients can contain HTML clients themselves and therefore a
36
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
37
+     * the output that is placed inside the container of its parent.
38
+     *
39
+     * At first, always the HTML code generated by the parent is printed, then
40
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
41
+     * determines the order of the output of these sub-clients inside the parent
42
+     * container. If the configured list of clients is
43
+     *
44
+     *  array( "subclient1", "subclient2" )
45
+     *
46
+     * you can easily change the order of the output by reordering the subparts:
47
+     *
48
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
49
+     *
50
+     * You can also remove one or more parts if they shouldn't be rendered:
51
+     *
52
+     *  client/html/<clients>/subparts = array( "subclient1" )
53
+     *
54
+     * As the clients only generates structural HTML, the layout defined via CSS
55
+     * should support adding, removing or reordering content by a fluid like
56
+     * design.
57
+     *
58
+     * @param array List of sub-client names
59
+     * @since 2014.03
60
+     * @category Developer
61
+     */
62
+    private $subPartPath = 'client/html/checkout/standard/summary/standard/subparts';
63
+
64
+    /** client/html/checkout/standard/summary/address/name
65
+     * Name of the address part used by the checkout standard summary client implementation
66
+     *
67
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Address\Myname".
68
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
69
+     *
70
+     * @param string Last part of the client class name
71
+     * @since 2014.03
72
+     * @category Developer
73
+     */
74
+
75
+    /** client/html/checkout/standard/summary/service/name
76
+     * Name of the service part used by the checkout standard summary client implementation
77
+     *
78
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Service\Myname".
79
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
80
+     *
81
+     * @param string Last part of the client class name
82
+     * @since 2014.03
83
+     * @category Developer
84
+     */
85
+
86
+    /** client/html/checkout/standard/summary/coupon/name
87
+     * Name of the coupon part used by the checkout standard summary client implementation
88
+     *
89
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Coupon\Myname".
90
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
91
+     *
92
+     * @param string Last part of the client class name
93
+     * @since 2014.03
94
+     * @category Developer
95
+     */
96
+
97
+    /** client/html/checkout/standard/summary/option/name
98
+     * Name of the option part used by the checkout standard summary client implementation
99
+     *
100
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Option\Myname".
101
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
102
+     *
103
+     * @param string Last part of the client class name
104
+     * @since 2014.03
105
+     * @category Developer
106
+     */
107
+
108
+    /** client/html/checkout/standard/summary/detail/name
109
+     * Name of the detail part used by the checkout standard summary client implementation
110
+     *
111
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Standard\Summary\Detail\Myname".
112
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
113
+     *
114
+     * @param string Last part of the client class name
115
+     * @since 2014.03
116
+     * @category Developer
117
+     */
118
+    private $subPartNames = array( 'address', 'service', 'coupon', 'option', 'detail' );
119
+
120
+
121
+    /**
122
+     * Returns the HTML code for insertion into the body.
123
+     *
124
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
125
+     * @param array &$tags Result array for the list of tags that are associated to the output
126
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
127
+     * @return string HTML code
128
+     */
129
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
130
+    {
131
+        $view = $this->getView();
132
+        $step = $view->get( 'standardStepActive' );
133
+        $onepage = $view->config( 'client/html/checkout/standard/onepage', array() );
134
+
135
+        if( $step != 'summary' && !( in_array( 'summary', $onepage ) && in_array( $step, $onepage ) ) ) {
136
+            return '';
137
+        }
138
+
139
+        $view = $this->setViewParams( $view, $tags, $expire );
140
+
141
+        $html = '';
142
+        foreach( $this->getSubClients() as $subclient ) {
143
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
144
+        }
145
+        $view->summaryBody = $html;
146
+
147
+        /** client/html/checkout/standard/summary/standard/template-body
148
+         * Relative path to the HTML body template of the checkout standard summary client.
149
+         *
150
+         * The template file contains the HTML code and processing instructions
151
+         * to generate the result shown in the body of the frontend. The
152
+         * configuration string is the path to the template file relative
153
+         * to the templates directory (usually in client/html/templates).
154
+         *
155
+         * You can overwrite the template file configuration in extensions and
156
+         * provide alternative templates. These alternative templates should be
157
+         * named like the default one but with the string "standard" replaced by
158
+         * an unique name. You may use the name of your project for this. If
159
+         * you've implemented an alternative client class as well, "standard"
160
+         * should be replaced by the name of the new class.
161
+         *
162
+         * @param string Relative path to the template creating code for the HTML page body
163
+         * @since 2014.03
164
+         * @category Developer
165
+         * @see client/html/checkout/standard/summary/standard/template-header
166
+         */
167
+        $tplconf = 'client/html/checkout/standard/summary/standard/template-body';
168
+        $default = 'checkout/standard/summary-body-default.php';
169
+
170
+        return $view->render( $view->config( $tplconf, $default ) );
171
+    }
172
+
173
+
174
+    /**
175
+     * Returns the HTML string for insertion into the header.
176
+     *
177
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
178
+     * @param array &$tags Result array for the list of tags that are associated to the output
179
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
180
+     * @return string|null String including HTML tags for the header on error
181
+     */
182
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
183
+    {
184
+        $view = $this->getView();
185
+        $step = $view->get( 'standardStepActive' );
186
+        $onepage = $view->config( 'client/html/checkout/standard/onepage', array() );
187
+
188
+        if( $step != 'summary' && !( in_array( 'summary', $onepage ) && in_array( $step, $onepage ) ) ) {
189
+            return '';
190
+        }
191
+
192
+        $view = $this->setViewParams( $view, $tags, $expire );
193
+
194
+        $html = '';
195
+        foreach( $this->getSubClients() as $subclient ) {
196
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
197
+        }
198
+        $view->summaryHeader = $html;
199
+
200
+        /** client/html/checkout/standard/summary/standard/template-header
201
+         * Relative path to the HTML header template of the checkout standard summary client.
202
+         *
203
+         * The template file contains the HTML code and processing instructions
204
+         * to generate the HTML code that is inserted into the HTML page header
205
+         * of the rendered page in the frontend. The configuration string is the
206
+         * path to the template file relative to the templates directory (usually
207
+         * in client/html/templates).
208
+         *
209
+         * You can overwrite the template file configuration in extensions and
210
+         * provide alternative templates. These alternative templates should be
211
+         * named like the default one but with the string "standard" replaced by
212
+         * an unique name. You may use the name of your project for this. If
213
+         * you've implemented an alternative client class as well, "standard"
214
+         * should be replaced by the name of the new class.
215
+         *
216
+         * @param string Relative path to the template creating code for the HTML page head
217
+         * @since 2014.03
218
+         * @category Developer
219
+         * @see client/html/checkout/standard/summary/standard/template-body
220
+         */
221
+        $tplconf = 'client/html/checkout/standard/summary/standard/template-header';
222
+        $default = 'checkout/standard/summary-header-default.php';
223
+
224
+        return $view->render( $view->config( $tplconf, $default ) );
225
+    }
226
+
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/checkout/standard/summary/decorators/excludes
238
+         * Excludes decorators added by the "common" option from the checkout standard summary 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/checkout/standard/summary/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/checkout/standard/summary/decorators/global
260
+         * @see client/html/checkout/standard/summary/decorators/local
261
+         */
262
+
263
+        /** client/html/checkout/standard/summary/decorators/global
264
+         * Adds a list of globally available decorators only to the checkout standard summary 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/checkout/standard/summary/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/checkout/standard/summary/decorators/excludes
284
+         * @see client/html/checkout/standard/summary/decorators/local
285
+         */
286
+
287
+        /** client/html/checkout/standard/summary/decorators/local
288
+         * Adds a list of local decorators only to the checkout standard summary 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/checkout/standard/summary/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/checkout/standard/summary/decorators/excludes
308
+         * @see client/html/checkout/standard/summary/decorators/global
309
+         */
310
+
311
+        return $this->createSubClient( 'checkout/standard/summary/' . $type, $name );
312
+    }
313
+
314
+
315
+    /**
316
+     * Processes the input, e.g. store given values.
317
+     * A view must be available and this method doesn't generate any output
318
+     * besides setting view variables.
319
+     */
320
+    public function process()
321
+    {
322
+        $view = $this->getView();
323
+
324
+        if( $view->param( 'cs_order', null ) === null ) {
325
+            return;
326
+        }
327
+
328
+        try
329
+        {
330
+            $controller = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'basket' );
331
+            $controller->get()->check( \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL );
332
+
333
+            parent::process();
334
+        }
335
+        catch( \Exception $e )
336
+        {
337
+            $view->standardStepActive = 'summary';
338
+            throw $e;
339
+        }
340
+    }
341
+
342
+
343
+    /**
344
+     * Returns the list of sub-client names configured for the client.
345
+     *
346
+     * @return array List of HTML client names
347
+     */
348
+    protected function getSubClientNames()
349
+    {
350
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
351
+    }
352 352
 }
353 353
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/Summary/Address/Standard.php 1 patch
Indentation   +237 added lines, -237 removed lines patch added patch discarded remove patch
@@ -19,266 +19,266 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Summary\Address\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Summary\Address\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	/** client/html/checkout/standard/summary/address/standard/subparts
26
-	 * List of HTML sub-clients rendered within the checkout standard 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 2015.11
56
-	 * @category Developer
57
-	 */
58
-	private $subPartPath = 'client/html/checkout/standard/summary/address/standard/subparts';
59
-	private $subPartNames = array();
60
-	private $cache;
25
+    /** client/html/checkout/standard/summary/address/standard/subparts
26
+     * List of HTML sub-clients rendered within the checkout standard 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 2015.11
56
+     * @category Developer
57
+     */
58
+    private $subPartPath = 'client/html/checkout/standard/summary/address/standard/subparts';
59
+    private $subPartNames = array();
60
+    private $cache;
61 61
 
62 62
 
63
-	/**
64
-	 * Returns the HTML code for insertion into the body.
65
-	 *
66
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
67
-	 * @param array &$tags Result array for the list of tags that are associated to the output
68
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
69
-	 * @return string HTML code
70
-	*/
71
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
72
-	{
73
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
63
+    /**
64
+     * Returns the HTML code for insertion into the body.
65
+     *
66
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
67
+     * @param array &$tags Result array for the list of tags that are associated to the output
68
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
69
+     * @return string HTML code
70
+     */
71
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
72
+    {
73
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
74 74
 
75
-		$html = '';
76
-		foreach( $this->getSubClients() as $subclient ) {
77
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
78
-		}
79
-		$view->addressBody = $html;
75
+        $html = '';
76
+        foreach( $this->getSubClients() as $subclient ) {
77
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
78
+        }
79
+        $view->addressBody = $html;
80 80
 
81
-		/** client/html/checkout/standard/summary/address/standard/template-body
82
-		 * Relative path to the HTML body template of the checkout standard summary address client.
83
-		 *
84
-		 * The template file contains the HTML code and processing instructions
85
-		 * to generate the result shown in the body of the frontend. The
86
-		 * configuration string is the path to the template file relative
87
-		 * to the templates directory (usually in client/html/templates).
88
-		 *
89
-		 * You can overwrite the template file configuration in extensions and
90
-		 * provide alternative templates. These alternative templates should be
91
-		 * named like the default one but with the string "standard" replaced by
92
-		 * an unique name. You may use the name of your project for this. If
93
-		 * you've implemented an alternative client class as well, "standard"
94
-		 * (second one) should be replaced by the name of the new class in lower
95
-		 * case.
96
-		 *
97
-		 * @param string Relative path to the template creating code for the HTML page body
98
-		 * @since 2015.11
99
-		 * @category Developer
100
-		 * @see client/html/checkout/standard/summary/address/standard/template-header
101
-		 */
102
-		$tplconf = 'client/html/checkout/standard/summary/address/standard/template-body';
103
-		$default = 'common/summary/address-body-default.php';
81
+        /** client/html/checkout/standard/summary/address/standard/template-body
82
+         * Relative path to the HTML body template of the checkout standard summary address client.
83
+         *
84
+         * The template file contains the HTML code and processing instructions
85
+         * to generate the result shown in the body of the frontend. The
86
+         * configuration string is the path to the template file relative
87
+         * to the templates directory (usually in client/html/templates).
88
+         *
89
+         * You can overwrite the template file configuration in extensions and
90
+         * provide alternative templates. These alternative templates should be
91
+         * named like the default one but with the string "standard" replaced by
92
+         * an unique name. You may use the name of your project for this. If
93
+         * you've implemented an alternative client class as well, "standard"
94
+         * (second one) should be replaced by the name of the new class in lower
95
+         * case.
96
+         *
97
+         * @param string Relative path to the template creating code for the HTML page body
98
+         * @since 2015.11
99
+         * @category Developer
100
+         * @see client/html/checkout/standard/summary/address/standard/template-header
101
+         */
102
+        $tplconf = 'client/html/checkout/standard/summary/address/standard/template-body';
103
+        $default = 'common/summary/address-body-default.php';
104 104
 
105
-		return $view->render( $view->config( $tplconf, $default ) );
106
-	}
105
+        return $view->render( $view->config( $tplconf, $default ) );
106
+    }
107 107
 
108 108
 
109
-	/**
110
-	 * Returns the HTML string for insertion into the header.
111
-	 *
112
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
113
-	 * @param array &$tags Result array for the list of tags that are associated to the output
114
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
115
-	 * @return string|null String including HTML tags for the header on error
116
-	 */
117
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
118
-	{
119
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
109
+    /**
110
+     * Returns the HTML string for insertion into the header.
111
+     *
112
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
113
+     * @param array &$tags Result array for the list of tags that are associated to the output
114
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
115
+     * @return string|null String including HTML tags for the header on error
116
+     */
117
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
118
+    {
119
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
120 120
 
121
-		$html = '';
122
-		foreach( $this->getSubClients() as $subclient ) {
123
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
124
-		}
125
-		$view->addressHeader = $html;
121
+        $html = '';
122
+        foreach( $this->getSubClients() as $subclient ) {
123
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
124
+        }
125
+        $view->addressHeader = $html;
126 126
 
127
-		/** client/html/checkout/standard/summary/address/standard/template-header
128
-		 * Relative path to the HTML header template of the checkout standard summary address client.
129
-		 *
130
-		 * The template file contains the HTML code and processing instructions
131
-		 * to generate the HTML code that is inserted into the HTML page header
132
-		 * of the rendered page in the frontend. The configuration string is the
133
-		 * path to the template file relative to the templates directory (usually
134
-		 * in client/html/templates).
135
-		 *
136
-		 * You can overwrite the template file configuration in extensions and
137
-		 * provide alternative templates. These alternative templates should be
138
-		 * named like the default one but with the string "standard" replaced by
139
-		 * an unique name. You may use the name of your project for this. If
140
-		 * you've implemented an alternative client class as well, "standard"
141
-		 * (second one) should be replaced by the name of the new class in lower
142
-		 * case.
143
-		 *
144
-		 * @param string Relative path to the template creating code for the HTML page head
145
-		 * @since 2015.11
146
-		 * @category Developer
147
-		 * @see client/html/checkout/standard/summary/address/standard/template-body
148
-		 */
149
-		$tplconf = 'client/html/checkout/standard/summary/address/standard/template-header';
150
-		$default = 'common/summary/address-header-default.php';
127
+        /** client/html/checkout/standard/summary/address/standard/template-header
128
+         * Relative path to the HTML header template of the checkout standard summary address client.
129
+         *
130
+         * The template file contains the HTML code and processing instructions
131
+         * to generate the HTML code that is inserted into the HTML page header
132
+         * of the rendered page in the frontend. The configuration string is the
133
+         * path to the template file relative to the templates directory (usually
134
+         * in client/html/templates).
135
+         *
136
+         * You can overwrite the template file configuration in extensions and
137
+         * provide alternative templates. These alternative templates should be
138
+         * named like the default one but with the string "standard" replaced by
139
+         * an unique name. You may use the name of your project for this. If
140
+         * you've implemented an alternative client class as well, "standard"
141
+         * (second one) should be replaced by the name of the new class in lower
142
+         * case.
143
+         *
144
+         * @param string Relative path to the template creating code for the HTML page head
145
+         * @since 2015.11
146
+         * @category Developer
147
+         * @see client/html/checkout/standard/summary/address/standard/template-body
148
+         */
149
+        $tplconf = 'client/html/checkout/standard/summary/address/standard/template-header';
150
+        $default = 'common/summary/address-header-default.php';
151 151
 
152
-		return $view->render( $view->config( $tplconf, $default ) );
153
-	}
152
+        return $view->render( $view->config( $tplconf, $default ) );
153
+    }
154 154
 
155 155
 
156
-	/**
157
-	 * Returns the sub-client given by its name.
158
-	 *
159
-	 * @param string $type Name of the client type
160
-	 * @param string|null $name Name of the sub-client (Default if null)
161
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
162
-	 */
163
-	public function getSubClient( $type, $name = null )
164
-	{
165
-		/** client/html/checkout/standard/summary/address/decorators/excludes
166
-		 * Excludes decorators added by the "common" option from the checkout standard summary address html client
167
-		 *
168
-		 * Decorators extend the functionality of a class by adding new aspects
169
-		 * (e.g. log what is currently done), executing the methods of the underlying
170
-		 * class only in certain conditions (e.g. only for logged in users) or
171
-		 * modify what is returned to the caller.
172
-		 *
173
-		 * This option allows you to remove a decorator added via
174
-		 * "client/html/common/decorators/default" before they are wrapped
175
-		 * around the html client.
176
-		 *
177
-		 *  client/html/checkout/standard/summary/address/decorators/excludes = array( 'decorator1' )
178
-		 *
179
-		 * This would remove the decorator named "decorator1" from the list of
180
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
181
-		 * "client/html/common/decorators/default" to the html client.
182
-		 *
183
-		 * @param array List of decorator names
184
-		 * @since 2015.08
185
-		 * @category Developer
186
-		 * @see client/html/common/decorators/default
187
-		 * @see client/html/checkout/standard/summary/address/decorators/global
188
-		 * @see client/html/checkout/standard/summary/address/decorators/local
189
-		 */
156
+    /**
157
+     * Returns the sub-client given by its name.
158
+     *
159
+     * @param string $type Name of the client type
160
+     * @param string|null $name Name of the sub-client (Default if null)
161
+     * @return \Aimeos\Client\Html\Iface Sub-client object
162
+     */
163
+    public function getSubClient( $type, $name = null )
164
+    {
165
+        /** client/html/checkout/standard/summary/address/decorators/excludes
166
+         * Excludes decorators added by the "common" option from the checkout standard summary address html client
167
+         *
168
+         * Decorators extend the functionality of a class by adding new aspects
169
+         * (e.g. log what is currently done), executing the methods of the underlying
170
+         * class only in certain conditions (e.g. only for logged in users) or
171
+         * modify what is returned to the caller.
172
+         *
173
+         * This option allows you to remove a decorator added via
174
+         * "client/html/common/decorators/default" before they are wrapped
175
+         * around the html client.
176
+         *
177
+         *  client/html/checkout/standard/summary/address/decorators/excludes = array( 'decorator1' )
178
+         *
179
+         * This would remove the decorator named "decorator1" from the list of
180
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
181
+         * "client/html/common/decorators/default" to the html client.
182
+         *
183
+         * @param array List of decorator names
184
+         * @since 2015.08
185
+         * @category Developer
186
+         * @see client/html/common/decorators/default
187
+         * @see client/html/checkout/standard/summary/address/decorators/global
188
+         * @see client/html/checkout/standard/summary/address/decorators/local
189
+         */
190 190
 
191
-		/** client/html/checkout/standard/summary/address/decorators/global
192
-		 * Adds a list of globally available decorators only to the checkout standard summary address html client
193
-		 *
194
-		 * Decorators extend the functionality of a class by adding new aspects
195
-		 * (e.g. log what is currently done), executing the methods of the underlying
196
-		 * class only in certain conditions (e.g. only for logged in users) or
197
-		 * modify what is returned to the caller.
198
-		 *
199
-		 * This option allows you to wrap global decorators
200
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
201
-		 *
202
-		 *  client/html/checkout/standard/summary/address/decorators/global = array( 'decorator1' )
203
-		 *
204
-		 * This would add the decorator named "decorator1" defined by
205
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
206
-		 *
207
-		 * @param array List of decorator names
208
-		 * @since 2015.08
209
-		 * @category Developer
210
-		 * @see client/html/common/decorators/default
211
-		 * @see client/html/checkout/standard/summary/address/decorators/excludes
212
-		 * @see client/html/checkout/standard/summary/address/decorators/local
213
-		 */
191
+        /** client/html/checkout/standard/summary/address/decorators/global
192
+         * Adds a list of globally available decorators only to the checkout standard summary address html client
193
+         *
194
+         * Decorators extend the functionality of a class by adding new aspects
195
+         * (e.g. log what is currently done), executing the methods of the underlying
196
+         * class only in certain conditions (e.g. only for logged in users) or
197
+         * modify what is returned to the caller.
198
+         *
199
+         * This option allows you to wrap global decorators
200
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
201
+         *
202
+         *  client/html/checkout/standard/summary/address/decorators/global = array( 'decorator1' )
203
+         *
204
+         * This would add the decorator named "decorator1" defined by
205
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
206
+         *
207
+         * @param array List of decorator names
208
+         * @since 2015.08
209
+         * @category Developer
210
+         * @see client/html/common/decorators/default
211
+         * @see client/html/checkout/standard/summary/address/decorators/excludes
212
+         * @see client/html/checkout/standard/summary/address/decorators/local
213
+         */
214 214
 
215
-		/** client/html/checkout/standard/summary/address/decorators/local
216
-		 * Adds a list of local decorators only to the checkout standard summary address html client
217
-		 *
218
-		 * Decorators extend the functionality of a class by adding new aspects
219
-		 * (e.g. log what is currently done), executing the methods of the underlying
220
-		 * class only in certain conditions (e.g. only for logged in users) or
221
-		 * modify what is returned to the caller.
222
-		 *
223
-		 * This option allows you to wrap local decorators
224
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
225
-		 *
226
-		 *  client/html/checkout/standard/summary/address/decorators/local = array( 'decorator2' )
227
-		 *
228
-		 * This would add the decorator named "decorator2" defined by
229
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
230
-		 *
231
-		 * @param array List of decorator names
232
-		 * @since 2015.08
233
-		 * @category Developer
234
-		 * @see client/html/common/decorators/default
235
-		 * @see client/html/checkout/standard/summary/address/decorators/excludes
236
-		 * @see client/html/checkout/standard/summary/address/decorators/global
237
-		 */
215
+        /** client/html/checkout/standard/summary/address/decorators/local
216
+         * Adds a list of local decorators only to the checkout standard summary address html client
217
+         *
218
+         * Decorators extend the functionality of a class by adding new aspects
219
+         * (e.g. log what is currently done), executing the methods of the underlying
220
+         * class only in certain conditions (e.g. only for logged in users) or
221
+         * modify what is returned to the caller.
222
+         *
223
+         * This option allows you to wrap local decorators
224
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
225
+         *
226
+         *  client/html/checkout/standard/summary/address/decorators/local = array( 'decorator2' )
227
+         *
228
+         * This would add the decorator named "decorator2" defined by
229
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
230
+         *
231
+         * @param array List of decorator names
232
+         * @since 2015.08
233
+         * @category Developer
234
+         * @see client/html/common/decorators/default
235
+         * @see client/html/checkout/standard/summary/address/decorators/excludes
236
+         * @see client/html/checkout/standard/summary/address/decorators/global
237
+         */
238 238
 
239
-		return $this->createSubClient( 'checkout/standard/summary/address/' . $type, $name );
240
-	}
239
+        return $this->createSubClient( 'checkout/standard/summary/address/' . $type, $name );
240
+    }
241 241
 
242 242
 
243
-	/**
244
-	 * Returns the list of sub-client names configured for the client.
245
-	 *
246
-	 * @return array List of HTML client names
247
-	 */
248
-	protected function getSubClientNames()
249
-	{
250
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
251
-	}
243
+    /**
244
+     * Returns the list of sub-client names configured for the client.
245
+     *
246
+     * @return array List of HTML client names
247
+     */
248
+    protected function getSubClientNames()
249
+    {
250
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
251
+    }
252 252
 
253 253
 
254
-	/**
255
-	 * Sets the necessary parameter values in the view.
256
-	 *
257
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
258
-	 * @param array &$tags Result array for the list of tags that are associated to the output
259
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
260
-	 * @return \Aimeos\MW\View\Iface Modified view object
261
-	 */
262
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
263
-	{
264
-		$view = parent::setViewParams( $view, $tags, $expire );
254
+    /**
255
+     * Sets the necessary parameter values in the view.
256
+     *
257
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
258
+     * @param array &$tags Result array for the list of tags that are associated to the output
259
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
260
+     * @return \Aimeos\MW\View\Iface Modified view object
261
+     */
262
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
263
+    {
264
+        $view = parent::setViewParams( $view, $tags, $expire );
265 265
 
266
-		if( !isset( $this->cache ) )
267
-		{
268
-			$target = $view->config( 'client/html/checkout/standard/url/target' );
269
-			$cntl = $view->config( 'client/html/checkout/standard/url/controller', 'checkout' );
270
-			$action = $view->config( 'client/html/checkout/standard/url/action', 'index' );
271
-			$config = $view->config( 'client/html/checkout/standard/url/config', array() );
266
+        if( !isset( $this->cache ) )
267
+        {
268
+            $target = $view->config( 'client/html/checkout/standard/url/target' );
269
+            $cntl = $view->config( 'client/html/checkout/standard/url/controller', 'checkout' );
270
+            $action = $view->config( 'client/html/checkout/standard/url/action', 'index' );
271
+            $config = $view->config( 'client/html/checkout/standard/url/config', array() );
272 272
 
273
-			$url = $view->url( $target, $cntl, $action, array( 'c_step' => 'address' ), array(), $config );
273
+            $url = $view->url( $target, $cntl, $action, array( 'c_step' => 'address' ), array(), $config );
274 274
 
275
-			$view->summaryUrlAddressBilling = $url;
276
-			$view->summaryUrlAddressDelivery = $url;
277
-			$view->summaryBasket = $view->standardBasket;
275
+            $view->summaryUrlAddressBilling = $url;
276
+            $view->summaryUrlAddressDelivery = $url;
277
+            $view->summaryBasket = $view->standardBasket;
278 278
 
279
-			$this->cache = $view;
280
-		}
279
+            $this->cache = $view;
280
+        }
281 281
 
282
-		return $this->cache;
283
-	}
282
+        return $this->cache;
283
+    }
284 284
 }
285 285
\ No newline at end of file
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/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 standard checkout 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/checkout/standard/name
37
-		 * Class name of the used checkout standard 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\Checkout\Standard\Standard
47
-		 *
48
-		 * and you want to replace it with your own version named
49
-		 *
50
-		 *  \Aimeos\Client\Html\Checkout\Standard\Mycheckout
51
-		 *
52
-		 * then you have to set the this configuration option:
53
-		 *
54
-		 *  client/html/checkout/standard/name = Mycheckout
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 "MyCheckout"!
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/checkout/standard/name', 'Standard' );
71
-		}
25
+    /**
26
+     * Creates a standard checkout 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/checkout/standard/name
37
+         * Class name of the used checkout standard 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\Checkout\Standard\Standard
47
+         *
48
+         * and you want to replace it with your own version named
49
+         *
50
+         *  \Aimeos\Client\Html\Checkout\Standard\Mycheckout
51
+         *
52
+         * then you have to set the this configuration option:
53
+         *
54
+         *  client/html/checkout/standard/name = Mycheckout
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 "MyCheckout"!
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/checkout/standard/name', 'Standard' );
71
+        }
72 72
 
73
-		if( ctype_alnum( $name ) === false )
74
-		{
75
-			$classname = is_string( $name ) ? '\\Aimeos\\Client\\Html\\Checkout\\Standard\\' . $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\\Checkout\\Standard\\' . $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\\Checkout\\Standard\\' . $name;
79
+        $iface = '\\Aimeos\\Client\\Html\\Iface';
80
+        $classname = '\\Aimeos\\Client\\Html\\Checkout\\Standard\\' . $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, 'checkout/standard' );
85
-	}
84
+        return self::addClientDecorators( $context, $client, $templatePaths, 'checkout/standard' );
85
+    }
86 86
 }
87 87
 
Please login to merge, or discard this patch.