Completed
Push — master ( ea7c09...15cf0d )
by Aimeos
06:26
created
client/html/src/Client/Html/Catalog/Filter/Search/Standard.php 3 patches
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -19,231 +19,231 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	/** client/html/catalog/filter/search/standard/subparts
26
-	 * List of HTML sub-clients rendered within the catalog filter search section
27
-	 *
28
-	 * The output of the frontend is composed of the code generated by the HTML
29
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
30
-	 * that are responsible for rendering certain sub-parts of the output. The
31
-	 * sub-clients can contain HTML clients themselves and therefore a
32
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
33
-	 * the output that is placed inside the container of its parent.
34
-	 *
35
-	 * At first, always the HTML code generated by the parent is printed, then
36
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
37
-	 * determines the order of the output of these sub-clients inside the parent
38
-	 * container. If the configured list of clients is
39
-	 *
40
-	 *  array( "subclient1", "subclient2" )
41
-	 *
42
-	 * you can easily change the order of the output by reordering the subparts:
43
-	 *
44
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
45
-	 *
46
-	 * You can also remove one or more parts if they shouldn't be rendered:
47
-	 *
48
-	 *  client/html/<clients>/subparts = array( "subclient1" )
49
-	 *
50
-	 * As the clients only generates structural HTML, the layout defined via CSS
51
-	 * should support adding, removing or reordering content by a fluid like
52
-	 * design.
53
-	 *
54
-	 * @param array List of sub-client names
55
-	 * @since 2014.03
56
-	 * @category Developer
57
-	 */
58
-	private $subPartPath = 'client/html/catalog/filter/search/standard/subparts';
59
-	private $subPartNames = array();
60
-
61
-
62
-	/**
63
-	 * Returns the HTML code for insertion into the body.
64
-	 *
65
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
-	 * @param array &$tags Result array for the list of tags that are associated to the output
67
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
-	 * @return string HTML code
69
-	 */
70
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
-	{
72
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
73
-
74
-		$html = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
-		}
78
-		$view->searchBody = $html;
79
-
80
-		/** client/html/catalog/filter/search/standard/template-body
81
-		 * Relative path to the HTML body template of the catalog filter search 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/catalog/filter/search/standard/template-header
99
-		 */
100
-		$tplconf = 'client/html/catalog/filter/search/standard/template-body';
101
-		$default = 'catalog/filter/search-body-default.php';
102
-
103
-		return $view->render( $view->config( $tplconf, $default ) );
104
-	}
105
-
106
-
107
-	/**
108
-	 * Returns the HTML string for insertion into the header.
109
-	 *
110
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
-	 * @param array &$tags Result array for the list of tags that are associated to the output
112
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
114
-	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
-	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
118
-
119
-		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
-		}
123
-		$view->searchHeader = $html;
124
-
125
-		/** client/html/catalog/filter/search/standard/template-header
126
-		 * Relative path to the HTML header template of the catalog filter search 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/catalog/filter/search/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/catalog/filter/search/standard/template-header';
147
-		$default = 'catalog/filter/search-header-default.php';
148
-
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
151
-
152
-
153
-	/**
154
-	 * Returns the sub-client given by its name.
155
-	 *
156
-	 * @param string $type Name of the client type
157
-	 * @param string|null $name Name of the sub-client (Default if null)
158
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
159
-	 */
160
-	public function getSubClient( $type, $name = null )
161
-	{
162
-		/** client/html/catalog/filter/search/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the catalog filter search 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/catalog/filter/search/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/catalog/filter/search/decorators/global
185
-		 * @see client/html/catalog/filter/search/decorators/local
186
-		 */
187
-
188
-		/** client/html/catalog/filter/search/decorators/global
189
-		 * Adds a list of globally available decorators only to the catalog filter search 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/catalog/filter/search/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/catalog/filter/search/decorators/excludes
209
-		 * @see client/html/catalog/filter/search/decorators/local
210
-		 */
211
-
212
-		/** client/html/catalog/filter/search/decorators/local
213
-		 * Adds a list of local decorators only to the catalog filter search 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\Catalog\Decorator\*") around the html client.
222
-		 *
223
-		 *  client/html/catalog/filter/search/decorators/local = array( 'decorator2' )
224
-		 *
225
-		 * This would add the decorator named "decorator2" defined by
226
-		 * "\Aimeos\Client\Html\Catalog\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/catalog/filter/search/decorators/excludes
233
-		 * @see client/html/catalog/filter/search/decorators/global
234
-		 */
235
-
236
-		return $this->createSubClient( 'catalog/filter/search/' . $type, $name );
237
-	}
238
-
239
-
240
-	/**
241
-	 * Returns the list of sub-client names configured for the client.
242
-	 *
243
-	 * @return array List of HTML client names
244
-	 */
245
-	protected function getSubClientNames()
246
-	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
-	}
25
+    /** client/html/catalog/filter/search/standard/subparts
26
+     * List of HTML sub-clients rendered within the catalog filter search section
27
+     *
28
+     * The output of the frontend is composed of the code generated by the HTML
29
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
30
+     * that are responsible for rendering certain sub-parts of the output. The
31
+     * sub-clients can contain HTML clients themselves and therefore a
32
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
33
+     * the output that is placed inside the container of its parent.
34
+     *
35
+     * At first, always the HTML code generated by the parent is printed, then
36
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
37
+     * determines the order of the output of these sub-clients inside the parent
38
+     * container. If the configured list of clients is
39
+     *
40
+     *  array( "subclient1", "subclient2" )
41
+     *
42
+     * you can easily change the order of the output by reordering the subparts:
43
+     *
44
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
45
+     *
46
+     * You can also remove one or more parts if they shouldn't be rendered:
47
+     *
48
+     *  client/html/<clients>/subparts = array( "subclient1" )
49
+     *
50
+     * As the clients only generates structural HTML, the layout defined via CSS
51
+     * should support adding, removing or reordering content by a fluid like
52
+     * design.
53
+     *
54
+     * @param array List of sub-client names
55
+     * @since 2014.03
56
+     * @category Developer
57
+     */
58
+    private $subPartPath = 'client/html/catalog/filter/search/standard/subparts';
59
+    private $subPartNames = array();
60
+
61
+
62
+    /**
63
+     * Returns the HTML code for insertion into the body.
64
+     *
65
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
+     * @param array &$tags Result array for the list of tags that are associated to the output
67
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
+     * @return string HTML code
69
+     */
70
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
+    {
72
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
73
+
74
+        $html = '';
75
+        foreach( $this->getSubClients() as $subclient ) {
76
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
+        }
78
+        $view->searchBody = $html;
79
+
80
+        /** client/html/catalog/filter/search/standard/template-body
81
+         * Relative path to the HTML body template of the catalog filter search 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/catalog/filter/search/standard/template-header
99
+         */
100
+        $tplconf = 'client/html/catalog/filter/search/standard/template-body';
101
+        $default = 'catalog/filter/search-body-default.php';
102
+
103
+        return $view->render( $view->config( $tplconf, $default ) );
104
+    }
105
+
106
+
107
+    /**
108
+     * Returns the HTML string for insertion into the header.
109
+     *
110
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
+     * @param array &$tags Result array for the list of tags that are associated to the output
112
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
+     * @return string|null String including HTML tags for the header on error
114
+     */
115
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
+    {
117
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
118
+
119
+        $html = '';
120
+        foreach( $this->getSubClients() as $subclient ) {
121
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
+        }
123
+        $view->searchHeader = $html;
124
+
125
+        /** client/html/catalog/filter/search/standard/template-header
126
+         * Relative path to the HTML header template of the catalog filter search 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/catalog/filter/search/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/catalog/filter/search/standard/template-header';
147
+        $default = 'catalog/filter/search-header-default.php';
148
+
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151
+
152
+
153
+    /**
154
+     * Returns the sub-client given by its name.
155
+     *
156
+     * @param string $type Name of the client type
157
+     * @param string|null $name Name of the sub-client (Default if null)
158
+     * @return \Aimeos\Client\Html\Iface Sub-client object
159
+     */
160
+    public function getSubClient( $type, $name = null )
161
+    {
162
+        /** client/html/catalog/filter/search/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the catalog filter search 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/catalog/filter/search/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/catalog/filter/search/decorators/global
185
+         * @see client/html/catalog/filter/search/decorators/local
186
+         */
187
+
188
+        /** client/html/catalog/filter/search/decorators/global
189
+         * Adds a list of globally available decorators only to the catalog filter search 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/catalog/filter/search/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/catalog/filter/search/decorators/excludes
209
+         * @see client/html/catalog/filter/search/decorators/local
210
+         */
211
+
212
+        /** client/html/catalog/filter/search/decorators/local
213
+         * Adds a list of local decorators only to the catalog filter search 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\Catalog\Decorator\*") around the html client.
222
+         *
223
+         *  client/html/catalog/filter/search/decorators/local = array( 'decorator2' )
224
+         *
225
+         * This would add the decorator named "decorator2" defined by
226
+         * "\Aimeos\Client\Html\Catalog\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/catalog/filter/search/decorators/excludes
233
+         * @see client/html/catalog/filter/search/decorators/global
234
+         */
235
+
236
+        return $this->createSubClient( 'catalog/filter/search/' . $type, $name );
237
+    }
238
+
239
+
240
+    /**
241
+     * Returns the list of sub-client names configured for the client.
242
+     *
243
+     * @return array List of HTML client names
244
+     */
245
+    protected function getSubClientNames()
246
+    {
247
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
+    }
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68 68
 	 * @return string HTML code
69 69
 	 */
70
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
70
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
71 71
 	{
72
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
72
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
73 73
 
74 74
 		$html = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
+		foreach ($this->getSubClients() as $subclient) {
76
+			$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
77 77
 		}
78 78
 		$view->searchBody = $html;
79 79
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$tplconf = 'client/html/catalog/filter/search/standard/template-body';
101 101
 		$default = 'catalog/filter/search-body-default.php';
102 102
 
103
-		return $view->render( $view->config( $tplconf, $default ) );
103
+		return $view->render($view->config($tplconf, $default));
104 104
 	}
105 105
 
106 106
 
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113 113
 	 * @return string|null String including HTML tags for the header on error
114 114
 	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
115
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
116 116
 	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
117
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
118 118
 
119 119
 		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
120
+		foreach ($this->getSubClients() as $subclient) {
121
+			$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
122 122
 		}
123 123
 		$view->searchHeader = $html;
124 124
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$tplconf = 'client/html/catalog/filter/search/standard/template-header';
147 147
 		$default = 'catalog/filter/search-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
149
+		return $view->render($view->config($tplconf, $default));
150 150
 	}
151 151
 
152 152
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @param string|null $name Name of the sub-client (Default if null)
158 158
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
159 159
 	 */
160
-	public function getSubClient( $type, $name = null )
160
+	public function getSubClient($type, $name = null)
161 161
 	{
162 162
 		/** client/html/catalog/filter/search/decorators/excludes
163 163
 		 * Excludes decorators added by the "common" option from the catalog filter search html client
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		 * @see client/html/catalog/filter/search/decorators/global
234 234
 		 */
235 235
 
236
-		return $this->createSubClient( 'catalog/filter/search/' . $type, $name );
236
+		return $this->createSubClient('catalog/filter/search/'.$type, $name);
237 237
 	}
238 238
 
239 239
 
@@ -244,6 +244,6 @@  discard block
 block discarded – undo
244 244
 	 */
245 245
 	protected function getSubClientNames()
246 246
 	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
247
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
248 248
 	}
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.
client/html/src/Client/Html/Catalog/Filter/Factory.php 2 patches
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 filter 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/catalog/filter/name
37
-		 * Class name of the used catalog filter 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\Catalog\Filter\Standard
47
-		 *
48
-		 * and you want to replace it with your own version named
49
-		 *
50
-		 *  \Aimeos\Client\Html\Catalog\Filter\Myfilter
51
-		 *
52
-		 * then you have to set the this configuration option:
53
-		 *
54
-		 *  client/html/catalog/filter/name = Myfilter
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 "MyFilter"!
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/catalog/filter/name', 'Standard' );
71
-		}
25
+    /**
26
+     * Creates a filter 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/catalog/filter/name
37
+         * Class name of the used catalog filter 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\Catalog\Filter\Standard
47
+         *
48
+         * and you want to replace it with your own version named
49
+         *
50
+         *  \Aimeos\Client\Html\Catalog\Filter\Myfilter
51
+         *
52
+         * then you have to set the this configuration option:
53
+         *
54
+         *  client/html/catalog/filter/name = Myfilter
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 "MyFilter"!
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/catalog/filter/name', 'Standard' );
71
+        }
72 72
 
73
-		if( ctype_alnum( $name ) === false )
74
-		{
75
-			$classname = is_string( $name ) ? '\\Aimeos\\Client\\Html\\Catalog\\Filter\\' . $name : '<not a string>';
76
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
77
-		}
73
+        if( ctype_alnum( $name ) === false )
74
+        {
75
+            $classname = is_string( $name ) ? '\\Aimeos\\Client\\Html\\Catalog\\Filter\\' . $name : '<not a string>';
76
+            throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
77
+        }
78 78
 
79
-		$iface = '\\Aimeos\\Client\\Html\\Iface';
80
-		$classname = '\\Aimeos\\Client\\Html\\Catalog\\Filter\\' . $name;
79
+        $iface = '\\Aimeos\\Client\\Html\\Iface';
80
+        $classname = '\\Aimeos\\Client\\Html\\Catalog\\Filter\\' . $name;
81 81
 
82
-		$client = self::createClientBase( $context, $classname, $iface, $templatePaths );
82
+        $client = self::createClientBase( $context, $classname, $iface, $templatePaths );
83 83
 
84
-		return self::addClientDecorators( $context, $client, $templatePaths, 'catalog/filter' );
85
-	}
84
+        return self::addClientDecorators( $context, $client, $templatePaths, 'catalog/filter' );
85
+    }
86 86
 }
87 87
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @return \Aimeos\Client\Html\Iface Filter part implementing \Aimeos\Client\Html\Iface
32 32
 	 * @throws \Aimeos\Client\Html\Exception If requested client implementation couldn't be found or initialisation fails
33 33
 	 */
34
-	public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null )
34
+	public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null)
35 35
 	{
36 36
 		/** client/html/catalog/filter/name
37 37
 		 * Class name of the used catalog filter client implementation
@@ -66,22 +66,22 @@  discard block
 block discarded – undo
66 66
 		 * @since 2014.03
67 67
 		 * @category Developer
68 68
 		 */
69
-		if( $name === null ) {
70
-			$name = $context->getConfig()->get( 'client/html/catalog/filter/name', 'Standard' );
69
+		if ($name === null) {
70
+			$name = $context->getConfig()->get('client/html/catalog/filter/name', 'Standard');
71 71
 		}
72 72
 
73
-		if( ctype_alnum( $name ) === false )
73
+		if (ctype_alnum($name) === false)
74 74
 		{
75
-			$classname = is_string( $name ) ? '\\Aimeos\\Client\\Html\\Catalog\\Filter\\' . $name : '<not a string>';
76
-			throw new \Aimeos\Client\Html\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
75
+			$classname = is_string($name) ? '\\Aimeos\\Client\\Html\\Catalog\\Filter\\'.$name : '<not a string>';
76
+			throw new \Aimeos\Client\Html\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
77 77
 		}
78 78
 
79 79
 		$iface = '\\Aimeos\\Client\\Html\\Iface';
80
-		$classname = '\\Aimeos\\Client\\Html\\Catalog\\Filter\\' . $name;
80
+		$classname = '\\Aimeos\\Client\\Html\\Catalog\\Filter\\'.$name;
81 81
 
82
-		$client = self::createClientBase( $context, $classname, $iface, $templatePaths );
82
+		$client = self::createClientBase($context, $classname, $iface, $templatePaths);
83 83
 
84
-		return self::addClientDecorators( $context, $client, $templatePaths, 'catalog/filter' );
84
+		return self::addClientDecorators($context, $client, $templatePaths, 'catalog/filter');
85 85
 	}
86 86
 }
87 87
 
Please login to merge, or discard this patch.
client/html/src/Client/Html/Catalog/Filter/Standard.php 4 patches
Indentation   +514 added lines, -514 removed lines patch added patch discarded remove patch
@@ -19,519 +19,519 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	private static $headerSingleton;
26
-
27
-	/** client/html/catalog/filter/standard/subparts
28
-	 * List of HTML sub-clients rendered within the catalog filter section
29
-	 *
30
-	 * The output of the frontend is composed of the code generated by the HTML
31
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
32
-	 * that are responsible for rendering certain sub-parts of the output. The
33
-	 * sub-clients can contain HTML clients themselves and therefore a
34
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
35
-	 * the output that is placed inside the container of its parent.
36
-	 *
37
-	 * At first, always the HTML code generated by the parent is printed, then
38
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
39
-	 * determines the order of the output of these sub-clients inside the parent
40
-	 * container. If the configured list of clients is
41
-	 *
42
-	 *  array( "subclient1", "subclient2" )
43
-	 *
44
-	 * you can easily change the order of the output by reordering the subparts:
45
-	 *
46
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
47
-	 *
48
-	 * You can also remove one or more parts if they shouldn't be rendered:
49
-	 *
50
-	 *  client/html/<clients>/subparts = array( "subclient1" )
51
-	 *
52
-	 * As the clients only generates structural HTML, the layout defined via CSS
53
-	 * should support adding, removing or reordering content by a fluid like
54
-	 * design.
55
-	 *
56
-	 * @param array List of sub-client names
57
-	 * @since 2014.03
58
-	 * @category Developer
59
-	 */
60
-	private $subPartPath = 'client/html/catalog/filter/standard/subparts';
61
-
62
-	/** client/html/catalog/filter/search/name
63
-	 * Name of the search part used by the catalog filter client implementation
64
-	 *
65
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Filter\Search\Myname".
66
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
67
-	 *
68
-	 * @param string Last part of the client class name
69
-	 * @since 2014.03
70
-	 * @category Developer
71
-	 */
72
-
73
-	/** client/html/catalog/filter/tree/name
74
-	 * Name of the tree part used by the catalog filter client implementation
75
-	 *
76
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Filter\Tree\Myname".
77
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
78
-	 *
79
-	 * @param string Last part of the client class name
80
-	 * @since 2014.03
81
-	 * @category Developer
82
-	 */
83
-
84
-	/** client/html/catalog/filter/attribute/name
85
-	 * Name of the attribute part used by the catalog filter client implementation
86
-	 *
87
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Filter\Attribute\Myname".
88
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
89
-	 *
90
-	 * @param string Last part of the client class name
91
-	 * @since 2014.03
92
-	 * @category Developer
93
-	 */
94
-	private $subPartNames = array( 'search', 'tree', 'attribute' );
95
-	private $cache;
96
-
97
-
98
-	/**
99
-	 * Returns the HTML code for insertion into the body.
100
-	 *
101
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
102
-	 * @param array &$tags Result array for the list of tags that are associated to the output
103
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
104
-	 * @return string HTML code
105
-	 */
106
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
107
-	{
108
-		$prefixes = array( 'f' );
109
-		$context = $this->getContext();
110
-
111
-		/** client/html/catalog/filter
112
-		 * All parameters defined for the catalog filter component and its subparts
113
-		 *
114
-		 * This returns all settings related to the filter component.
115
-		 * Please refer to the single settings for details.
116
-		 *
117
-		 * @param array Associative list of name/value settings
118
-		 * @category Developer
119
-		 * @see client/html/catalog#filter
120
-		 */
121
-		$confkey = 'client/html/catalog/filter';
122
-
123
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'body', $uid, $prefixes, $confkey ) ) === null )
124
-		{
125
-			$view = $this->getView();
126
-
127
-			try
128
-			{
129
-				$view = $this->setViewParams( $view, $tags, $expire );
130
-
131
-				$html = '';
132
-				foreach( $this->getSubClients() as $subclient ) {
133
-					$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
134
-				}
135
-				$view->filterBody = $html;
136
-			}
137
-			catch( \Aimeos\Client\Html\Exception $e )
138
-			{
139
-				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
140
-				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
141
-			}
142
-			catch( \Aimeos\Controller\Frontend\Exception $e )
143
-			{
144
-				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
145
-				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
146
-			}
147
-			catch( \Aimeos\MShop\Exception $e )
148
-			{
149
-				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
150
-				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
151
-			}
152
-			catch( \Exception $e )
153
-			{
154
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
155
-
156
-				$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
157
-				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
158
-			}
159
-
160
-			/** client/html/catalog/filter/standard/template-body
161
-			 * Relative path to the HTML body template of the catalog filter client.
162
-			 *
163
-			 * The template file contains the HTML code and processing instructions
164
-			 * to generate the result shown in the body of the frontend. The
165
-			 * configuration string is the path to the template file relative
166
-			 * to the templates directory (usually in client/html/templates).
167
-			 *
168
-			 * You can overwrite the template file configuration in extensions and
169
-			 * provide alternative templates. These alternative templates should be
170
-			 * named like the default one but with the string "standard" replaced by
171
-			 * an unique name. You may use the name of your project for this. If
172
-			 * you've implemented an alternative client class as well, "standard"
173
-			 * should be replaced by the name of the new class.
174
-			 *
175
-			 * @param string Relative path to the template creating code for the HTML page body
176
-			 * @since 2014.03
177
-			 * @category Developer
178
-			 * @see client/html/catalog/filter/standard/template-header
179
-			 */
180
-			$tplconf = 'client/html/catalog/filter/standard/template-body';
181
-			$default = 'catalog/filter/body-default.php';
182
-
183
-			$html = $view->render( $view->config( $tplconf, $default ) );
184
-
185
-			$this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
186
-		}
187
-		else
188
-		{
189
-			$html = $this->modifyBody( $html, $uid );
190
-		}
191
-
192
-		return $html;
193
-	}
194
-
195
-
196
-	/**
197
-	 * Returns the HTML string for insertion into the header.
198
-	 *
199
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
200
-	 * @param array &$tags Result array for the list of tags that are associated to the output
201
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
202
-	 * @return string|null String including HTML tags for the header on error
203
-	 */
204
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
205
-	{
206
-		if( self::$headerSingleton !== null ) {
207
-			return '';
208
-		}
209
-
210
-		self::$headerSingleton = true;
211
-
212
-		$prefixes = array( 'f' );
213
-		$context = $this->getContext();
214
-		$confkey = 'client/html/catalog/filter';
215
-
216
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'header', $uid, $prefixes, $confkey ) ) === null )
217
-		{
218
-			$view = $this->getView();
219
-
220
-			try
221
-			{
222
-				$view = $this->setViewParams( $view, $tags, $expire );
223
-
224
-				$html = '';
225
-				foreach( $this->getSubClients() as $subclient ) {
226
-					$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
227
-				}
228
-				$view->filterHeader = $html;
229
-			}
230
-			catch( \Exception $e )
231
-			{
232
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
233
-			}
234
-
235
-			/** client/html/catalog/filter/standard/template-header
236
-			 * Relative path to the HTML header template of the catalog filter client.
237
-			 *
238
-			 * The template file contains the HTML code and processing instructions
239
-			 * to generate the HTML code that is inserted into the HTML page header
240
-			 * of the rendered page in the frontend. The configuration string is the
241
-			 * path to the template file relative to the templates directory (usually
242
-			 * in client/html/templates).
243
-			 *
244
-			 * You can overwrite the template file configuration in extensions and
245
-			 * provide alternative templates. These alternative templates should be
246
-			 * named like the default one but with the string "standard" replaced by
247
-			 * an unique name. You may use the name of your project for this. If
248
-			 * you've implemented an alternative client class as well, "standard"
249
-			 * should be replaced by the name of the new class.
250
-			 *
251
-			 * @param string Relative path to the template creating code for the HTML page head
252
-			 * @since 2014.03
253
-			 * @category Developer
254
-			 * @see client/html/catalog/filter/standard/template-body
255
-			 */
256
-			$tplconf = 'client/html/catalog/filter/standard/template-header';
257
-			$default = 'catalog/filter/header-default.php';
258
-
259
-			$html = $view->render( $view->config( $tplconf, $default ) );
260
-
261
-			$this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
262
-		}
263
-		else
264
-		{
265
-			$html = $this->modifyHeader( $html, $uid );
266
-		}
267
-
268
-		return $html;
269
-	}
270
-
271
-
272
-	/**
273
-	 * Returns the sub-client given by its name.
274
-	 *
275
-	 * @param string $type Name of the client type
276
-	 * @param string|null $name Name of the sub-client (Default if null)
277
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
278
-	 */
279
-	public function getSubClient( $type, $name = null )
280
-	{
281
-		/** client/html/catalog/filter/decorators/excludes
282
-		 * Excludes decorators added by the "common" option from the catalog filter html client
283
-		 *
284
-		 * Decorators extend the functionality of a class by adding new aspects
285
-		 * (e.g. log what is currently done), executing the methods of the underlying
286
-		 * class only in certain conditions (e.g. only for logged in users) or
287
-		 * modify what is returned to the caller.
288
-		 *
289
-		 * This option allows you to remove a decorator added via
290
-		 * "client/html/common/decorators/default" before they are wrapped
291
-		 * around the html client.
292
-		 *
293
-		 *  client/html/catalog/filter/decorators/excludes = array( 'decorator1' )
294
-		 *
295
-		 * This would remove the decorator named "decorator1" from the list of
296
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
297
-		 * "client/html/common/decorators/default" to the html client.
298
-		 *
299
-		 * @param array List of decorator names
300
-		 * @since 2014.05
301
-		 * @category Developer
302
-		 * @see client/html/common/decorators/default
303
-		 * @see client/html/catalog/filter/decorators/global
304
-		 * @see client/html/catalog/filter/decorators/local
305
-		 */
306
-
307
-		/** client/html/catalog/filter/decorators/global
308
-		 * Adds a list of globally available decorators only to the catalog filter html client
309
-		 *
310
-		 * Decorators extend the functionality of a class by adding new aspects
311
-		 * (e.g. log what is currently done), executing the methods of the underlying
312
-		 * class only in certain conditions (e.g. only for logged in users) or
313
-		 * modify what is returned to the caller.
314
-		 *
315
-		 * This option allows you to wrap global decorators
316
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
317
-		 *
318
-		 *  client/html/catalog/filter/decorators/global = array( 'decorator1' )
319
-		 *
320
-		 * This would add the decorator named "decorator1" defined by
321
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
322
-		 *
323
-		 * @param array List of decorator names
324
-		 * @since 2014.05
325
-		 * @category Developer
326
-		 * @see client/html/common/decorators/default
327
-		 * @see client/html/catalog/filter/decorators/excludes
328
-		 * @see client/html/catalog/filter/decorators/local
329
-		 */
330
-
331
-		/** client/html/catalog/filter/decorators/local
332
-		 * Adds a list of local decorators only to the catalog filter html client
333
-		 *
334
-		 * Decorators extend the functionality of a class by adding new aspects
335
-		 * (e.g. log what is currently done), executing the methods of the underlying
336
-		 * class only in certain conditions (e.g. only for logged in users) or
337
-		 * modify what is returned to the caller.
338
-		 *
339
-		 * This option allows you to wrap local decorators
340
-		 * ("\Aimeos\Client\Html\Catalog\Decorator\*") around the html client.
341
-		 *
342
-		 *  client/html/catalog/filter/decorators/local = array( 'decorator2' )
343
-		 *
344
-		 * This would add the decorator named "decorator2" defined by
345
-		 * "\Aimeos\Client\Html\Catalog\Decorator\Decorator2" only to the html client.
346
-		 *
347
-		 * @param array List of decorator names
348
-		 * @since 2014.05
349
-		 * @category Developer
350
-		 * @see client/html/common/decorators/default
351
-		 * @see client/html/catalog/filter/decorators/excludes
352
-		 * @see client/html/catalog/filter/decorators/global
353
-		 */
354
-
355
-		return $this->createSubClient( 'catalog/filter/' . $type, $name );
356
-	}
357
-
358
-
359
-	/**
360
-	 * Modifies the cached body content to replace content based on sessions or cookies.
361
-	 *
362
-	 * @param string $content Cached content
363
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
364
-	 * @return string Modified body content
365
-	 */
366
-	public function modifyBody( $content, $uid )
367
-	{
368
-		$content = parent::modifyBody( $content, $uid );
369
-
370
-		return $this->replaceSection( $content, $this->getView()->csrf()->formfield(), 'catalog.filter.csrf' );
371
-	}
372
-
373
-
374
-	/**
375
-	 * Processes the input, e.g. store given values.
376
-	 * A view must be available and this method doesn't generate any output
377
-	 * besides setting view variables.
378
-	 */
379
-	public function process()
380
-	{
381
-		$context = $this->getContext();
382
-		$view = $this->getView();
383
-
384
-		try
385
-		{
386
-			parent::process();
387
-		}
388
-		catch( \Aimeos\MShop\Exception $e )
389
-		{
390
-			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
391
-			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
392
-		}
393
-		catch( \Aimeos\Controller\Frontend\Exception $e )
394
-		{
395
-			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
396
-			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
397
-		}
398
-		catch( \Aimeos\Client\Html\Exception $e )
399
-		{
400
-			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
401
-			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
402
-		}
403
-		catch( \Exception $e )
404
-		{
405
-			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
406
-
407
-			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
408
-			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
409
-		}
410
-	}
411
-
412
-
413
-	protected function getSubClientNames()
414
-	{
415
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
416
-	}
417
-
418
-
419
-	/**
420
-	 * Sets the necessary parameter values in the view.
421
-	 *
422
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
423
-	 * @param array &$tags Result array for the list of tags that are associated to the output
424
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
425
-	 * @return \Aimeos\MW\View\Iface Modified view object
426
-	 */
427
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
428
-	{
429
-		if( !isset( $this->cache ) )
430
-		{
431
-			$config = $this->getContext()->getConfig();
432
-
433
-			/** client/html/catalog/count/enable
434
-			 * Enables or disables displaying product counts in the catalog filter
435
-			 *
436
-			 * This configuration option allows shop owners to display product
437
-			 * counts in the catalog filter or to disable fetching product count
438
-			 * information.
439
-			 *
440
-			 * The product count information is fetched via AJAX and inserted via
441
-			 * Javascript. This allows to cache parts of the catalog filter by
442
-			 * leaving out such highly dynamic content like product count which
443
-			 * changes with used filter parameter.
444
-			 *
445
-			 * @param boolean Value of "1" to display product counts, "0" to disable them
446
-			 * @since 2014.03
447
-			 * @category User
448
-			 * @category Developer
449
-			 * @see client/html/catalog/count/url/target
450
-			 * @see client/html/catalog/count/url/controller
451
-			 * @see client/html/catalog/count/url/action
452
-			 * @see client/html/catalog/count/url/config
453
-			 */
454
-			if( $config->get( 'client/html/catalog/count/enable', true ) == true )
455
-			{
456
-				/** client/html/catalog/count/url/target
457
-				 * Destination of the URL where the controller specified in the URL is known
458
-				 *
459
-				 * The destination can be a page ID like in a content management system or the
460
-				 * module of a software development framework. This "target" must contain or know
461
-				 * the controller that should be called by the generated URL.
462
-				 *
463
-				 * @param string Destination of the URL
464
-				 * @since 2014.03
465
-				 * @category Developer
466
-				 * @see client/html/catalog/count/url/controller
467
-				 * @see client/html/catalog/count/url/action
468
-				 * @see client/html/catalog/count/url/config
469
-				 */
470
-				$target = $config->get( 'client/html/catalog/count/url/target' );
471
-
472
-				/** client/html/catalog/count/url/controller
473
-				 * Name of the controller whose action should be called
474
-				 *
475
-				 * In Model-View-Controller (MVC) applications, the controller contains the methods
476
-				 * that create parts of the output displayed in the generated HTML page. Controller
477
-				 * names are usually alpha-numeric.
478
-				 *
479
-				 * @param string Name of the controller
480
-				 * @since 2014.03
481
-				 * @category Developer
482
-				 * @see client/html/catalog/count/url/target
483
-				 * @see client/html/catalog/count/url/action
484
-				 * @see client/html/catalog/count/url/config
485
-				 */
486
-				$controller = $config->get( 'client/html/catalog/count/url/controller', 'catalog' );
487
-
488
-				/** client/html/catalog/count/url/action
489
-				 * Name of the action that should create the output
490
-				 *
491
-				 * In Model-View-Controller (MVC) applications, actions are the methods of a
492
-				 * controller that create parts of the output displayed in the generated HTML page.
493
-				 * Action names are usually alpha-numeric.
494
-				 *
495
-				 * @param string Name of the action
496
-				 * @since 2014.03
497
-				 * @category Developer
498
-				 * @see client/html/catalog/count/url/target
499
-				 * @see client/html/catalog/count/url/controller
500
-				 * @see client/html/catalog/count/url/config
501
-				 */
502
-				$action = $config->get( 'client/html/catalog/count/url/action', 'count' );
503
-
504
-				/** client/html/catalog/count/url/config
505
-				 * Associative list of configuration options used for generating the URL
506
-				 *
507
-				 * You can specify additional options as key/value pairs used when generating
508
-				 * the URLs, like
509
-				 *
510
-				 *  client/html/<clientname>/url/config = array( 'absoluteUri' => true )
511
-				 *
512
-				 * The available key/value pairs depend on the application that embeds the e-commerce
513
-				 * framework. This is because the infrastructure of the application is used for
514
-				 * generating the URLs. The full list of available config options is referenced
515
-				 * in the "see also" section of this page.
516
-				 *
517
-				 * @param string Associative list of configuration options
518
-				 * @since 2014.03
519
-				 * @category Developer
520
-				 * @see client/html/catalog/count/url/target
521
-				 * @see client/html/catalog/count/url/controller
522
-				 * @see client/html/catalog/count/url/action
523
-				 * @see client/html/url/config
524
-				 */
525
-				$config = $config->get( 'client/html/catalog/count/url/config', array() );
526
-
527
-				$params = $this->getClientParams( $view->param(), array( 'f' ) );
528
-
529
-				$view->filterCountUrl = $view->url( $target, $controller, $action, $params, array(), $config );
530
-			}
531
-
532
-			$this->cache = $view;
533
-		}
534
-
535
-		return $this->cache;
536
-	}
25
+    private static $headerSingleton;
26
+
27
+    /** client/html/catalog/filter/standard/subparts
28
+     * List of HTML sub-clients rendered within the catalog filter section
29
+     *
30
+     * The output of the frontend is composed of the code generated by the HTML
31
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
32
+     * that are responsible for rendering certain sub-parts of the output. The
33
+     * sub-clients can contain HTML clients themselves and therefore a
34
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
35
+     * the output that is placed inside the container of its parent.
36
+     *
37
+     * At first, always the HTML code generated by the parent is printed, then
38
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
39
+     * determines the order of the output of these sub-clients inside the parent
40
+     * container. If the configured list of clients is
41
+     *
42
+     *  array( "subclient1", "subclient2" )
43
+     *
44
+     * you can easily change the order of the output by reordering the subparts:
45
+     *
46
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
47
+     *
48
+     * You can also remove one or more parts if they shouldn't be rendered:
49
+     *
50
+     *  client/html/<clients>/subparts = array( "subclient1" )
51
+     *
52
+     * As the clients only generates structural HTML, the layout defined via CSS
53
+     * should support adding, removing or reordering content by a fluid like
54
+     * design.
55
+     *
56
+     * @param array List of sub-client names
57
+     * @since 2014.03
58
+     * @category Developer
59
+     */
60
+    private $subPartPath = 'client/html/catalog/filter/standard/subparts';
61
+
62
+    /** client/html/catalog/filter/search/name
63
+     * Name of the search part used by the catalog filter client implementation
64
+     *
65
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Filter\Search\Myname".
66
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
67
+     *
68
+     * @param string Last part of the client class name
69
+     * @since 2014.03
70
+     * @category Developer
71
+     */
72
+
73
+    /** client/html/catalog/filter/tree/name
74
+     * Name of the tree part used by the catalog filter client implementation
75
+     *
76
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Filter\Tree\Myname".
77
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
78
+     *
79
+     * @param string Last part of the client class name
80
+     * @since 2014.03
81
+     * @category Developer
82
+     */
83
+
84
+    /** client/html/catalog/filter/attribute/name
85
+     * Name of the attribute part used by the catalog filter client implementation
86
+     *
87
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Catalog\Filter\Attribute\Myname".
88
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
89
+     *
90
+     * @param string Last part of the client class name
91
+     * @since 2014.03
92
+     * @category Developer
93
+     */
94
+    private $subPartNames = array( 'search', 'tree', 'attribute' );
95
+    private $cache;
96
+
97
+
98
+    /**
99
+     * Returns the HTML code for insertion into the body.
100
+     *
101
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
102
+     * @param array &$tags Result array for the list of tags that are associated to the output
103
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
104
+     * @return string HTML code
105
+     */
106
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
107
+    {
108
+        $prefixes = array( 'f' );
109
+        $context = $this->getContext();
110
+
111
+        /** client/html/catalog/filter
112
+         * All parameters defined for the catalog filter component and its subparts
113
+         *
114
+         * This returns all settings related to the filter component.
115
+         * Please refer to the single settings for details.
116
+         *
117
+         * @param array Associative list of name/value settings
118
+         * @category Developer
119
+         * @see client/html/catalog#filter
120
+         */
121
+        $confkey = 'client/html/catalog/filter';
122
+
123
+        if( $context->getUserId() != null || ( $html = $this->getCached( 'body', $uid, $prefixes, $confkey ) ) === null )
124
+        {
125
+            $view = $this->getView();
126
+
127
+            try
128
+            {
129
+                $view = $this->setViewParams( $view, $tags, $expire );
130
+
131
+                $html = '';
132
+                foreach( $this->getSubClients() as $subclient ) {
133
+                    $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
134
+                }
135
+                $view->filterBody = $html;
136
+            }
137
+            catch( \Aimeos\Client\Html\Exception $e )
138
+            {
139
+                $error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
140
+                $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
141
+            }
142
+            catch( \Aimeos\Controller\Frontend\Exception $e )
143
+            {
144
+                $error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
145
+                $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
146
+            }
147
+            catch( \Aimeos\MShop\Exception $e )
148
+            {
149
+                $error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
150
+                $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
151
+            }
152
+            catch( \Exception $e )
153
+            {
154
+                $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
155
+
156
+                $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
157
+                $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
158
+            }
159
+
160
+            /** client/html/catalog/filter/standard/template-body
161
+             * Relative path to the HTML body template of the catalog filter client.
162
+             *
163
+             * The template file contains the HTML code and processing instructions
164
+             * to generate the result shown in the body of the frontend. The
165
+             * configuration string is the path to the template file relative
166
+             * to the templates directory (usually in client/html/templates).
167
+             *
168
+             * You can overwrite the template file configuration in extensions and
169
+             * provide alternative templates. These alternative templates should be
170
+             * named like the default one but with the string "standard" replaced by
171
+             * an unique name. You may use the name of your project for this. If
172
+             * you've implemented an alternative client class as well, "standard"
173
+             * should be replaced by the name of the new class.
174
+             *
175
+             * @param string Relative path to the template creating code for the HTML page body
176
+             * @since 2014.03
177
+             * @category Developer
178
+             * @see client/html/catalog/filter/standard/template-header
179
+             */
180
+            $tplconf = 'client/html/catalog/filter/standard/template-body';
181
+            $default = 'catalog/filter/body-default.php';
182
+
183
+            $html = $view->render( $view->config( $tplconf, $default ) );
184
+
185
+            $this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
186
+        }
187
+        else
188
+        {
189
+            $html = $this->modifyBody( $html, $uid );
190
+        }
191
+
192
+        return $html;
193
+    }
194
+
195
+
196
+    /**
197
+     * Returns the HTML string for insertion into the header.
198
+     *
199
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
200
+     * @param array &$tags Result array for the list of tags that are associated to the output
201
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
202
+     * @return string|null String including HTML tags for the header on error
203
+     */
204
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
205
+    {
206
+        if( self::$headerSingleton !== null ) {
207
+            return '';
208
+        }
209
+
210
+        self::$headerSingleton = true;
211
+
212
+        $prefixes = array( 'f' );
213
+        $context = $this->getContext();
214
+        $confkey = 'client/html/catalog/filter';
215
+
216
+        if( $context->getUserId() != null || ( $html = $this->getCached( 'header', $uid, $prefixes, $confkey ) ) === null )
217
+        {
218
+            $view = $this->getView();
219
+
220
+            try
221
+            {
222
+                $view = $this->setViewParams( $view, $tags, $expire );
223
+
224
+                $html = '';
225
+                foreach( $this->getSubClients() as $subclient ) {
226
+                    $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
227
+                }
228
+                $view->filterHeader = $html;
229
+            }
230
+            catch( \Exception $e )
231
+            {
232
+                $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
233
+            }
234
+
235
+            /** client/html/catalog/filter/standard/template-header
236
+             * Relative path to the HTML header template of the catalog filter client.
237
+             *
238
+             * The template file contains the HTML code and processing instructions
239
+             * to generate the HTML code that is inserted into the HTML page header
240
+             * of the rendered page in the frontend. The configuration string is the
241
+             * path to the template file relative to the templates directory (usually
242
+             * in client/html/templates).
243
+             *
244
+             * You can overwrite the template file configuration in extensions and
245
+             * provide alternative templates. These alternative templates should be
246
+             * named like the default one but with the string "standard" replaced by
247
+             * an unique name. You may use the name of your project for this. If
248
+             * you've implemented an alternative client class as well, "standard"
249
+             * should be replaced by the name of the new class.
250
+             *
251
+             * @param string Relative path to the template creating code for the HTML page head
252
+             * @since 2014.03
253
+             * @category Developer
254
+             * @see client/html/catalog/filter/standard/template-body
255
+             */
256
+            $tplconf = 'client/html/catalog/filter/standard/template-header';
257
+            $default = 'catalog/filter/header-default.php';
258
+
259
+            $html = $view->render( $view->config( $tplconf, $default ) );
260
+
261
+            $this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
262
+        }
263
+        else
264
+        {
265
+            $html = $this->modifyHeader( $html, $uid );
266
+        }
267
+
268
+        return $html;
269
+    }
270
+
271
+
272
+    /**
273
+     * Returns the sub-client given by its name.
274
+     *
275
+     * @param string $type Name of the client type
276
+     * @param string|null $name Name of the sub-client (Default if null)
277
+     * @return \Aimeos\Client\Html\Iface Sub-client object
278
+     */
279
+    public function getSubClient( $type, $name = null )
280
+    {
281
+        /** client/html/catalog/filter/decorators/excludes
282
+         * Excludes decorators added by the "common" option from the catalog filter html client
283
+         *
284
+         * Decorators extend the functionality of a class by adding new aspects
285
+         * (e.g. log what is currently done), executing the methods of the underlying
286
+         * class only in certain conditions (e.g. only for logged in users) or
287
+         * modify what is returned to the caller.
288
+         *
289
+         * This option allows you to remove a decorator added via
290
+         * "client/html/common/decorators/default" before they are wrapped
291
+         * around the html client.
292
+         *
293
+         *  client/html/catalog/filter/decorators/excludes = array( 'decorator1' )
294
+         *
295
+         * This would remove the decorator named "decorator1" from the list of
296
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
297
+         * "client/html/common/decorators/default" to the html client.
298
+         *
299
+         * @param array List of decorator names
300
+         * @since 2014.05
301
+         * @category Developer
302
+         * @see client/html/common/decorators/default
303
+         * @see client/html/catalog/filter/decorators/global
304
+         * @see client/html/catalog/filter/decorators/local
305
+         */
306
+
307
+        /** client/html/catalog/filter/decorators/global
308
+         * Adds a list of globally available decorators only to the catalog filter html client
309
+         *
310
+         * Decorators extend the functionality of a class by adding new aspects
311
+         * (e.g. log what is currently done), executing the methods of the underlying
312
+         * class only in certain conditions (e.g. only for logged in users) or
313
+         * modify what is returned to the caller.
314
+         *
315
+         * This option allows you to wrap global decorators
316
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
317
+         *
318
+         *  client/html/catalog/filter/decorators/global = array( 'decorator1' )
319
+         *
320
+         * This would add the decorator named "decorator1" defined by
321
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
322
+         *
323
+         * @param array List of decorator names
324
+         * @since 2014.05
325
+         * @category Developer
326
+         * @see client/html/common/decorators/default
327
+         * @see client/html/catalog/filter/decorators/excludes
328
+         * @see client/html/catalog/filter/decorators/local
329
+         */
330
+
331
+        /** client/html/catalog/filter/decorators/local
332
+         * Adds a list of local decorators only to the catalog filter html client
333
+         *
334
+         * Decorators extend the functionality of a class by adding new aspects
335
+         * (e.g. log what is currently done), executing the methods of the underlying
336
+         * class only in certain conditions (e.g. only for logged in users) or
337
+         * modify what is returned to the caller.
338
+         *
339
+         * This option allows you to wrap local decorators
340
+         * ("\Aimeos\Client\Html\Catalog\Decorator\*") around the html client.
341
+         *
342
+         *  client/html/catalog/filter/decorators/local = array( 'decorator2' )
343
+         *
344
+         * This would add the decorator named "decorator2" defined by
345
+         * "\Aimeos\Client\Html\Catalog\Decorator\Decorator2" only to the html client.
346
+         *
347
+         * @param array List of decorator names
348
+         * @since 2014.05
349
+         * @category Developer
350
+         * @see client/html/common/decorators/default
351
+         * @see client/html/catalog/filter/decorators/excludes
352
+         * @see client/html/catalog/filter/decorators/global
353
+         */
354
+
355
+        return $this->createSubClient( 'catalog/filter/' . $type, $name );
356
+    }
357
+
358
+
359
+    /**
360
+     * Modifies the cached body content to replace content based on sessions or cookies.
361
+     *
362
+     * @param string $content Cached content
363
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
364
+     * @return string Modified body content
365
+     */
366
+    public function modifyBody( $content, $uid )
367
+    {
368
+        $content = parent::modifyBody( $content, $uid );
369
+
370
+        return $this->replaceSection( $content, $this->getView()->csrf()->formfield(), 'catalog.filter.csrf' );
371
+    }
372
+
373
+
374
+    /**
375
+     * Processes the input, e.g. store given values.
376
+     * A view must be available and this method doesn't generate any output
377
+     * besides setting view variables.
378
+     */
379
+    public function process()
380
+    {
381
+        $context = $this->getContext();
382
+        $view = $this->getView();
383
+
384
+        try
385
+        {
386
+            parent::process();
387
+        }
388
+        catch( \Aimeos\MShop\Exception $e )
389
+        {
390
+            $error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
391
+            $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
392
+        }
393
+        catch( \Aimeos\Controller\Frontend\Exception $e )
394
+        {
395
+            $error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
396
+            $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
397
+        }
398
+        catch( \Aimeos\Client\Html\Exception $e )
399
+        {
400
+            $error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
401
+            $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
402
+        }
403
+        catch( \Exception $e )
404
+        {
405
+            $context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
406
+
407
+            $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
408
+            $view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
409
+        }
410
+    }
411
+
412
+
413
+    protected function getSubClientNames()
414
+    {
415
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
416
+    }
417
+
418
+
419
+    /**
420
+     * Sets the necessary parameter values in the view.
421
+     *
422
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
423
+     * @param array &$tags Result array for the list of tags that are associated to the output
424
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
425
+     * @return \Aimeos\MW\View\Iface Modified view object
426
+     */
427
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
428
+    {
429
+        if( !isset( $this->cache ) )
430
+        {
431
+            $config = $this->getContext()->getConfig();
432
+
433
+            /** client/html/catalog/count/enable
434
+             * Enables or disables displaying product counts in the catalog filter
435
+             *
436
+             * This configuration option allows shop owners to display product
437
+             * counts in the catalog filter or to disable fetching product count
438
+             * information.
439
+             *
440
+             * The product count information is fetched via AJAX and inserted via
441
+             * Javascript. This allows to cache parts of the catalog filter by
442
+             * leaving out such highly dynamic content like product count which
443
+             * changes with used filter parameter.
444
+             *
445
+             * @param boolean Value of "1" to display product counts, "0" to disable them
446
+             * @since 2014.03
447
+             * @category User
448
+             * @category Developer
449
+             * @see client/html/catalog/count/url/target
450
+             * @see client/html/catalog/count/url/controller
451
+             * @see client/html/catalog/count/url/action
452
+             * @see client/html/catalog/count/url/config
453
+             */
454
+            if( $config->get( 'client/html/catalog/count/enable', true ) == true )
455
+            {
456
+                /** client/html/catalog/count/url/target
457
+                 * Destination of the URL where the controller specified in the URL is known
458
+                 *
459
+                 * The destination can be a page ID like in a content management system or the
460
+                 * module of a software development framework. This "target" must contain or know
461
+                 * the controller that should be called by the generated URL.
462
+                 *
463
+                 * @param string Destination of the URL
464
+                 * @since 2014.03
465
+                 * @category Developer
466
+                 * @see client/html/catalog/count/url/controller
467
+                 * @see client/html/catalog/count/url/action
468
+                 * @see client/html/catalog/count/url/config
469
+                 */
470
+                $target = $config->get( 'client/html/catalog/count/url/target' );
471
+
472
+                /** client/html/catalog/count/url/controller
473
+                 * Name of the controller whose action should be called
474
+                 *
475
+                 * In Model-View-Controller (MVC) applications, the controller contains the methods
476
+                 * that create parts of the output displayed in the generated HTML page. Controller
477
+                 * names are usually alpha-numeric.
478
+                 *
479
+                 * @param string Name of the controller
480
+                 * @since 2014.03
481
+                 * @category Developer
482
+                 * @see client/html/catalog/count/url/target
483
+                 * @see client/html/catalog/count/url/action
484
+                 * @see client/html/catalog/count/url/config
485
+                 */
486
+                $controller = $config->get( 'client/html/catalog/count/url/controller', 'catalog' );
487
+
488
+                /** client/html/catalog/count/url/action
489
+                 * Name of the action that should create the output
490
+                 *
491
+                 * In Model-View-Controller (MVC) applications, actions are the methods of a
492
+                 * controller that create parts of the output displayed in the generated HTML page.
493
+                 * Action names are usually alpha-numeric.
494
+                 *
495
+                 * @param string Name of the action
496
+                 * @since 2014.03
497
+                 * @category Developer
498
+                 * @see client/html/catalog/count/url/target
499
+                 * @see client/html/catalog/count/url/controller
500
+                 * @see client/html/catalog/count/url/config
501
+                 */
502
+                $action = $config->get( 'client/html/catalog/count/url/action', 'count' );
503
+
504
+                /** client/html/catalog/count/url/config
505
+                 * Associative list of configuration options used for generating the URL
506
+                 *
507
+                 * You can specify additional options as key/value pairs used when generating
508
+                 * the URLs, like
509
+                 *
510
+                 *  client/html/<clientname>/url/config = array( 'absoluteUri' => true )
511
+                 *
512
+                 * The available key/value pairs depend on the application that embeds the e-commerce
513
+                 * framework. This is because the infrastructure of the application is used for
514
+                 * generating the URLs. The full list of available config options is referenced
515
+                 * in the "see also" section of this page.
516
+                 *
517
+                 * @param string Associative list of configuration options
518
+                 * @since 2014.03
519
+                 * @category Developer
520
+                 * @see client/html/catalog/count/url/target
521
+                 * @see client/html/catalog/count/url/controller
522
+                 * @see client/html/catalog/count/url/action
523
+                 * @see client/html/url/config
524
+                 */
525
+                $config = $config->get( 'client/html/catalog/count/url/config', array() );
526
+
527
+                $params = $this->getClientParams( $view->param(), array( 'f' ) );
528
+
529
+                $view->filterCountUrl = $view->url( $target, $controller, $action, $params, array(), $config );
530
+            }
531
+
532
+            $this->cache = $view;
533
+        }
534
+
535
+        return $this->cache;
536
+    }
537 537
 }
Please login to merge, or discard this patch.
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * @since 2014.03
92 92
 	 * @category Developer
93 93
 	 */
94
-	private $subPartNames = array( 'search', 'tree', 'attribute' );
94
+	private $subPartNames = array('search', 'tree', 'attribute');
95 95
 	private $cache;
96 96
 
97 97
 
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
104 104
 	 * @return string HTML code
105 105
 	 */
106
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
106
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
107 107
 	{
108
-		$prefixes = array( 'f' );
108
+		$prefixes = array('f');
109 109
 		$context = $this->getContext();
110 110
 
111 111
 		/** client/html/catalog/filter
@@ -120,41 +120,41 @@  discard block
 block discarded – undo
120 120
 		 */
121 121
 		$confkey = 'client/html/catalog/filter';
122 122
 
123
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'body', $uid, $prefixes, $confkey ) ) === null )
123
+		if ($context->getUserId() != null || ($html = $this->getCached('body', $uid, $prefixes, $confkey)) === null)
124 124
 		{
125 125
 			$view = $this->getView();
126 126
 
127 127
 			try
128 128
 			{
129
-				$view = $this->setViewParams( $view, $tags, $expire );
129
+				$view = $this->setViewParams($view, $tags, $expire);
130 130
 
131 131
 				$html = '';
132
-				foreach( $this->getSubClients() as $subclient ) {
133
-					$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
132
+				foreach ($this->getSubClients() as $subclient) {
133
+					$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
134 134
 				}
135 135
 				$view->filterBody = $html;
136 136
 			}
137
-			catch( \Aimeos\Client\Html\Exception $e )
137
+			catch (\Aimeos\Client\Html\Exception $e)
138 138
 			{
139
-				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
140
-				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
139
+				$error = array($context->getI18n()->dt('client', $e->getMessage()));
140
+				$view->filterErrorList = $view->get('filterErrorList', array()) + $error;
141 141
 			}
142
-			catch( \Aimeos\Controller\Frontend\Exception $e )
142
+			catch (\Aimeos\Controller\Frontend\Exception $e)
143 143
 			{
144
-				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
145
-				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
144
+				$error = array($context->getI18n()->dt('controller/frontend', $e->getMessage()));
145
+				$view->filterErrorList = $view->get('filterErrorList', array()) + $error;
146 146
 			}
147
-			catch( \Aimeos\MShop\Exception $e )
147
+			catch (\Aimeos\MShop\Exception $e)
148 148
 			{
149
-				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
150
-				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
149
+				$error = array($context->getI18n()->dt('mshop', $e->getMessage()));
150
+				$view->filterErrorList = $view->get('filterErrorList', array()) + $error;
151 151
 			}
152
-			catch( \Exception $e )
152
+			catch (\Exception $e)
153 153
 			{
154
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
154
+				$context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString());
155 155
 
156
-				$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
157
-				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
156
+				$error = array($context->getI18n()->dt('client', 'A non-recoverable error occured'));
157
+				$view->filterErrorList = $view->get('filterErrorList', array()) + $error;
158 158
 			}
159 159
 
160 160
 			/** client/html/catalog/filter/standard/template-body
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
 			$tplconf = 'client/html/catalog/filter/standard/template-body';
181 181
 			$default = 'catalog/filter/body-default.php';
182 182
 
183
-			$html = $view->render( $view->config( $tplconf, $default ) );
183
+			$html = $view->render($view->config($tplconf, $default));
184 184
 
185
-			$this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
185
+			$this->setCached('body', $uid, $prefixes, $confkey, $html, $tags, $expire);
186 186
 		}
187 187
 		else
188 188
 		{
189
-			$html = $this->modifyBody( $html, $uid );
189
+			$html = $this->modifyBody($html, $uid);
190 190
 		}
191 191
 
192 192
 		return $html;
@@ -201,35 +201,35 @@  discard block
 block discarded – undo
201 201
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
202 202
 	 * @return string|null String including HTML tags for the header on error
203 203
 	 */
204
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
204
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
205 205
 	{
206
-		if( self::$headerSingleton !== null ) {
206
+		if (self::$headerSingleton !== null) {
207 207
 			return '';
208 208
 		}
209 209
 
210 210
 		self::$headerSingleton = true;
211 211
 
212
-		$prefixes = array( 'f' );
212
+		$prefixes = array('f');
213 213
 		$context = $this->getContext();
214 214
 		$confkey = 'client/html/catalog/filter';
215 215
 
216
-		if( $context->getUserId() != null || ( $html = $this->getCached( 'header', $uid, $prefixes, $confkey ) ) === null )
216
+		if ($context->getUserId() != null || ($html = $this->getCached('header', $uid, $prefixes, $confkey)) === null)
217 217
 		{
218 218
 			$view = $this->getView();
219 219
 
220 220
 			try
221 221
 			{
222
-				$view = $this->setViewParams( $view, $tags, $expire );
222
+				$view = $this->setViewParams($view, $tags, $expire);
223 223
 
224 224
 				$html = '';
225
-				foreach( $this->getSubClients() as $subclient ) {
226
-					$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
225
+				foreach ($this->getSubClients() as $subclient) {
226
+					$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
227 227
 				}
228 228
 				$view->filterHeader = $html;
229 229
 			}
230
-			catch( \Exception $e )
230
+			catch (\Exception $e)
231 231
 			{
232
-				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
232
+				$context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString());
233 233
 			}
234 234
 
235 235
 			/** client/html/catalog/filter/standard/template-header
@@ -256,13 +256,13 @@  discard block
 block discarded – undo
256 256
 			$tplconf = 'client/html/catalog/filter/standard/template-header';
257 257
 			$default = 'catalog/filter/header-default.php';
258 258
 
259
-			$html = $view->render( $view->config( $tplconf, $default ) );
259
+			$html = $view->render($view->config($tplconf, $default));
260 260
 
261
-			$this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
261
+			$this->setCached('header', $uid, $prefixes, $confkey, $html, $tags, $expire);
262 262
 		}
263 263
 		else
264 264
 		{
265
-			$html = $this->modifyHeader( $html, $uid );
265
+			$html = $this->modifyHeader($html, $uid);
266 266
 		}
267 267
 
268 268
 		return $html;
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 	 * @param string|null $name Name of the sub-client (Default if null)
277 277
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
278 278
 	 */
279
-	public function getSubClient( $type, $name = null )
279
+	public function getSubClient($type, $name = null)
280 280
 	{
281 281
 		/** client/html/catalog/filter/decorators/excludes
282 282
 		 * Excludes decorators added by the "common" option from the catalog filter html client
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 		 * @see client/html/catalog/filter/decorators/global
353 353
 		 */
354 354
 
355
-		return $this->createSubClient( 'catalog/filter/' . $type, $name );
355
+		return $this->createSubClient('catalog/filter/'.$type, $name);
356 356
 	}
357 357
 
358 358
 
@@ -363,11 +363,11 @@  discard block
 block discarded – undo
363 363
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
364 364
 	 * @return string Modified body content
365 365
 	 */
366
-	public function modifyBody( $content, $uid )
366
+	public function modifyBody($content, $uid)
367 367
 	{
368
-		$content = parent::modifyBody( $content, $uid );
368
+		$content = parent::modifyBody($content, $uid);
369 369
 
370
-		return $this->replaceSection( $content, $this->getView()->csrf()->formfield(), 'catalog.filter.csrf' );
370
+		return $this->replaceSection($content, $this->getView()->csrf()->formfield(), 'catalog.filter.csrf');
371 371
 	}
372 372
 
373 373
 
@@ -385,34 +385,34 @@  discard block
 block discarded – undo
385 385
 		{
386 386
 			parent::process();
387 387
 		}
388
-		catch( \Aimeos\MShop\Exception $e )
388
+		catch (\Aimeos\MShop\Exception $e)
389 389
 		{
390
-			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
391
-			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
390
+			$error = array($context->getI18n()->dt('mshop', $e->getMessage()));
391
+			$view->filterErrorList = $view->get('filterErrorList', array()) + $error;
392 392
 		}
393
-		catch( \Aimeos\Controller\Frontend\Exception $e )
393
+		catch (\Aimeos\Controller\Frontend\Exception $e)
394 394
 		{
395
-			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
396
-			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
395
+			$error = array($context->getI18n()->dt('controller/frontend', $e->getMessage()));
396
+			$view->filterErrorList = $view->get('filterErrorList', array()) + $error;
397 397
 		}
398
-		catch( \Aimeos\Client\Html\Exception $e )
398
+		catch (\Aimeos\Client\Html\Exception $e)
399 399
 		{
400
-			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
401
-			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
400
+			$error = array($context->getI18n()->dt('client', $e->getMessage()));
401
+			$view->filterErrorList = $view->get('filterErrorList', array()) + $error;
402 402
 		}
403
-		catch( \Exception $e )
403
+		catch (\Exception $e)
404 404
 		{
405
-			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
405
+			$context->getLogger()->log($e->getMessage().PHP_EOL.$e->getTraceAsString());
406 406
 
407
-			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
408
-			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
407
+			$error = array($context->getI18n()->dt('client', 'A non-recoverable error occured'));
408
+			$view->filterErrorList = $view->get('filterErrorList', array()) + $error;
409 409
 		}
410 410
 	}
411 411
 
412 412
 
413 413
 	protected function getSubClientNames()
414 414
 	{
415
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
415
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
416 416
 	}
417 417
 
418 418
 
@@ -424,9 +424,9 @@  discard block
 block discarded – undo
424 424
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
425 425
 	 * @return \Aimeos\MW\View\Iface Modified view object
426 426
 	 */
427
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
427
+	protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
428 428
 	{
429
-		if( !isset( $this->cache ) )
429
+		if (!isset($this->cache))
430 430
 		{
431 431
 			$config = $this->getContext()->getConfig();
432 432
 
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 			 * @see client/html/catalog/count/url/action
452 452
 			 * @see client/html/catalog/count/url/config
453 453
 			 */
454
-			if( $config->get( 'client/html/catalog/count/enable', true ) == true )
454
+			if ($config->get('client/html/catalog/count/enable', true) == true)
455 455
 			{
456 456
 				/** client/html/catalog/count/url/target
457 457
 				 * Destination of the URL where the controller specified in the URL is known
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 				 * @see client/html/catalog/count/url/action
468 468
 				 * @see client/html/catalog/count/url/config
469 469
 				 */
470
-				$target = $config->get( 'client/html/catalog/count/url/target' );
470
+				$target = $config->get('client/html/catalog/count/url/target');
471 471
 
472 472
 				/** client/html/catalog/count/url/controller
473 473
 				 * Name of the controller whose action should be called
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 				 * @see client/html/catalog/count/url/action
484 484
 				 * @see client/html/catalog/count/url/config
485 485
 				 */
486
-				$controller = $config->get( 'client/html/catalog/count/url/controller', 'catalog' );
486
+				$controller = $config->get('client/html/catalog/count/url/controller', 'catalog');
487 487
 
488 488
 				/** client/html/catalog/count/url/action
489 489
 				 * Name of the action that should create the output
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 				 * @see client/html/catalog/count/url/controller
500 500
 				 * @see client/html/catalog/count/url/config
501 501
 				 */
502
-				$action = $config->get( 'client/html/catalog/count/url/action', 'count' );
502
+				$action = $config->get('client/html/catalog/count/url/action', 'count');
503 503
 
504 504
 				/** client/html/catalog/count/url/config
505 505
 				 * Associative list of configuration options used for generating the URL
@@ -522,11 +522,11 @@  discard block
 block discarded – undo
522 522
 				 * @see client/html/catalog/count/url/action
523 523
 				 * @see client/html/url/config
524 524
 				 */
525
-				$config = $config->get( 'client/html/catalog/count/url/config', array() );
525
+				$config = $config->get('client/html/catalog/count/url/config', array());
526 526
 
527
-				$params = $this->getClientParams( $view->param(), array( 'f' ) );
527
+				$params = $this->getClientParams($view->param(), array('f'));
528 528
 
529
-				$view->filterCountUrl = $view->url( $target, $controller, $action, $params, array(), $config );
529
+				$view->filterCountUrl = $view->url($target, $controller, $action, $params, array(), $config);
530 530
 			}
531 531
 
532 532
 			$this->cache = $view;
Please login to merge, or discard this patch.
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -133,23 +133,19 @@  discard block
 block discarded – undo
133 133
 					$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
134 134
 				}
135 135
 				$view->filterBody = $html;
136
-			}
137
-			catch( \Aimeos\Client\Html\Exception $e )
136
+			} catch( \Aimeos\Client\Html\Exception $e )
138 137
 			{
139 138
 				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
140 139
 				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
141
-			}
142
-			catch( \Aimeos\Controller\Frontend\Exception $e )
140
+			} catch( \Aimeos\Controller\Frontend\Exception $e )
143 141
 			{
144 142
 				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
145 143
 				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
146
-			}
147
-			catch( \Aimeos\MShop\Exception $e )
144
+			} catch( \Aimeos\MShop\Exception $e )
148 145
 			{
149 146
 				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
150 147
 				$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
151
-			}
152
-			catch( \Exception $e )
148
+			} catch( \Exception $e )
153 149
 			{
154 150
 				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
155 151
 
@@ -183,8 +179,7 @@  discard block
 block discarded – undo
183 179
 			$html = $view->render( $view->config( $tplconf, $default ) );
184 180
 
185 181
 			$this->setCached( 'body', $uid, $prefixes, $confkey, $html, $tags, $expire );
186
-		}
187
-		else
182
+		} else
188 183
 		{
189 184
 			$html = $this->modifyBody( $html, $uid );
190 185
 		}
@@ -226,8 +221,7 @@  discard block
 block discarded – undo
226 221
 					$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
227 222
 				}
228 223
 				$view->filterHeader = $html;
229
-			}
230
-			catch( \Exception $e )
224
+			} catch( \Exception $e )
231 225
 			{
232 226
 				$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
233 227
 			}
@@ -259,8 +253,7 @@  discard block
 block discarded – undo
259 253
 			$html = $view->render( $view->config( $tplconf, $default ) );
260 254
 
261 255
 			$this->setCached( 'header', $uid, $prefixes, $confkey, $html, $tags, $expire );
262
-		}
263
-		else
256
+		} else
264 257
 		{
265 258
 			$html = $this->modifyHeader( $html, $uid );
266 259
 		}
@@ -384,23 +377,19 @@  discard block
 block discarded – undo
384 377
 		try
385 378
 		{
386 379
 			parent::process();
387
-		}
388
-		catch( \Aimeos\MShop\Exception $e )
380
+		} catch( \Aimeos\MShop\Exception $e )
389 381
 		{
390 382
 			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
391 383
 			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
392
-		}
393
-		catch( \Aimeos\Controller\Frontend\Exception $e )
384
+		} catch( \Aimeos\Controller\Frontend\Exception $e )
394 385
 		{
395 386
 			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
396 387
 			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
397
-		}
398
-		catch( \Aimeos\Client\Html\Exception $e )
388
+		} catch( \Aimeos\Client\Html\Exception $e )
399 389
 		{
400 390
 			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
401 391
 			$view->filterErrorList = $view->get( 'filterErrorList', array() ) + $error;
402
-		}
403
-		catch( \Exception $e )
392
+		} catch( \Exception $e )
404 393
 		{
405 394
 			$context->getLogger()->log( $e->getMessage() . PHP_EOL . $e->getTraceAsString() );
406 395
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Confirm/Retry/Standard.php 3 patches
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -19,231 +19,231 @@
 block discarded – undo
19 19
  * @subpackage Html
20 20
  */
21 21
 class Standard
22
-	extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
-	implements \Aimeos\Client\Html\Common\Client\Factory\Iface
22
+    extends \Aimeos\Client\Html\Common\Client\Factory\Base
23
+    implements \Aimeos\Client\Html\Common\Client\Factory\Iface
24 24
 {
25
-	/** client/html/checkout/confirm/retry/standard/subparts
26
-	 * List of HTML sub-clients rendered within the checkout confirm retry 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/confirm/retry/standard/subparts';
59
-	private $subPartNames = array();
60
-
61
-
62
-	/**
63
-	 * Returns the HTML code for insertion into the body.
64
-	 *
65
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
-	 * @param array &$tags Result array for the list of tags that are associated to the output
67
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
-	 * @return string HTML code
69
-	 */
70
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
-	{
72
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
73
-
74
-		$html = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
-		}
78
-		$view->retryBody = $html;
79
-
80
-		/** client/html/checkout/confirm/retry/standard/template-body
81
-		 * Relative path to the HTML body template of the checkout confirm retry 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/confirm/retry/standard/template-header
99
-		 */
100
-		$tplconf = 'client/html/checkout/confirm/retry/standard/template-body';
101
-		$default = 'checkout/confirm/retry-body-default.php';
102
-
103
-		return $view->render( $view->config( $tplconf, $default ) );
104
-	}
105
-
106
-
107
-	/**
108
-	 * Returns the HTML string for insertion into the header.
109
-	 *
110
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
-	 * @param array &$tags Result array for the list of tags that are associated to the output
112
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
114
-	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
-	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
118
-
119
-		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
-		}
123
-		$view->retryHeader = $html;
124
-
125
-		/** client/html/checkout/confirm/retry/standard/template-header
126
-		 * Relative path to the HTML header template of the checkout confirm retry 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/confirm/retry/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/checkout/confirm/retry/standard/template-header';
147
-		$default = 'checkout/confirm/retry-header-default.php';
148
-
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
151
-
152
-
153
-	/**
154
-	 * Returns the sub-client given by its name.
155
-	 *
156
-	 * @param string $type Name of the client type
157
-	 * @param string|null $name Name of the sub-client (Default if null)
158
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
159
-	 */
160
-	public function getSubClient( $type, $name = null )
161
-	{
162
-		/** client/html/checkout/confirm/retry/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the checkout confirm retry 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/confirm/retry/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/confirm/retry/decorators/global
185
-		 * @see client/html/checkout/confirm/retry/decorators/local
186
-		 */
187
-
188
-		/** client/html/checkout/confirm/retry/decorators/global
189
-		 * Adds a list of globally available decorators only to the checkout confirm retry 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/confirm/retry/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/confirm/retry/decorators/excludes
209
-		 * @see client/html/checkout/confirm/retry/decorators/local
210
-		 */
211
-
212
-		/** client/html/checkout/confirm/retry/decorators/local
213
-		 * Adds a list of local decorators only to the checkout confirm retry 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/confirm/retry/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/confirm/retry/decorators/excludes
233
-		 * @see client/html/checkout/confirm/retry/decorators/global
234
-		 */
235
-
236
-		return $this->createSubClient( 'checkout/confirm/retry/' . $type, $name );
237
-	}
238
-
239
-
240
-	/**
241
-	 * Returns the list of sub-client names configured for the client.
242
-	 *
243
-	 * @return array List of HTML client names
244
-	 */
245
-	protected function getSubClientNames()
246
-	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
-	}
25
+    /** client/html/checkout/confirm/retry/standard/subparts
26
+     * List of HTML sub-clients rendered within the checkout confirm retry 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/confirm/retry/standard/subparts';
59
+    private $subPartNames = array();
60
+
61
+
62
+    /**
63
+     * Returns the HTML code for insertion into the body.
64
+     *
65
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
66
+     * @param array &$tags Result array for the list of tags that are associated to the output
67
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68
+     * @return string HTML code
69
+     */
70
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
71
+    {
72
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
73
+
74
+        $html = '';
75
+        foreach( $this->getSubClients() as $subclient ) {
76
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
77
+        }
78
+        $view->retryBody = $html;
79
+
80
+        /** client/html/checkout/confirm/retry/standard/template-body
81
+         * Relative path to the HTML body template of the checkout confirm retry 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/confirm/retry/standard/template-header
99
+         */
100
+        $tplconf = 'client/html/checkout/confirm/retry/standard/template-body';
101
+        $default = 'checkout/confirm/retry-body-default.php';
102
+
103
+        return $view->render( $view->config( $tplconf, $default ) );
104
+    }
105
+
106
+
107
+    /**
108
+     * Returns the HTML string for insertion into the header.
109
+     *
110
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111
+     * @param array &$tags Result array for the list of tags that are associated to the output
112
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
+     * @return string|null String including HTML tags for the header on error
114
+     */
115
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116
+    {
117
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
118
+
119
+        $html = '';
120
+        foreach( $this->getSubClients() as $subclient ) {
121
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
+        }
123
+        $view->retryHeader = $html;
124
+
125
+        /** client/html/checkout/confirm/retry/standard/template-header
126
+         * Relative path to the HTML header template of the checkout confirm retry 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/confirm/retry/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/checkout/confirm/retry/standard/template-header';
147
+        $default = 'checkout/confirm/retry-header-default.php';
148
+
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151
+
152
+
153
+    /**
154
+     * Returns the sub-client given by its name.
155
+     *
156
+     * @param string $type Name of the client type
157
+     * @param string|null $name Name of the sub-client (Default if null)
158
+     * @return \Aimeos\Client\Html\Iface Sub-client object
159
+     */
160
+    public function getSubClient( $type, $name = null )
161
+    {
162
+        /** client/html/checkout/confirm/retry/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the checkout confirm retry 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/confirm/retry/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/confirm/retry/decorators/global
185
+         * @see client/html/checkout/confirm/retry/decorators/local
186
+         */
187
+
188
+        /** client/html/checkout/confirm/retry/decorators/global
189
+         * Adds a list of globally available decorators only to the checkout confirm retry 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/confirm/retry/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/confirm/retry/decorators/excludes
209
+         * @see client/html/checkout/confirm/retry/decorators/local
210
+         */
211
+
212
+        /** client/html/checkout/confirm/retry/decorators/local
213
+         * Adds a list of local decorators only to the checkout confirm retry 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/confirm/retry/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/confirm/retry/decorators/excludes
233
+         * @see client/html/checkout/confirm/retry/decorators/global
234
+         */
235
+
236
+        return $this->createSubClient( 'checkout/confirm/retry/' . $type, $name );
237
+    }
238
+
239
+
240
+    /**
241
+     * Returns the list of sub-client names configured for the client.
242
+     *
243
+     * @return array List of HTML client names
244
+     */
245
+    protected function getSubClientNames()
246
+    {
247
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
+    }
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
68 68
 	 * @return string HTML code
69 69
 	 */
70
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
70
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
71 71
 	{
72
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
72
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
73 73
 
74 74
 		$html = '';
75
-		foreach( $this->getSubClients() as $subclient ) {
76
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
+		foreach ($this->getSubClients() as $subclient) {
76
+			$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
77 77
 		}
78 78
 		$view->retryBody = $html;
79 79
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$tplconf = 'client/html/checkout/confirm/retry/standard/template-body';
101 101
 		$default = 'checkout/confirm/retry-body-default.php';
102 102
 
103
-		return $view->render( $view->config( $tplconf, $default ) );
103
+		return $view->render($view->config($tplconf, $default));
104 104
 	}
105 105
 
106 106
 
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113 113
 	 * @return string|null String including HTML tags for the header on error
114 114
 	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
115
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
116 116
 	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
117
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
118 118
 
119 119
 		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
120
+		foreach ($this->getSubClients() as $subclient) {
121
+			$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
122 122
 		}
123 123
 		$view->retryHeader = $html;
124 124
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$tplconf = 'client/html/checkout/confirm/retry/standard/template-header';
147 147
 		$default = 'checkout/confirm/retry-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
149
+		return $view->render($view->config($tplconf, $default));
150 150
 	}
151 151
 
152 152
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @param string|null $name Name of the sub-client (Default if null)
158 158
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
159 159
 	 */
160
-	public function getSubClient( $type, $name = null )
160
+	public function getSubClient($type, $name = null)
161 161
 	{
162 162
 		/** client/html/checkout/confirm/retry/decorators/excludes
163 163
 		 * Excludes decorators added by the "common" option from the checkout confirm retry html client
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		 * @see client/html/checkout/confirm/retry/decorators/global
234 234
 		 */
235 235
 
236
-		return $this->createSubClient( 'checkout/confirm/retry/' . $type, $name );
236
+		return $this->createSubClient('checkout/confirm/retry/'.$type, $name);
237 237
 	}
238 238
 
239 239
 
@@ -244,6 +244,6 @@  discard block
 block discarded – undo
244 244
 	 */
245 245
 	protected function getSubClientNames()
246 246
 	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
247
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
248 248
 	}
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Confirm/Order/Service/Standard.php 3 patches
Indentation   +227 added lines, -227 removed lines patch added patch discarded remove patch
@@ -18,232 +18,232 @@
 block discarded – undo
18 18
  * @subpackage Html
19 19
  */
20 20
 class Standard
21
-	extends \Aimeos\Client\Html\Common\Summary\Service\Base
21
+    extends \Aimeos\Client\Html\Common\Summary\Service\Base
22 22
 {
23
-	/** client/html/checkout/confirm/order/service/standard/subparts
24
-	 * List of HTML sub-clients rendered within the checkout confirm order service section
25
-	 *
26
-	 * The output of the frontend is composed of the code generated by the HTML
27
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
28
-	 * that are responsible for rendering certain sub-parts of the output. The
29
-	 * sub-clients can contain HTML clients themselves and therefore a
30
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
31
-	 * the output that is placed inside the container of its parent.
32
-	 *
33
-	 * At first, always the HTML code generated by the parent is printed, then
34
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
35
-	 * determines the order of the output of these sub-clients inside the parent
36
-	 * container. If the configured list of clients is
37
-	 *
38
-	 *  array( "subclient1", "subclient2" )
39
-	 *
40
-	 * you can easily change the order of the output by reordering the subparts:
41
-	 *
42
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
43
-	 *
44
-	 * You can also remove one or more parts if they shouldn't be rendered:
45
-	 *
46
-	 *  client/html/<clients>/subparts = array( "subclient1" )
47
-	 *
48
-	 * As the clients only generates structural HTML, the layout defined via CSS
49
-	 * should support adding, removing or reordering content by a fluid like
50
-	 * design.
51
-	 *
52
-	 * @param array List of sub-client names
53
-	 * @since 2015.11
54
-	 * @category Developer
55
-	 */
56
-	private $subPartPath = 'client/html/checkout/confirm/order/service/standard/subparts';
57
-	private $subPartNames = array();
58
-
59
-
60
-	/**
61
-	 * Returns the HTML code for insertion into the body.
62
-	 *
63
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
64
-	 * @param array &$tags Result array for the list of tags that are associated to the output
65
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
66
-	 * @return string HTML code
67
-	*/
68
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
69
-	{
70
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
71
-
72
-		$html = '';
73
-		foreach( $this->getSubClients() as $subclient ) {
74
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
-		}
76
-		$view->serviceBody = $html;
77
-
78
-		/** client/html/checkout/confirm/order/service/standard/template-body
79
-		 * Relative path to the HTML body template of the checkout confirm order service client.
80
-		 *
81
-		 * The template file contains the HTML code and processing instructions
82
-		 * to generate the result shown in the body of the frontend. The
83
-		 * configuration string is the path to the template file relative
84
-		 * to the templates directory (usually in client/html/templates).
85
-		 *
86
-		 * You can overwrite the template file configuration in extensions and
87
-		 * provide alternative templates. These alternative templates should be
88
-		 * named like the default one but with the string "standard" replaced by
89
-		 * an unique name. You may use the name of your project for this. If
90
-		 * you've implemented an alternative client class as well, "standard"
91
-		 * (second one) should be replaced by the name of the new class in lower
92
-		 * case.
93
-		 *
94
-		 * @param string Relative path to the template creating code for the HTML page body
95
-		 * @since 2015.11
96
-		 * @category Developer
97
-		 * @see client/html/checkout/confirm/order/service/standard/template-header
98
-		 */
99
-		$tplconf = 'client/html/checkout/confirm/order/service/standard/template-body';
100
-		$default = 'common/summary/service-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->serviceHeader = $html;
123
-
124
-		/** client/html/checkout/confirm/order/service/standard/template-header
125
-		 * Relative path to the HTML header template of the checkout confirm order service 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
-		 * (second one) should be replaced by the name of the new class in lower
139
-		 * case.
140
-		 *
141
-		 * @param string Relative path to the template creating code for the HTML page head
142
-		 * @since 2015.11
143
-		 * @category Developer
144
-		 * @see client/html/checkout/confirm/order/service/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/checkout/confirm/order/service/standard/template-header';
147
-		$default = 'common/summary/service-header-default.php';
148
-
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
151
-
152
-
153
-	/**
154
-	 * Returns the sub-client given by its name.
155
-	 *
156
-	 * @param string $type Name of the client type
157
-	 * @param string|null $name Name of the sub-client (Default if null)
158
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
159
-	 */
160
-	public function getSubClient( $type, $name = null )
161
-	{
162
-		/** client/html/checkout/confirm/order/service/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the checkout confirm order service html client
164
-		 *
165
-		 * Decorators extend the functionality of a class by adding new aspects
166
-		 * (e.g. log what is currently done), executing the methods of the underlying
167
-		 * class only in certain conditions (e.g. only for logged in users) or
168
-		 * modify what is returned to the caller.
169
-		 *
170
-		 * This option allows you to remove a decorator added via
171
-		 * "client/html/common/decorators/default" before they are wrapped
172
-		 * around the html client.
173
-		 *
174
-		 *  client/html/checkout/confirm/order/service/decorators/excludes = array( 'decorator1' )
175
-		 *
176
-		 * This would remove the decorator named "decorator1" from the list of
177
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
-		 * "client/html/common/decorators/default" to the html client.
179
-		 *
180
-		 * @param array List of decorator names
181
-		 * @since 2015.08
182
-		 * @category Developer
183
-		 * @see client/html/common/decorators/default
184
-		 * @see client/html/checkout/confirm/order/service/decorators/global
185
-		 * @see client/html/checkout/confirm/order/service/decorators/local
186
-		 */
187
-
188
-		/** client/html/checkout/confirm/order/service/decorators/global
189
-		 * Adds a list of globally available decorators only to the checkout confirm order service html client
190
-		 *
191
-		 * Decorators extend the functionality of a class by adding new aspects
192
-		 * (e.g. log what is currently done), executing the methods of the underlying
193
-		 * class only in certain conditions (e.g. only for logged in users) or
194
-		 * modify what is returned to the caller.
195
-		 *
196
-		 * This option allows you to wrap global decorators
197
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
-		 *
199
-		 *  client/html/checkout/confirm/order/service/decorators/global = array( 'decorator1' )
200
-		 *
201
-		 * This would add the decorator named "decorator1" defined by
202
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
-		 *
204
-		 * @param array List of decorator names
205
-		 * @since 2015.08
206
-		 * @category Developer
207
-		 * @see client/html/common/decorators/default
208
-		 * @see client/html/checkout/confirm/order/service/decorators/excludes
209
-		 * @see client/html/checkout/confirm/order/service/decorators/local
210
-		 */
211
-
212
-		/** client/html/checkout/confirm/order/service/decorators/local
213
-		 * Adds a list of local decorators only to the checkout confirm order service html client
214
-		 *
215
-		 * Decorators extend the functionality of a class by adding new aspects
216
-		 * (e.g. log what is currently done), executing the methods of the underlying
217
-		 * class only in certain conditions (e.g. only for logged in users) or
218
-		 * modify what is returned to the caller.
219
-		 *
220
-		 * This option allows you to wrap local decorators
221
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
-		 *
223
-		 *  client/html/checkout/confirm/order/service/decorators/local = array( 'decorator2' )
224
-		 *
225
-		 * This would add the decorator named "decorator2" defined by
226
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
-		 *
228
-		 * @param array List of decorator names
229
-		 * @since 2015.08
230
-		 * @category Developer
231
-		 * @see client/html/common/decorators/default
232
-		 * @see client/html/checkout/confirm/order/service/decorators/excludes
233
-		 * @see client/html/checkout/confirm/order/service/decorators/global
234
-		 */
235
-
236
-		return $this->createSubClient( 'checkout/confirm/order/service/' . $type, $name );
237
-	}
238
-
239
-
240
-	/**
241
-	 * Returns the list of sub-client names configured for the client.
242
-	 *
243
-	 * @return array List of HTML client names
244
-	 */
245
-	protected function getSubClientNames()
246
-	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
-	}
23
+    /** client/html/checkout/confirm/order/service/standard/subparts
24
+     * List of HTML sub-clients rendered within the checkout confirm order service section
25
+     *
26
+     * The output of the frontend is composed of the code generated by the HTML
27
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
28
+     * that are responsible for rendering certain sub-parts of the output. The
29
+     * sub-clients can contain HTML clients themselves and therefore a
30
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
31
+     * the output that is placed inside the container of its parent.
32
+     *
33
+     * At first, always the HTML code generated by the parent is printed, then
34
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
35
+     * determines the order of the output of these sub-clients inside the parent
36
+     * container. If the configured list of clients is
37
+     *
38
+     *  array( "subclient1", "subclient2" )
39
+     *
40
+     * you can easily change the order of the output by reordering the subparts:
41
+     *
42
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
43
+     *
44
+     * You can also remove one or more parts if they shouldn't be rendered:
45
+     *
46
+     *  client/html/<clients>/subparts = array( "subclient1" )
47
+     *
48
+     * As the clients only generates structural HTML, the layout defined via CSS
49
+     * should support adding, removing or reordering content by a fluid like
50
+     * design.
51
+     *
52
+     * @param array List of sub-client names
53
+     * @since 2015.11
54
+     * @category Developer
55
+     */
56
+    private $subPartPath = 'client/html/checkout/confirm/order/service/standard/subparts';
57
+    private $subPartNames = array();
58
+
59
+
60
+    /**
61
+     * Returns the HTML code for insertion into the body.
62
+     *
63
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
64
+     * @param array &$tags Result array for the list of tags that are associated to the output
65
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
66
+     * @return string HTML code
67
+     */
68
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
69
+    {
70
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
71
+
72
+        $html = '';
73
+        foreach( $this->getSubClients() as $subclient ) {
74
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
+        }
76
+        $view->serviceBody = $html;
77
+
78
+        /** client/html/checkout/confirm/order/service/standard/template-body
79
+         * Relative path to the HTML body template of the checkout confirm order service client.
80
+         *
81
+         * The template file contains the HTML code and processing instructions
82
+         * to generate the result shown in the body of the frontend. The
83
+         * configuration string is the path to the template file relative
84
+         * to the templates directory (usually in client/html/templates).
85
+         *
86
+         * You can overwrite the template file configuration in extensions and
87
+         * provide alternative templates. These alternative templates should be
88
+         * named like the default one but with the string "standard" replaced by
89
+         * an unique name. You may use the name of your project for this. If
90
+         * you've implemented an alternative client class as well, "standard"
91
+         * (second one) should be replaced by the name of the new class in lower
92
+         * case.
93
+         *
94
+         * @param string Relative path to the template creating code for the HTML page body
95
+         * @since 2015.11
96
+         * @category Developer
97
+         * @see client/html/checkout/confirm/order/service/standard/template-header
98
+         */
99
+        $tplconf = 'client/html/checkout/confirm/order/service/standard/template-body';
100
+        $default = 'common/summary/service-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->serviceHeader = $html;
123
+
124
+        /** client/html/checkout/confirm/order/service/standard/template-header
125
+         * Relative path to the HTML header template of the checkout confirm order service 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
+         * (second one) should be replaced by the name of the new class in lower
139
+         * case.
140
+         *
141
+         * @param string Relative path to the template creating code for the HTML page head
142
+         * @since 2015.11
143
+         * @category Developer
144
+         * @see client/html/checkout/confirm/order/service/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/checkout/confirm/order/service/standard/template-header';
147
+        $default = 'common/summary/service-header-default.php';
148
+
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151
+
152
+
153
+    /**
154
+     * Returns the sub-client given by its name.
155
+     *
156
+     * @param string $type Name of the client type
157
+     * @param string|null $name Name of the sub-client (Default if null)
158
+     * @return \Aimeos\Client\Html\Iface Sub-client object
159
+     */
160
+    public function getSubClient( $type, $name = null )
161
+    {
162
+        /** client/html/checkout/confirm/order/service/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the checkout confirm order service html client
164
+         *
165
+         * Decorators extend the functionality of a class by adding new aspects
166
+         * (e.g. log what is currently done), executing the methods of the underlying
167
+         * class only in certain conditions (e.g. only for logged in users) or
168
+         * modify what is returned to the caller.
169
+         *
170
+         * This option allows you to remove a decorator added via
171
+         * "client/html/common/decorators/default" before they are wrapped
172
+         * around the html client.
173
+         *
174
+         *  client/html/checkout/confirm/order/service/decorators/excludes = array( 'decorator1' )
175
+         *
176
+         * This would remove the decorator named "decorator1" from the list of
177
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
+         * "client/html/common/decorators/default" to the html client.
179
+         *
180
+         * @param array List of decorator names
181
+         * @since 2015.08
182
+         * @category Developer
183
+         * @see client/html/common/decorators/default
184
+         * @see client/html/checkout/confirm/order/service/decorators/global
185
+         * @see client/html/checkout/confirm/order/service/decorators/local
186
+         */
187
+
188
+        /** client/html/checkout/confirm/order/service/decorators/global
189
+         * Adds a list of globally available decorators only to the checkout confirm order service html client
190
+         *
191
+         * Decorators extend the functionality of a class by adding new aspects
192
+         * (e.g. log what is currently done), executing the methods of the underlying
193
+         * class only in certain conditions (e.g. only for logged in users) or
194
+         * modify what is returned to the caller.
195
+         *
196
+         * This option allows you to wrap global decorators
197
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
+         *
199
+         *  client/html/checkout/confirm/order/service/decorators/global = array( 'decorator1' )
200
+         *
201
+         * This would add the decorator named "decorator1" defined by
202
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
+         *
204
+         * @param array List of decorator names
205
+         * @since 2015.08
206
+         * @category Developer
207
+         * @see client/html/common/decorators/default
208
+         * @see client/html/checkout/confirm/order/service/decorators/excludes
209
+         * @see client/html/checkout/confirm/order/service/decorators/local
210
+         */
211
+
212
+        /** client/html/checkout/confirm/order/service/decorators/local
213
+         * Adds a list of local decorators only to the checkout confirm order service html client
214
+         *
215
+         * Decorators extend the functionality of a class by adding new aspects
216
+         * (e.g. log what is currently done), executing the methods of the underlying
217
+         * class only in certain conditions (e.g. only for logged in users) or
218
+         * modify what is returned to the caller.
219
+         *
220
+         * This option allows you to wrap local decorators
221
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
+         *
223
+         *  client/html/checkout/confirm/order/service/decorators/local = array( 'decorator2' )
224
+         *
225
+         * This would add the decorator named "decorator2" defined by
226
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
+         *
228
+         * @param array List of decorator names
229
+         * @since 2015.08
230
+         * @category Developer
231
+         * @see client/html/common/decorators/default
232
+         * @see client/html/checkout/confirm/order/service/decorators/excludes
233
+         * @see client/html/checkout/confirm/order/service/decorators/global
234
+         */
235
+
236
+        return $this->createSubClient( 'checkout/confirm/order/service/' . $type, $name );
237
+    }
238
+
239
+
240
+    /**
241
+     * Returns the list of sub-client names configured for the client.
242
+     *
243
+     * @return array List of HTML client names
244
+     */
245
+    protected function getSubClientNames()
246
+    {
247
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
+    }
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
66 66
 	 * @return string HTML code
67 67
 	*/
68
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
68
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
69 69
 	{
70
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
70
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
71 71
 
72 72
 		$html = '';
73
-		foreach( $this->getSubClients() as $subclient ) {
74
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
73
+		foreach ($this->getSubClients() as $subclient) {
74
+			$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
75 75
 		}
76 76
 		$view->serviceBody = $html;
77 77
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$tplconf = 'client/html/checkout/confirm/order/service/standard/template-body';
100 100
 		$default = 'common/summary/service-body-default.php';
101 101
 
102
-		return $view->render( $view->config( $tplconf, $default ) );
102
+		return $view->render($view->config($tplconf, $default));
103 103
 	}
104 104
 
105 105
 
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
112 112
 	 * @return string|null String including HTML tags for the header on error
113 113
 	 */
114
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
114
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
115 115
 	{
116
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
116
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
117 117
 
118 118
 		$html = '';
119
-		foreach( $this->getSubClients() as $subclient ) {
120
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
119
+		foreach ($this->getSubClients() as $subclient) {
120
+			$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
121 121
 		}
122 122
 		$view->serviceHeader = $html;
123 123
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$tplconf = 'client/html/checkout/confirm/order/service/standard/template-header';
147 147
 		$default = 'common/summary/service-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
149
+		return $view->render($view->config($tplconf, $default));
150 150
 	}
151 151
 
152 152
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @param string|null $name Name of the sub-client (Default if null)
158 158
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
159 159
 	 */
160
-	public function getSubClient( $type, $name = null )
160
+	public function getSubClient($type, $name = null)
161 161
 	{
162 162
 		/** client/html/checkout/confirm/order/service/decorators/excludes
163 163
 		 * Excludes decorators added by the "common" option from the checkout confirm order service html client
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		 * @see client/html/checkout/confirm/order/service/decorators/global
234 234
 		 */
235 235
 
236
-		return $this->createSubClient( 'checkout/confirm/order/service/' . $type, $name );
236
+		return $this->createSubClient('checkout/confirm/order/service/'.$type, $name);
237 237
 	}
238 238
 
239 239
 
@@ -244,6 +244,6 @@  discard block
 block discarded – undo
244 244
 	 */
245 245
 	protected function getSubClientNames()
246 246
 	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
247
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
248 248
 	}
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Confirm/Order/Coupon/Standard.php 3 patches
Indentation   +227 added lines, -227 removed lines patch added patch discarded remove patch
@@ -18,232 +18,232 @@
 block discarded – undo
18 18
  * @subpackage Html
19 19
  */
20 20
 class Standard
21
-	extends \Aimeos\Client\Html\Common\Summary\Coupon\Base
21
+    extends \Aimeos\Client\Html\Common\Summary\Coupon\Base
22 22
 {
23
-	/** client/html/checkout/confirm/order/coupon/standard/subparts
24
-	 * List of HTML sub-clients rendered within the checkout confirm order coupon section
25
-	 *
26
-	 * The output of the frontend is composed of the code generated by the HTML
27
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
28
-	 * that are responsible for rendering certain sub-parts of the output. The
29
-	 * sub-clients can contain HTML clients themselves and therefore a
30
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
31
-	 * the output that is placed inside the container of its parent.
32
-	 *
33
-	 * At first, always the HTML code generated by the parent is printed, then
34
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
35
-	 * determines the order of the output of these sub-clients inside the parent
36
-	 * container. If the configured list of clients is
37
-	 *
38
-	 *  array( "subclient1", "subclient2" )
39
-	 *
40
-	 * you can easily change the order of the output by reordering the subparts:
41
-	 *
42
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
43
-	 *
44
-	 * You can also remove one or more parts if they shouldn't be rendered:
45
-	 *
46
-	 *  client/html/<clients>/subparts = array( "subclient1" )
47
-	 *
48
-	 * As the clients only generates structural HTML, the layout defined via CSS
49
-	 * should support adding, removing or reordering content by a fluid like
50
-	 * design.
51
-	 *
52
-	 * @param array List of sub-client names
53
-	 * @since 2015.11
54
-	 * @category Developer
55
-	 */
56
-	private $subPartPath = 'client/html/checkout/confirm/order/coupon/standard/subparts';
57
-	private $subPartNames = array();
58
-
59
-
60
-	/**
61
-	 * Returns the HTML code for insertion into the body.
62
-	 *
63
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
64
-	 * @param array &$tags Result array for the list of tags that are associated to the output
65
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
66
-	 * @return string HTML code
67
-	*/
68
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
69
-	{
70
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
71
-
72
-		$html = '';
73
-		foreach( $this->getSubClients() as $subclient ) {
74
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
-		}
76
-		$view->couponBody = $html;
77
-
78
-		/** client/html/checkout/confirm/order/coupon/standard/template-body
79
-		 * Relative path to the HTML body template of the checkout confirm order coupon client.
80
-		 *
81
-		 * The template file contains the HTML code and processing instructions
82
-		 * to generate the result shown in the body of the frontend. The
83
-		 * configuration string is the path to the template file relative
84
-		 * to the templates directory (usually in client/html/templates).
85
-		 *
86
-		 * You can overwrite the template file configuration in extensions and
87
-		 * provide alternative templates. These alternative templates should be
88
-		 * named like the default one but with the string "standard" replaced by
89
-		 * an unique name. You may use the name of your project for this. If
90
-		 * you've implemented an alternative client class as well, "standard"
91
-		 * (second one) should be replaced by the name of the new class in lower
92
-		 * case.
93
-		 *
94
-		 * @param string Relative path to the template creating code for the HTML page body
95
-		 * @since 2015.11
96
-		 * @category Developer
97
-		 * @see client/html/checkout/confirm/order/coupon/standard/template-header
98
-		 */
99
-		$tplconf = 'client/html/checkout/confirm/order/coupon/standard/template-body';
100
-		$default = 'common/summary/coupon-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->couponHeader = $html;
123
-
124
-		/** client/html/checkout/confirm/order/coupon/standard/template-header
125
-		 * Relative path to the HTML header template of the checkout confirm order coupon 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
-		 * (second one) should be replaced by the name of the new class in lower
139
-		 * case.
140
-		 *
141
-		 * @param string Relative path to the template creating code for the HTML page head
142
-		 * @since 2015.11
143
-		 * @category Developer
144
-		 * @see client/html/checkout/confirm/order/coupon/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/checkout/confirm/order/coupon/standard/template-header';
147
-		$default = 'common/summary/coupon-header-default.php';
148
-
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
151
-
152
-
153
-	/**
154
-	 * Returns the sub-client given by its name.
155
-	 *
156
-	 * @param string $type Name of the client type
157
-	 * @param string|null $name Name of the sub-client (Default if null)
158
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
159
-	 */
160
-	public function getSubClient( $type, $name = null )
161
-	{
162
-		/** client/html/checkout/confirm/order/coupon/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the checkout confirm order coupon html client
164
-		 *
165
-		 * Decorators extend the functionality of a class by adding new aspects
166
-		 * (e.g. log what is currently done), executing the methods of the underlying
167
-		 * class only in certain conditions (e.g. only for logged in users) or
168
-		 * modify what is returned to the caller.
169
-		 *
170
-		 * This option allows you to remove a decorator added via
171
-		 * "client/html/common/decorators/default" before they are wrapped
172
-		 * around the html client.
173
-		 *
174
-		 *  client/html/checkout/confirm/order/coupon/decorators/excludes = array( 'decorator1' )
175
-		 *
176
-		 * This would remove the decorator named "decorator1" from the list of
177
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
-		 * "client/html/common/decorators/default" to the html client.
179
-		 *
180
-		 * @param array List of decorator names
181
-		 * @since 2015.08
182
-		 * @category Developer
183
-		 * @see client/html/common/decorators/default
184
-		 * @see client/html/checkout/confirm/order/coupon/decorators/global
185
-		 * @see client/html/checkout/confirm/order/coupon/decorators/local
186
-		 */
187
-
188
-		/** client/html/checkout/confirm/order/coupon/decorators/global
189
-		 * Adds a list of globally available decorators only to the checkout confirm order coupon html client
190
-		 *
191
-		 * Decorators extend the functionality of a class by adding new aspects
192
-		 * (e.g. log what is currently done), executing the methods of the underlying
193
-		 * class only in certain conditions (e.g. only for logged in users) or
194
-		 * modify what is returned to the caller.
195
-		 *
196
-		 * This option allows you to wrap global decorators
197
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
-		 *
199
-		 *  client/html/checkout/confirm/order/coupon/decorators/global = array( 'decorator1' )
200
-		 *
201
-		 * This would add the decorator named "decorator1" defined by
202
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
-		 *
204
-		 * @param array List of decorator names
205
-		 * @since 2015.08
206
-		 * @category Developer
207
-		 * @see client/html/common/decorators/default
208
-		 * @see client/html/checkout/confirm/order/coupon/decorators/excludes
209
-		 * @see client/html/checkout/confirm/order/coupon/decorators/local
210
-		 */
211
-
212
-		/** client/html/checkout/confirm/order/coupon/decorators/local
213
-		 * Adds a list of local decorators only to the checkout confirm order coupon html client
214
-		 *
215
-		 * Decorators extend the functionality of a class by adding new aspects
216
-		 * (e.g. log what is currently done), executing the methods of the underlying
217
-		 * class only in certain conditions (e.g. only for logged in users) or
218
-		 * modify what is returned to the caller.
219
-		 *
220
-		 * This option allows you to wrap local decorators
221
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
-		 *
223
-		 *  client/html/checkout/confirm/order/coupon/decorators/local = array( 'decorator2' )
224
-		 *
225
-		 * This would add the decorator named "decorator2" defined by
226
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
-		 *
228
-		 * @param array List of decorator names
229
-		 * @since 2015.08
230
-		 * @category Developer
231
-		 * @see client/html/common/decorators/default
232
-		 * @see client/html/checkout/confirm/order/coupon/decorators/excludes
233
-		 * @see client/html/checkout/confirm/order/coupon/decorators/global
234
-		 */
235
-
236
-		return $this->createSubClient( 'checkout/confirm/order/coupon/' . $type, $name );
237
-	}
238
-
239
-
240
-	/**
241
-	 * Returns the list of sub-client names configured for the client.
242
-	 *
243
-	 * @return array List of HTML client names
244
-	 */
245
-	protected function getSubClientNames()
246
-	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
-	}
23
+    /** client/html/checkout/confirm/order/coupon/standard/subparts
24
+     * List of HTML sub-clients rendered within the checkout confirm order coupon section
25
+     *
26
+     * The output of the frontend is composed of the code generated by the HTML
27
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
28
+     * that are responsible for rendering certain sub-parts of the output. The
29
+     * sub-clients can contain HTML clients themselves and therefore a
30
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
31
+     * the output that is placed inside the container of its parent.
32
+     *
33
+     * At first, always the HTML code generated by the parent is printed, then
34
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
35
+     * determines the order of the output of these sub-clients inside the parent
36
+     * container. If the configured list of clients is
37
+     *
38
+     *  array( "subclient1", "subclient2" )
39
+     *
40
+     * you can easily change the order of the output by reordering the subparts:
41
+     *
42
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
43
+     *
44
+     * You can also remove one or more parts if they shouldn't be rendered:
45
+     *
46
+     *  client/html/<clients>/subparts = array( "subclient1" )
47
+     *
48
+     * As the clients only generates structural HTML, the layout defined via CSS
49
+     * should support adding, removing or reordering content by a fluid like
50
+     * design.
51
+     *
52
+     * @param array List of sub-client names
53
+     * @since 2015.11
54
+     * @category Developer
55
+     */
56
+    private $subPartPath = 'client/html/checkout/confirm/order/coupon/standard/subparts';
57
+    private $subPartNames = array();
58
+
59
+
60
+    /**
61
+     * Returns the HTML code for insertion into the body.
62
+     *
63
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
64
+     * @param array &$tags Result array for the list of tags that are associated to the output
65
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
66
+     * @return string HTML code
67
+     */
68
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
69
+    {
70
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
71
+
72
+        $html = '';
73
+        foreach( $this->getSubClients() as $subclient ) {
74
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
+        }
76
+        $view->couponBody = $html;
77
+
78
+        /** client/html/checkout/confirm/order/coupon/standard/template-body
79
+         * Relative path to the HTML body template of the checkout confirm order coupon client.
80
+         *
81
+         * The template file contains the HTML code and processing instructions
82
+         * to generate the result shown in the body of the frontend. The
83
+         * configuration string is the path to the template file relative
84
+         * to the templates directory (usually in client/html/templates).
85
+         *
86
+         * You can overwrite the template file configuration in extensions and
87
+         * provide alternative templates. These alternative templates should be
88
+         * named like the default one but with the string "standard" replaced by
89
+         * an unique name. You may use the name of your project for this. If
90
+         * you've implemented an alternative client class as well, "standard"
91
+         * (second one) should be replaced by the name of the new class in lower
92
+         * case.
93
+         *
94
+         * @param string Relative path to the template creating code for the HTML page body
95
+         * @since 2015.11
96
+         * @category Developer
97
+         * @see client/html/checkout/confirm/order/coupon/standard/template-header
98
+         */
99
+        $tplconf = 'client/html/checkout/confirm/order/coupon/standard/template-body';
100
+        $default = 'common/summary/coupon-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->couponHeader = $html;
123
+
124
+        /** client/html/checkout/confirm/order/coupon/standard/template-header
125
+         * Relative path to the HTML header template of the checkout confirm order coupon 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
+         * (second one) should be replaced by the name of the new class in lower
139
+         * case.
140
+         *
141
+         * @param string Relative path to the template creating code for the HTML page head
142
+         * @since 2015.11
143
+         * @category Developer
144
+         * @see client/html/checkout/confirm/order/coupon/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/checkout/confirm/order/coupon/standard/template-header';
147
+        $default = 'common/summary/coupon-header-default.php';
148
+
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151
+
152
+
153
+    /**
154
+     * Returns the sub-client given by its name.
155
+     *
156
+     * @param string $type Name of the client type
157
+     * @param string|null $name Name of the sub-client (Default if null)
158
+     * @return \Aimeos\Client\Html\Iface Sub-client object
159
+     */
160
+    public function getSubClient( $type, $name = null )
161
+    {
162
+        /** client/html/checkout/confirm/order/coupon/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the checkout confirm order coupon html client
164
+         *
165
+         * Decorators extend the functionality of a class by adding new aspects
166
+         * (e.g. log what is currently done), executing the methods of the underlying
167
+         * class only in certain conditions (e.g. only for logged in users) or
168
+         * modify what is returned to the caller.
169
+         *
170
+         * This option allows you to remove a decorator added via
171
+         * "client/html/common/decorators/default" before they are wrapped
172
+         * around the html client.
173
+         *
174
+         *  client/html/checkout/confirm/order/coupon/decorators/excludes = array( 'decorator1' )
175
+         *
176
+         * This would remove the decorator named "decorator1" from the list of
177
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
+         * "client/html/common/decorators/default" to the html client.
179
+         *
180
+         * @param array List of decorator names
181
+         * @since 2015.08
182
+         * @category Developer
183
+         * @see client/html/common/decorators/default
184
+         * @see client/html/checkout/confirm/order/coupon/decorators/global
185
+         * @see client/html/checkout/confirm/order/coupon/decorators/local
186
+         */
187
+
188
+        /** client/html/checkout/confirm/order/coupon/decorators/global
189
+         * Adds a list of globally available decorators only to the checkout confirm order coupon html client
190
+         *
191
+         * Decorators extend the functionality of a class by adding new aspects
192
+         * (e.g. log what is currently done), executing the methods of the underlying
193
+         * class only in certain conditions (e.g. only for logged in users) or
194
+         * modify what is returned to the caller.
195
+         *
196
+         * This option allows you to wrap global decorators
197
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
+         *
199
+         *  client/html/checkout/confirm/order/coupon/decorators/global = array( 'decorator1' )
200
+         *
201
+         * This would add the decorator named "decorator1" defined by
202
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
+         *
204
+         * @param array List of decorator names
205
+         * @since 2015.08
206
+         * @category Developer
207
+         * @see client/html/common/decorators/default
208
+         * @see client/html/checkout/confirm/order/coupon/decorators/excludes
209
+         * @see client/html/checkout/confirm/order/coupon/decorators/local
210
+         */
211
+
212
+        /** client/html/checkout/confirm/order/coupon/decorators/local
213
+         * Adds a list of local decorators only to the checkout confirm order coupon html client
214
+         *
215
+         * Decorators extend the functionality of a class by adding new aspects
216
+         * (e.g. log what is currently done), executing the methods of the underlying
217
+         * class only in certain conditions (e.g. only for logged in users) or
218
+         * modify what is returned to the caller.
219
+         *
220
+         * This option allows you to wrap local decorators
221
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
+         *
223
+         *  client/html/checkout/confirm/order/coupon/decorators/local = array( 'decorator2' )
224
+         *
225
+         * This would add the decorator named "decorator2" defined by
226
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
+         *
228
+         * @param array List of decorator names
229
+         * @since 2015.08
230
+         * @category Developer
231
+         * @see client/html/common/decorators/default
232
+         * @see client/html/checkout/confirm/order/coupon/decorators/excludes
233
+         * @see client/html/checkout/confirm/order/coupon/decorators/global
234
+         */
235
+
236
+        return $this->createSubClient( 'checkout/confirm/order/coupon/' . $type, $name );
237
+    }
238
+
239
+
240
+    /**
241
+     * Returns the list of sub-client names configured for the client.
242
+     *
243
+     * @return array List of HTML client names
244
+     */
245
+    protected function getSubClientNames()
246
+    {
247
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
+    }
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
66 66
 	 * @return string HTML code
67 67
 	*/
68
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
68
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
69 69
 	{
70
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
70
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
71 71
 
72 72
 		$html = '';
73
-		foreach( $this->getSubClients() as $subclient ) {
74
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
73
+		foreach ($this->getSubClients() as $subclient) {
74
+			$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
75 75
 		}
76 76
 		$view->couponBody = $html;
77 77
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$tplconf = 'client/html/checkout/confirm/order/coupon/standard/template-body';
100 100
 		$default = 'common/summary/coupon-body-default.php';
101 101
 
102
-		return $view->render( $view->config( $tplconf, $default ) );
102
+		return $view->render($view->config($tplconf, $default));
103 103
 	}
104 104
 
105 105
 
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
112 112
 	 * @return string|null String including HTML tags for the header on error
113 113
 	 */
114
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
114
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
115 115
 	{
116
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
116
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
117 117
 
118 118
 		$html = '';
119
-		foreach( $this->getSubClients() as $subclient ) {
120
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
119
+		foreach ($this->getSubClients() as $subclient) {
120
+			$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
121 121
 		}
122 122
 		$view->couponHeader = $html;
123 123
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$tplconf = 'client/html/checkout/confirm/order/coupon/standard/template-header';
147 147
 		$default = 'common/summary/coupon-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
149
+		return $view->render($view->config($tplconf, $default));
150 150
 	}
151 151
 
152 152
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @param string|null $name Name of the sub-client (Default if null)
158 158
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
159 159
 	 */
160
-	public function getSubClient( $type, $name = null )
160
+	public function getSubClient($type, $name = null)
161 161
 	{
162 162
 		/** client/html/checkout/confirm/order/coupon/decorators/excludes
163 163
 		 * Excludes decorators added by the "common" option from the checkout confirm order coupon html client
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		 * @see client/html/checkout/confirm/order/coupon/decorators/global
234 234
 		 */
235 235
 
236
-		return $this->createSubClient( 'checkout/confirm/order/coupon/' . $type, $name );
236
+		return $this->createSubClient('checkout/confirm/order/coupon/'.$type, $name);
237 237
 	}
238 238
 
239 239
 
@@ -244,6 +244,6 @@  discard block
 block discarded – undo
244 244
 	 */
245 245
 	protected function getSubClientNames()
246 246
 	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
247
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
248 248
 	}
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Confirm/Order/Detail/Standard.php 3 patches
Indentation   +232 added lines, -232 removed lines patch added patch discarded remove patch
@@ -18,260 +18,260 @@
 block discarded – undo
18 18
  * @subpackage Html
19 19
  */
20 20
 class Standard
21
-	extends \Aimeos\Client\Html\Common\Summary\Detail\Base
21
+    extends \Aimeos\Client\Html\Common\Summary\Detail\Base
22 22
 {
23
-	/** client/html/checkout/confirm/order/detail/standard/subparts
24
-	 * List of HTML sub-clients rendered within the checkout confirm order detail section
25
-	 *
26
-	 * The output of the frontend is composed of the code generated by the HTML
27
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
28
-	 * that are responsible for rendering certain sub-parts of the output. The
29
-	 * sub-clients can contain HTML clients themselves and therefore a
30
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
31
-	 * the output that is placed inside the container of its parent.
32
-	 *
33
-	 * At first, always the HTML code generated by the parent is printed, then
34
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
35
-	 * determines the order of the output of these sub-clients inside the parent
36
-	 * container. If the configured list of clients is
37
-	 *
38
-	 *  array( "subclient1", "subclient2" )
39
-	 *
40
-	 * you can easily change the order of the output by reordering the subparts:
41
-	 *
42
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
43
-	 *
44
-	 * You can also remove one or more parts if they shouldn't be rendered:
45
-	 *
46
-	 *  client/html/<clients>/subparts = array( "subclient1" )
47
-	 *
48
-	 * As the clients only generates structural HTML, the layout defined via CSS
49
-	 * should support adding, removing or reordering content by a fluid like
50
-	 * design.
51
-	 *
52
-	 * @param array List of sub-client names
53
-	 * @since 2015.11
54
-	 * @category Developer
55
-	 */
56
-	private $subPartPath = 'client/html/checkout/confirm/order/detail/standard/subparts';
57
-	private $subPartNames = array();
58
-	private $cache;
23
+    /** client/html/checkout/confirm/order/detail/standard/subparts
24
+     * List of HTML sub-clients rendered within the checkout confirm order detail section
25
+     *
26
+     * The output of the frontend is composed of the code generated by the HTML
27
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
28
+     * that are responsible for rendering certain sub-parts of the output. The
29
+     * sub-clients can contain HTML clients themselves and therefore a
30
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
31
+     * the output that is placed inside the container of its parent.
32
+     *
33
+     * At first, always the HTML code generated by the parent is printed, then
34
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
35
+     * determines the order of the output of these sub-clients inside the parent
36
+     * container. If the configured list of clients is
37
+     *
38
+     *  array( "subclient1", "subclient2" )
39
+     *
40
+     * you can easily change the order of the output by reordering the subparts:
41
+     *
42
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
43
+     *
44
+     * You can also remove one or more parts if they shouldn't be rendered:
45
+     *
46
+     *  client/html/<clients>/subparts = array( "subclient1" )
47
+     *
48
+     * As the clients only generates structural HTML, the layout defined via CSS
49
+     * should support adding, removing or reordering content by a fluid like
50
+     * design.
51
+     *
52
+     * @param array List of sub-client names
53
+     * @since 2015.11
54
+     * @category Developer
55
+     */
56
+    private $subPartPath = 'client/html/checkout/confirm/order/detail/standard/subparts';
57
+    private $subPartNames = array();
58
+    private $cache;
59 59
 
60 60
 
61
-	/**
62
-	 * Returns the HTML code for insertion into the body.
63
-	 *
64
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
65
-	 * @param array &$tags Result array for the list of tags that are associated to the output
66
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
67
-	 * @return string HTML code
68
-	*/
69
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
70
-	{
71
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
61
+    /**
62
+     * Returns the HTML code for insertion into the body.
63
+     *
64
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
65
+     * @param array &$tags Result array for the list of tags that are associated to the output
66
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
67
+     * @return string HTML code
68
+     */
69
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
70
+    {
71
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
72 72
 
73
-		$html = '';
74
-		foreach( $this->getSubClients() as $subclient ) {
75
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
76
-		}
77
-		$view->detailBody = $html;
73
+        $html = '';
74
+        foreach( $this->getSubClients() as $subclient ) {
75
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
76
+        }
77
+        $view->detailBody = $html;
78 78
 
79
-		/** client/html/checkout/confirm/order/detail/standard/template-body
80
-		 * Relative path to the HTML body template of the checkout confirm order detail 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
-		 * (second one) should be replaced by the name of the new class in lower
93
-		 * case.
94
-		 *
95
-		 * @param string Relative path to the template creating code for the HTML page body
96
-		 * @since 2015.11
97
-		 * @category Developer
98
-		 * @see client/html/checkout/confirm/order/detail/standard/template-header
99
-		 */
100
-		$tplconf = 'client/html/checkout/confirm/order/detail/standard/template-body';
101
-		$default = 'common/summary/detail-body-default.php';
79
+        /** client/html/checkout/confirm/order/detail/standard/template-body
80
+         * Relative path to the HTML body template of the checkout confirm order detail 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
+         * (second one) should be replaced by the name of the new class in lower
93
+         * case.
94
+         *
95
+         * @param string Relative path to the template creating code for the HTML page body
96
+         * @since 2015.11
97
+         * @category Developer
98
+         * @see client/html/checkout/confirm/order/detail/standard/template-header
99
+         */
100
+        $tplconf = 'client/html/checkout/confirm/order/detail/standard/template-body';
101
+        $default = 'common/summary/detail-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->detailHeader = $html;
119
+        $html = '';
120
+        foreach( $this->getSubClients() as $subclient ) {
121
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
122
+        }
123
+        $view->detailHeader = $html;
124 124
 
125
-		/** client/html/checkout/confirm/order/detail/standard/template-header
126
-		 * Relative path to the HTML header template of the checkout confirm order detail 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
-		 * (second one) should be replaced by the name of the new class in lower
140
-		 * case.
141
-		 *
142
-		 * @param string Relative path to the template creating code for the HTML page head
143
-		 * @since 2015.11
144
-		 * @category Developer
145
-		 * @see client/html/checkout/confirm/order/detail/standard/template-body
146
-		 */
147
-		$tplconf = 'client/html/checkout/confirm/order/detail/standard/template-header';
148
-		$default = 'common/summary/detail-header-default.php';
125
+        /** client/html/checkout/confirm/order/detail/standard/template-header
126
+         * Relative path to the HTML header template of the checkout confirm order detail 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
+         * (second one) should be replaced by the name of the new class in lower
140
+         * case.
141
+         *
142
+         * @param string Relative path to the template creating code for the HTML page head
143
+         * @since 2015.11
144
+         * @category Developer
145
+         * @see client/html/checkout/confirm/order/detail/standard/template-body
146
+         */
147
+        $tplconf = 'client/html/checkout/confirm/order/detail/standard/template-header';
148
+        $default = 'common/summary/detail-header-default.php';
149 149
 
150
-		return $view->render( $view->config( $tplconf, $default ) );
151
-	}
150
+        return $view->render( $view->config( $tplconf, $default ) );
151
+    }
152 152
 
153 153
 
154
-	/**
155
-	 * Returns the sub-client given by its name.
156
-	 *
157
-	 * @param string $type Name of the client type
158
-	 * @param string|null $name Name of the sub-client (Default if null)
159
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
160
-	 */
161
-	public function getSubClient( $type, $name = null )
162
-	{
163
-		/** client/html/checkout/confirm/order/detail/decorators/excludes
164
-		 * Excludes decorators added by the "common" option from the checkout confirm order detail html client
165
-		 *
166
-		 * Decorators extend the functionality of a class by adding new aspects
167
-		 * (e.g. log what is currently done), executing the methods of the underlying
168
-		 * class only in certain conditions (e.g. only for logged in users) or
169
-		 * modify what is returned to the caller.
170
-		 *
171
-		 * This option allows you to remove a decorator added via
172
-		 * "client/html/common/decorators/default" before they are wrapped
173
-		 * around the html client.
174
-		 *
175
-		 *  client/html/checkout/confirm/order/detail/decorators/excludes = array( 'decorator1' )
176
-		 *
177
-		 * This would remove the decorator named "decorator1" from the list of
178
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
179
-		 * "client/html/common/decorators/default" to the html client.
180
-		 *
181
-		 * @param array List of decorator names
182
-		 * @since 2015.08
183
-		 * @category Developer
184
-		 * @see client/html/common/decorators/default
185
-		 * @see client/html/checkout/confirm/order/detail/decorators/global
186
-		 * @see client/html/checkout/confirm/order/detail/decorators/local
187
-		 */
154
+    /**
155
+     * Returns the sub-client given by its name.
156
+     *
157
+     * @param string $type Name of the client type
158
+     * @param string|null $name Name of the sub-client (Default if null)
159
+     * @return \Aimeos\Client\Html\Iface Sub-client object
160
+     */
161
+    public function getSubClient( $type, $name = null )
162
+    {
163
+        /** client/html/checkout/confirm/order/detail/decorators/excludes
164
+         * Excludes decorators added by the "common" option from the checkout confirm order detail html client
165
+         *
166
+         * Decorators extend the functionality of a class by adding new aspects
167
+         * (e.g. log what is currently done), executing the methods of the underlying
168
+         * class only in certain conditions (e.g. only for logged in users) or
169
+         * modify what is returned to the caller.
170
+         *
171
+         * This option allows you to remove a decorator added via
172
+         * "client/html/common/decorators/default" before they are wrapped
173
+         * around the html client.
174
+         *
175
+         *  client/html/checkout/confirm/order/detail/decorators/excludes = array( 'decorator1' )
176
+         *
177
+         * This would remove the decorator named "decorator1" from the list of
178
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
179
+         * "client/html/common/decorators/default" to the html client.
180
+         *
181
+         * @param array List of decorator names
182
+         * @since 2015.08
183
+         * @category Developer
184
+         * @see client/html/common/decorators/default
185
+         * @see client/html/checkout/confirm/order/detail/decorators/global
186
+         * @see client/html/checkout/confirm/order/detail/decorators/local
187
+         */
188 188
 
189
-		/** client/html/checkout/confirm/order/detail/decorators/global
190
-		 * Adds a list of globally available decorators only to the checkout confirm order detail html client
191
-		 *
192
-		 * Decorators extend the functionality of a class by adding new aspects
193
-		 * (e.g. log what is currently done), executing the methods of the underlying
194
-		 * class only in certain conditions (e.g. only for logged in users) or
195
-		 * modify what is returned to the caller.
196
-		 *
197
-		 * This option allows you to wrap global decorators
198
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
199
-		 *
200
-		 *  client/html/checkout/confirm/order/detail/decorators/global = array( 'decorator1' )
201
-		 *
202
-		 * This would add the decorator named "decorator1" defined by
203
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
204
-		 *
205
-		 * @param array List of decorator names
206
-		 * @since 2015.08
207
-		 * @category Developer
208
-		 * @see client/html/common/decorators/default
209
-		 * @see client/html/checkout/confirm/order/detail/decorators/excludes
210
-		 * @see client/html/checkout/confirm/order/detail/decorators/local
211
-		 */
189
+        /** client/html/checkout/confirm/order/detail/decorators/global
190
+         * Adds a list of globally available decorators only to the checkout confirm order detail html client
191
+         *
192
+         * Decorators extend the functionality of a class by adding new aspects
193
+         * (e.g. log what is currently done), executing the methods of the underlying
194
+         * class only in certain conditions (e.g. only for logged in users) or
195
+         * modify what is returned to the caller.
196
+         *
197
+         * This option allows you to wrap global decorators
198
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
199
+         *
200
+         *  client/html/checkout/confirm/order/detail/decorators/global = array( 'decorator1' )
201
+         *
202
+         * This would add the decorator named "decorator1" defined by
203
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
204
+         *
205
+         * @param array List of decorator names
206
+         * @since 2015.08
207
+         * @category Developer
208
+         * @see client/html/common/decorators/default
209
+         * @see client/html/checkout/confirm/order/detail/decorators/excludes
210
+         * @see client/html/checkout/confirm/order/detail/decorators/local
211
+         */
212 212
 
213
-		/** client/html/checkout/confirm/order/detail/decorators/local
214
-		 * Adds a list of local decorators only to the checkout confirm order detail html client
215
-		 *
216
-		 * Decorators extend the functionality of a class by adding new aspects
217
-		 * (e.g. log what is currently done), executing the methods of the underlying
218
-		 * class only in certain conditions (e.g. only for logged in users) or
219
-		 * modify what is returned to the caller.
220
-		 *
221
-		 * This option allows you to wrap local decorators
222
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
223
-		 *
224
-		 *  client/html/checkout/confirm/order/detail/decorators/local = array( 'decorator2' )
225
-		 *
226
-		 * This would add the decorator named "decorator2" defined by
227
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
228
-		 *
229
-		 * @param array List of decorator names
230
-		 * @since 2015.08
231
-		 * @category Developer
232
-		 * @see client/html/common/decorators/default
233
-		 * @see client/html/checkout/confirm/order/detail/decorators/excludes
234
-		 * @see client/html/checkout/confirm/order/detail/decorators/global
235
-		 */
213
+        /** client/html/checkout/confirm/order/detail/decorators/local
214
+         * Adds a list of local decorators only to the checkout confirm order detail html client
215
+         *
216
+         * Decorators extend the functionality of a class by adding new aspects
217
+         * (e.g. log what is currently done), executing the methods of the underlying
218
+         * class only in certain conditions (e.g. only for logged in users) or
219
+         * modify what is returned to the caller.
220
+         *
221
+         * This option allows you to wrap local decorators
222
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
223
+         *
224
+         *  client/html/checkout/confirm/order/detail/decorators/local = array( 'decorator2' )
225
+         *
226
+         * This would add the decorator named "decorator2" defined by
227
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
228
+         *
229
+         * @param array List of decorator names
230
+         * @since 2015.08
231
+         * @category Developer
232
+         * @see client/html/common/decorators/default
233
+         * @see client/html/checkout/confirm/order/detail/decorators/excludes
234
+         * @see client/html/checkout/confirm/order/detail/decorators/global
235
+         */
236 236
 
237
-		return $this->createSubClient( 'checkout/confirm/order/detail/' . $type, $name );
238
-	}
237
+        return $this->createSubClient( 'checkout/confirm/order/detail/' . $type, $name );
238
+    }
239 239
 
240 240
 
241
-	/**
242
-	 * Returns the list of sub-client names configured for the client.
243
-	 *
244
-	 * @return array List of HTML client names
245
-	 */
246
-	protected function getSubClientNames()
247
-	{
248
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
249
-	}
241
+    /**
242
+     * Returns the list of sub-client names configured for the client.
243
+     *
244
+     * @return array List of HTML client names
245
+     */
246
+    protected function getSubClientNames()
247
+    {
248
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
249
+    }
250 250
 
251 251
 
252
-	/**
253
-	 * Sets the necessary parameter values in the view.
254
-	 *
255
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
256
-	 * @param array &$tags Result array for the list of tags that are associated to the output
257
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
258
-	 * @return \Aimeos\MW\View\Iface Modified view object
259
-	 */
260
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
261
-	{
262
-		if( !isset( $this->cache ) )
263
-		{
264
-			$view = parent::setViewParams( $view );
252
+    /**
253
+     * Sets the necessary parameter values in the view.
254
+     *
255
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
256
+     * @param array &$tags Result array for the list of tags that are associated to the output
257
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
258
+     * @return \Aimeos\MW\View\Iface Modified view object
259
+     */
260
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
261
+    {
262
+        if( !isset( $this->cache ) )
263
+        {
264
+            $view = parent::setViewParams( $view );
265 265
 
266
-			if( $view->confirmOrderItem->getPaymentStatus() >= $this->getDownloadPaymentStatus() ) {
267
-				$view->summaryShowDownloadAttributes = true;
268
-			}
266
+            if( $view->confirmOrderItem->getPaymentStatus() >= $this->getDownloadPaymentStatus() ) {
267
+                $view->summaryShowDownloadAttributes = true;
268
+            }
269 269
 
270
-			$view->summaryTaxRates = $this->getTaxRates( $view->summaryBasket );
270
+            $view->summaryTaxRates = $this->getTaxRates( $view->summaryBasket );
271 271
 
272
-			$this->cache = $view;
273
-		}
272
+            $this->cache = $view;
273
+        }
274 274
 
275
-		return $this->cache;
276
-	}
275
+        return $this->cache;
276
+    }
277 277
 }
278 278
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
67 67
 	 * @return string HTML code
68 68
 	*/
69
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
69
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
70 70
 	{
71
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
71
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
72 72
 
73 73
 		$html = '';
74
-		foreach( $this->getSubClients() as $subclient ) {
75
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
74
+		foreach ($this->getSubClients() as $subclient) {
75
+			$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
76 76
 		}
77 77
 		$view->detailBody = $html;
78 78
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$tplconf = 'client/html/checkout/confirm/order/detail/standard/template-body';
101 101
 		$default = 'common/summary/detail-body-default.php';
102 102
 
103
-		return $view->render( $view->config( $tplconf, $default ) );
103
+		return $view->render($view->config($tplconf, $default));
104 104
 	}
105 105
 
106 106
 
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113 113
 	 * @return string|null String including HTML tags for the header on error
114 114
 	 */
115
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
115
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
116 116
 	{
117
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
117
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
118 118
 
119 119
 		$html = '';
120
-		foreach( $this->getSubClients() as $subclient ) {
121
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
120
+		foreach ($this->getSubClients() as $subclient) {
121
+			$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
122 122
 		}
123 123
 		$view->detailHeader = $html;
124 124
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		$tplconf = 'client/html/checkout/confirm/order/detail/standard/template-header';
148 148
 		$default = 'common/summary/detail-header-default.php';
149 149
 
150
-		return $view->render( $view->config( $tplconf, $default ) );
150
+		return $view->render($view->config($tplconf, $default));
151 151
 	}
152 152
 
153 153
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 * @param string|null $name Name of the sub-client (Default if null)
159 159
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
160 160
 	 */
161
-	public function getSubClient( $type, $name = null )
161
+	public function getSubClient($type, $name = null)
162 162
 	{
163 163
 		/** client/html/checkout/confirm/order/detail/decorators/excludes
164 164
 		 * Excludes decorators added by the "common" option from the checkout confirm order detail html client
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 		 * @see client/html/checkout/confirm/order/detail/decorators/global
235 235
 		 */
236 236
 
237
-		return $this->createSubClient( 'checkout/confirm/order/detail/' . $type, $name );
237
+		return $this->createSubClient('checkout/confirm/order/detail/'.$type, $name);
238 238
 	}
239 239
 
240 240
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	 */
246 246
 	protected function getSubClientNames()
247 247
 	{
248
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
249 249
 	}
250 250
 
251 251
 
@@ -257,17 +257,17 @@  discard block
 block discarded – undo
257 257
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
258 258
 	 * @return \Aimeos\MW\View\Iface Modified view object
259 259
 	 */
260
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
260
+	protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
261 261
 	{
262
-		if( !isset( $this->cache ) )
262
+		if (!isset($this->cache))
263 263
 		{
264
-			$view = parent::setViewParams( $view );
264
+			$view = parent::setViewParams($view);
265 265
 
266
-			if( $view->confirmOrderItem->getPaymentStatus() >= $this->getDownloadPaymentStatus() ) {
266
+			if ($view->confirmOrderItem->getPaymentStatus() >= $this->getDownloadPaymentStatus()) {
267 267
 				$view->summaryShowDownloadAttributes = true;
268 268
 			}
269 269
 
270
-			$view->summaryTaxRates = $this->getTaxRates( $view->summaryBasket );
270
+			$view->summaryTaxRates = $this->getTaxRates($view->summaryBasket);
271 271
 
272 272
 			$this->cache = $view;
273 273
 		}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Confirm/Order/Standard.php 3 patches
Indentation   +301 added lines, -301 removed lines patch added patch discarded remove patch
@@ -18,306 +18,306 @@
 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/confirm/order/standard/subparts
25
-	 * List of HTML sub-clients rendered within the checkout confirm order 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.02
55
-	 * @category Developer
56
-	 */
57
-	private $subPartPath = 'client/html/checkout/confirm/order/standard/subparts';
58
-
59
-	/** client/html/checkout/confirm/order/address/name
60
-	 * Name of the address part used by the checkout confirm order client implementation
61
-	 *
62
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Confirm\Details\Address\Myname".
63
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
64
-	 *
65
-	 * @param string Last part of the client class name
66
-	 * @since 2015.02
67
-	 * @category Developer
68
-	 */
69
-
70
-	/** client/html/checkout/confirm/order/service/name
71
-	 * Name of the service part used by the checkout confirm order client implementation
72
-	 *
73
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Confirm\Details\Service\Myname".
74
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
75
-	 *
76
-	 * @param string Last part of the client class name
77
-	 * @since 2015.02
78
-	 * @category Developer
79
-	 */
80
-
81
-	/** client/html/checkout/confirm/order/coupon/name
82
-	 * Name of the coupon part used by the checkout confirm order client implementation
83
-	 *
84
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Confirm\Details\Coupon\Myname".
85
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
86
-	 *
87
-	 * @param string Last part of the client class name
88
-	 * @since 2014.05
89
-	 * @category Developer
90
-	 */
91
-
92
-	/** client/html/checkout/confirm/order/detail/name
93
-	 * Name of the detail part used by the checkout confirm order client implementation
94
-	 *
95
-	 * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Confirm\Details\Detail\Myname".
96
-	 * The name is case-sensitive and you should avoid camel case names like "MyName".
97
-	 *
98
-	 * @param string Last part of the client class name
99
-	 * @since 2015.02
100
-	 * @category Developer
101
-	 */
102
-	private $subPartNames = array( 'address', 'service', 'coupon', 'detail' );
103
-
104
-	private $cache;
105
-
106
-
107
-	/**
108
-	 * Returns the HTML code for insertion into the body.
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 HTML code
114
-	 */
115
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
116
-	{
117
-		$view = $this->getView();
118
-		$view = $this->setViewParams( $view, $tags, $expire );
119
-
120
-		$html = '';
121
-		foreach( $this->getSubClients() as $subclient ) {
122
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
123
-		}
124
-		$view->orderBody = $html;
125
-
126
-		/** client/html/checkout/confirm/order/standard/template-body
127
-		 * Relative path to the HTML body template of the checkout confirm order client.
128
-		 *
129
-		 * The template file contains the HTML code and processing instructions
130
-		 * to generate the result shown in the body of the frontend. The
131
-		 * configuration string is the path to the template file relative
132
-		 * to the templates directory (usually 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 body
142
-		 * @since 2015.02
143
-		 * @category Developer
144
-		 * @see client/html/checkout/confirm/order/standard/template-header
145
-		 */
146
-		$tplconf = 'client/html/checkout/confirm/order/standard/template-body';
147
-		$default = 'checkout/confirm/order-body-default.php';
148
-
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
151
-
152
-
153
-	/**
154
-	 * Returns the HTML string for insertion into the header.
155
-	 *
156
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
157
-	 * @param array &$tags Result array for the list of tags that are associated to the output
158
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
159
-	 * @return string|null String including HTML tags for the header on error
160
-	 */
161
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
162
-	{
163
-		$view = $this->getView();
164
-		$view = $this->setViewParams( $view, $tags, $expire );
165
-
166
-		$html = '';
167
-		foreach( $this->getSubClients() as $subclient ) {
168
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
169
-		}
170
-		$view->orderHeader = $html;
171
-
172
-		/** client/html/checkout/confirm/order/standard/template-header
173
-		 * Relative path to the HTML header template of the checkout confirm order client.
174
-		 *
175
-		 * The template file contains the HTML code and processing instructions
176
-		 * to generate the HTML code that is inserted into the HTML page header
177
-		 * of the rendered page in the frontend. The configuration string is the
178
-		 * path to the template file relative to the templates directory (usually
179
-		 * in client/html/templates).
180
-		 *
181
-		 * You can overwrite the template file configuration in extensions and
182
-		 * provide alternative templates. These alternative templates should be
183
-		 * named like the default one but with the string "standard" replaced by
184
-		 * an unique name. You may use the name of your project for this. If
185
-		 * you've implemented an alternative client class as well, "standard"
186
-		 * should be replaced by the name of the new class.
187
-		 *
188
-		 * @param string Relative path to the template creating code for the HTML page head
189
-		 * @since 2015.02
190
-		 * @category Developer
191
-		 * @see client/html/checkout/confirm/order/standard/template-body
192
-		 */
193
-		$tplconf = 'client/html/checkout/confirm/order/standard/template-header';
194
-		$default = 'checkout/confirm/order-header-default.php';
195
-
196
-		return $view->render( $view->config( $tplconf, $default ) );
197
-	}
198
-
199
-
200
-	/**
201
-	 * Returns the sub-client given by its name.
202
-	 *
203
-	 * @param string $type Name of the client type
204
-	 * @param string|null $name Name of the sub-client (Default if null)
205
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
206
-	 */
207
-	public function getSubClient( $type, $name = null )
208
-	{
209
-		/** client/html/checkout/confirm/order/decorators/excludes
210
-		 * Excludes decorators added by the "common" option from the checkout confirm order html client
211
-		 *
212
-		 * Decorators extend the functionality of a class by adding new aspects
213
-		 * (e.g. log what is currently done), executing the methods of the underlying
214
-		 * class only in certain conditions (e.g. only for logged in users) or
215
-		 * modify what is returned to the caller.
216
-		 *
217
-		 * This option allows you to remove a decorator added via
218
-		 * "client/html/common/decorators/default" before they are wrapped
219
-		 * around the html client.
220
-		 *
221
-		 *  client/html/checkout/confirm/order/decorators/excludes = array( 'decorator1' )
222
-		 *
223
-		 * This would remove the decorator named "decorator1" from the list of
224
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
225
-		 * "client/html/common/decorators/default" to the html client.
226
-		 *
227
-		 * @param array List of decorator names
228
-		 * @since 2015.08
229
-		 * @category Developer
230
-		 * @see client/html/common/decorators/default
231
-		 * @see client/html/checkout/confirm/order/decorators/global
232
-		 * @see client/html/checkout/confirm/order/decorators/local
233
-		 */
234
-
235
-		/** client/html/checkout/confirm/order/decorators/global
236
-		 * Adds a list of globally available decorators only to the checkout confirm order html client
237
-		 *
238
-		 * Decorators extend the functionality of a class by adding new aspects
239
-		 * (e.g. log what is currently done), executing the methods of the underlying
240
-		 * class only in certain conditions (e.g. only for logged in users) or
241
-		 * modify what is returned to the caller.
242
-		 *
243
-		 * This option allows you to wrap global decorators
244
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
245
-		 *
246
-		 *  client/html/checkout/confirm/order/decorators/global = array( 'decorator1' )
247
-		 *
248
-		 * This would add the decorator named "decorator1" defined by
249
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
250
-		 *
251
-		 * @param array List of decorator names
252
-		 * @since 2015.08
253
-		 * @category Developer
254
-		 * @see client/html/common/decorators/default
255
-		 * @see client/html/checkout/confirm/order/decorators/excludes
256
-		 * @see client/html/checkout/confirm/order/decorators/local
257
-		 */
258
-
259
-		/** client/html/checkout/confirm/order/decorators/local
260
-		 * Adds a list of local decorators only to the checkout confirm order html client
261
-		 *
262
-		 * Decorators extend the functionality of a class by adding new aspects
263
-		 * (e.g. log what is currently done), executing the methods of the underlying
264
-		 * class only in certain conditions (e.g. only for logged in users) or
265
-		 * modify what is returned to the caller.
266
-		 *
267
-		 * This option allows you to wrap local decorators
268
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
269
-		 *
270
-		 *  client/html/checkout/confirm/order/decorators/local = array( 'decorator2' )
271
-		 *
272
-		 * This would add the decorator named "decorator2" defined by
273
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
274
-		 *
275
-		 * @param array List of decorator names
276
-		 * @since 2015.08
277
-		 * @category Developer
278
-		 * @see client/html/common/decorators/default
279
-		 * @see client/html/checkout/confirm/order/decorators/excludes
280
-		 * @see client/html/checkout/confirm/order/decorators/global
281
-		 */
282
-
283
-		return $this->createSubClient( 'checkout/confirm/order/' . $type, $name );
284
-	}
285
-
286
-
287
-	/**
288
-	 * Returns the list of sub-client names configured for the client.
289
-	 *
290
-	 * @return array List of HTML client names
291
-	 */
292
-	protected function getSubClientNames()
293
-	{
294
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
295
-	}
296
-
297
-
298
-	/**
299
-	 * Sets the necessary parameter values in the view.
300
-	 *
301
-	 * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
302
-	 * @param array &$tags Result array for the list of tags that are associated to the output
303
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
304
-	 * @return \Aimeos\MW\View\Iface Modified view object
305
-	 */
306
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
307
-	{
308
-		if( !isset( $this->cache ) )
309
-		{
310
-			if( isset( $view->confirmOrderItem ) )
311
-			{
312
-				$context = $this->getContext();
313
-				$manager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' );
314
-
315
-				$view->summaryBasket = $manager->load( $view->confirmOrderItem->getBaseId() );
316
-			}
317
-
318
-			$this->cache = $view;
319
-		}
320
-
321
-		return $this->cache;
322
-	}
24
+    /** client/html/checkout/confirm/order/standard/subparts
25
+     * List of HTML sub-clients rendered within the checkout confirm order 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.02
55
+     * @category Developer
56
+     */
57
+    private $subPartPath = 'client/html/checkout/confirm/order/standard/subparts';
58
+
59
+    /** client/html/checkout/confirm/order/address/name
60
+     * Name of the address part used by the checkout confirm order client implementation
61
+     *
62
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Confirm\Details\Address\Myname".
63
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
64
+     *
65
+     * @param string Last part of the client class name
66
+     * @since 2015.02
67
+     * @category Developer
68
+     */
69
+
70
+    /** client/html/checkout/confirm/order/service/name
71
+     * Name of the service part used by the checkout confirm order client implementation
72
+     *
73
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Confirm\Details\Service\Myname".
74
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
75
+     *
76
+     * @param string Last part of the client class name
77
+     * @since 2015.02
78
+     * @category Developer
79
+     */
80
+
81
+    /** client/html/checkout/confirm/order/coupon/name
82
+     * Name of the coupon part used by the checkout confirm order client implementation
83
+     *
84
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Confirm\Details\Coupon\Myname".
85
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
86
+     *
87
+     * @param string Last part of the client class name
88
+     * @since 2014.05
89
+     * @category Developer
90
+     */
91
+
92
+    /** client/html/checkout/confirm/order/detail/name
93
+     * Name of the detail part used by the checkout confirm order client implementation
94
+     *
95
+     * Use "Myname" if your class is named "\Aimeos\Client\Html\Checkout\Confirm\Details\Detail\Myname".
96
+     * The name is case-sensitive and you should avoid camel case names like "MyName".
97
+     *
98
+     * @param string Last part of the client class name
99
+     * @since 2015.02
100
+     * @category Developer
101
+     */
102
+    private $subPartNames = array( 'address', 'service', 'coupon', 'detail' );
103
+
104
+    private $cache;
105
+
106
+
107
+    /**
108
+     * Returns the HTML code for insertion into the body.
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 HTML code
114
+     */
115
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
116
+    {
117
+        $view = $this->getView();
118
+        $view = $this->setViewParams( $view, $tags, $expire );
119
+
120
+        $html = '';
121
+        foreach( $this->getSubClients() as $subclient ) {
122
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
123
+        }
124
+        $view->orderBody = $html;
125
+
126
+        /** client/html/checkout/confirm/order/standard/template-body
127
+         * Relative path to the HTML body template of the checkout confirm order client.
128
+         *
129
+         * The template file contains the HTML code and processing instructions
130
+         * to generate the result shown in the body of the frontend. The
131
+         * configuration string is the path to the template file relative
132
+         * to the templates directory (usually 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 body
142
+         * @since 2015.02
143
+         * @category Developer
144
+         * @see client/html/checkout/confirm/order/standard/template-header
145
+         */
146
+        $tplconf = 'client/html/checkout/confirm/order/standard/template-body';
147
+        $default = 'checkout/confirm/order-body-default.php';
148
+
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151
+
152
+
153
+    /**
154
+     * Returns the HTML string for insertion into the header.
155
+     *
156
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
157
+     * @param array &$tags Result array for the list of tags that are associated to the output
158
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
159
+     * @return string|null String including HTML tags for the header on error
160
+     */
161
+    public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
162
+    {
163
+        $view = $this->getView();
164
+        $view = $this->setViewParams( $view, $tags, $expire );
165
+
166
+        $html = '';
167
+        foreach( $this->getSubClients() as $subclient ) {
168
+            $html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
169
+        }
170
+        $view->orderHeader = $html;
171
+
172
+        /** client/html/checkout/confirm/order/standard/template-header
173
+         * Relative path to the HTML header template of the checkout confirm order client.
174
+         *
175
+         * The template file contains the HTML code and processing instructions
176
+         * to generate the HTML code that is inserted into the HTML page header
177
+         * of the rendered page in the frontend. The configuration string is the
178
+         * path to the template file relative to the templates directory (usually
179
+         * in client/html/templates).
180
+         *
181
+         * You can overwrite the template file configuration in extensions and
182
+         * provide alternative templates. These alternative templates should be
183
+         * named like the default one but with the string "standard" replaced by
184
+         * an unique name. You may use the name of your project for this. If
185
+         * you've implemented an alternative client class as well, "standard"
186
+         * should be replaced by the name of the new class.
187
+         *
188
+         * @param string Relative path to the template creating code for the HTML page head
189
+         * @since 2015.02
190
+         * @category Developer
191
+         * @see client/html/checkout/confirm/order/standard/template-body
192
+         */
193
+        $tplconf = 'client/html/checkout/confirm/order/standard/template-header';
194
+        $default = 'checkout/confirm/order-header-default.php';
195
+
196
+        return $view->render( $view->config( $tplconf, $default ) );
197
+    }
198
+
199
+
200
+    /**
201
+     * Returns the sub-client given by its name.
202
+     *
203
+     * @param string $type Name of the client type
204
+     * @param string|null $name Name of the sub-client (Default if null)
205
+     * @return \Aimeos\Client\Html\Iface Sub-client object
206
+     */
207
+    public function getSubClient( $type, $name = null )
208
+    {
209
+        /** client/html/checkout/confirm/order/decorators/excludes
210
+         * Excludes decorators added by the "common" option from the checkout confirm order html client
211
+         *
212
+         * Decorators extend the functionality of a class by adding new aspects
213
+         * (e.g. log what is currently done), executing the methods of the underlying
214
+         * class only in certain conditions (e.g. only for logged in users) or
215
+         * modify what is returned to the caller.
216
+         *
217
+         * This option allows you to remove a decorator added via
218
+         * "client/html/common/decorators/default" before they are wrapped
219
+         * around the html client.
220
+         *
221
+         *  client/html/checkout/confirm/order/decorators/excludes = array( 'decorator1' )
222
+         *
223
+         * This would remove the decorator named "decorator1" from the list of
224
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
225
+         * "client/html/common/decorators/default" to the html client.
226
+         *
227
+         * @param array List of decorator names
228
+         * @since 2015.08
229
+         * @category Developer
230
+         * @see client/html/common/decorators/default
231
+         * @see client/html/checkout/confirm/order/decorators/global
232
+         * @see client/html/checkout/confirm/order/decorators/local
233
+         */
234
+
235
+        /** client/html/checkout/confirm/order/decorators/global
236
+         * Adds a list of globally available decorators only to the checkout confirm order html client
237
+         *
238
+         * Decorators extend the functionality of a class by adding new aspects
239
+         * (e.g. log what is currently done), executing the methods of the underlying
240
+         * class only in certain conditions (e.g. only for logged in users) or
241
+         * modify what is returned to the caller.
242
+         *
243
+         * This option allows you to wrap global decorators
244
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
245
+         *
246
+         *  client/html/checkout/confirm/order/decorators/global = array( 'decorator1' )
247
+         *
248
+         * This would add the decorator named "decorator1" defined by
249
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
250
+         *
251
+         * @param array List of decorator names
252
+         * @since 2015.08
253
+         * @category Developer
254
+         * @see client/html/common/decorators/default
255
+         * @see client/html/checkout/confirm/order/decorators/excludes
256
+         * @see client/html/checkout/confirm/order/decorators/local
257
+         */
258
+
259
+        /** client/html/checkout/confirm/order/decorators/local
260
+         * Adds a list of local decorators only to the checkout confirm order html client
261
+         *
262
+         * Decorators extend the functionality of a class by adding new aspects
263
+         * (e.g. log what is currently done), executing the methods of the underlying
264
+         * class only in certain conditions (e.g. only for logged in users) or
265
+         * modify what is returned to the caller.
266
+         *
267
+         * This option allows you to wrap local decorators
268
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
269
+         *
270
+         *  client/html/checkout/confirm/order/decorators/local = array( 'decorator2' )
271
+         *
272
+         * This would add the decorator named "decorator2" defined by
273
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
274
+         *
275
+         * @param array List of decorator names
276
+         * @since 2015.08
277
+         * @category Developer
278
+         * @see client/html/common/decorators/default
279
+         * @see client/html/checkout/confirm/order/decorators/excludes
280
+         * @see client/html/checkout/confirm/order/decorators/global
281
+         */
282
+
283
+        return $this->createSubClient( 'checkout/confirm/order/' . $type, $name );
284
+    }
285
+
286
+
287
+    /**
288
+     * Returns the list of sub-client names configured for the client.
289
+     *
290
+     * @return array List of HTML client names
291
+     */
292
+    protected function getSubClientNames()
293
+    {
294
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
295
+    }
296
+
297
+
298
+    /**
299
+     * Sets the necessary parameter values in the view.
300
+     *
301
+     * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
302
+     * @param array &$tags Result array for the list of tags that are associated to the output
303
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
304
+     * @return \Aimeos\MW\View\Iface Modified view object
305
+     */
306
+    protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
307
+    {
308
+        if( !isset( $this->cache ) )
309
+        {
310
+            if( isset( $view->confirmOrderItem ) )
311
+            {
312
+                $context = $this->getContext();
313
+                $manager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' );
314
+
315
+                $view->summaryBasket = $manager->load( $view->confirmOrderItem->getBaseId() );
316
+            }
317
+
318
+            $this->cache = $view;
319
+        }
320
+
321
+        return $this->cache;
322
+    }
323 323
 }
324 324
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @since 2015.02
100 100
 	 * @category Developer
101 101
 	 */
102
-	private $subPartNames = array( 'address', 'service', 'coupon', 'detail' );
102
+	private $subPartNames = array('address', 'service', 'coupon', 'detail');
103 103
 
104 104
 	private $cache;
105 105
 
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113 113
 	 * @return string HTML code
114 114
 	 */
115
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
115
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
116 116
 	{
117 117
 		$view = $this->getView();
118
-		$view = $this->setViewParams( $view, $tags, $expire );
118
+		$view = $this->setViewParams($view, $tags, $expire);
119 119
 
120 120
 		$html = '';
121
-		foreach( $this->getSubClients() as $subclient ) {
122
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
121
+		foreach ($this->getSubClients() as $subclient) {
122
+			$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
123 123
 		}
124 124
 		$view->orderBody = $html;
125 125
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$tplconf = 'client/html/checkout/confirm/order/standard/template-body';
147 147
 		$default = 'checkout/confirm/order-body-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
149
+		return $view->render($view->config($tplconf, $default));
150 150
 	}
151 151
 
152 152
 
@@ -158,14 +158,14 @@  discard block
 block discarded – undo
158 158
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
159 159
 	 * @return string|null String including HTML tags for the header on error
160 160
 	 */
161
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
161
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
162 162
 	{
163 163
 		$view = $this->getView();
164
-		$view = $this->setViewParams( $view, $tags, $expire );
164
+		$view = $this->setViewParams($view, $tags, $expire);
165 165
 
166 166
 		$html = '';
167
-		foreach( $this->getSubClients() as $subclient ) {
168
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
167
+		foreach ($this->getSubClients() as $subclient) {
168
+			$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
169 169
 		}
170 170
 		$view->orderHeader = $html;
171 171
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		$tplconf = 'client/html/checkout/confirm/order/standard/template-header';
194 194
 		$default = 'checkout/confirm/order-header-default.php';
195 195
 
196
-		return $view->render( $view->config( $tplconf, $default ) );
196
+		return $view->render($view->config($tplconf, $default));
197 197
 	}
198 198
 
199 199
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	 * @param string|null $name Name of the sub-client (Default if null)
205 205
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
206 206
 	 */
207
-	public function getSubClient( $type, $name = null )
207
+	public function getSubClient($type, $name = null)
208 208
 	{
209 209
 		/** client/html/checkout/confirm/order/decorators/excludes
210 210
 		 * Excludes decorators added by the "common" option from the checkout confirm order html client
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 		 * @see client/html/checkout/confirm/order/decorators/global
281 281
 		 */
282 282
 
283
-		return $this->createSubClient( 'checkout/confirm/order/' . $type, $name );
283
+		return $this->createSubClient('checkout/confirm/order/'.$type, $name);
284 284
 	}
285 285
 
286 286
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	 */
292 292
 	protected function getSubClientNames()
293 293
 	{
294
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
294
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
295 295
 	}
296 296
 
297 297
 
@@ -303,16 +303,16 @@  discard block
 block discarded – undo
303 303
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
304 304
 	 * @return \Aimeos\MW\View\Iface Modified view object
305 305
 	 */
306
-	protected function setViewParams( \Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null )
306
+	protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
307 307
 	{
308
-		if( !isset( $this->cache ) )
308
+		if (!isset($this->cache))
309 309
 		{
310
-			if( isset( $view->confirmOrderItem ) )
310
+			if (isset($view->confirmOrderItem))
311 311
 			{
312 312
 				$context = $this->getContext();
313
-				$manager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' );
313
+				$manager = \Aimeos\MShop\Factory::createManager($context, 'order/base');
314 314
 
315
-				$view->summaryBasket = $manager->load( $view->confirmOrderItem->getBaseId() );
315
+				$view->summaryBasket = $manager->load($view->confirmOrderItem->getBaseId());
316 316
 			}
317 317
 
318 318
 			$this->cache = $view;
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Confirm/Order/Address/Standard.php 3 patches
Indentation   +227 added lines, -227 removed lines patch added patch discarded remove patch
@@ -18,232 +18,232 @@
 block discarded – undo
18 18
  * @subpackage Html
19 19
  */
20 20
 class Standard
21
-	extends \Aimeos\Client\Html\Common\Summary\Address\Base
21
+    extends \Aimeos\Client\Html\Common\Summary\Address\Base
22 22
 {
23
-	/** client/html/checkout/confirm/order/address/standard/subparts
24
-	 * List of HTML sub-clients rendered within the checkout confirm order address section
25
-	 *
26
-	 * The output of the frontend is composed of the code generated by the HTML
27
-	 * clients. Each HTML client can consist of serveral (or none) sub-clients
28
-	 * that are responsible for rendering certain sub-parts of the output. The
29
-	 * sub-clients can contain HTML clients themselves and therefore a
30
-	 * hierarchical tree of HTML clients is composed. Each HTML client creates
31
-	 * the output that is placed inside the container of its parent.
32
-	 *
33
-	 * At first, always the HTML code generated by the parent is printed, then
34
-	 * the HTML code of its sub-clients. The order of the HTML sub-clients
35
-	 * determines the order of the output of these sub-clients inside the parent
36
-	 * container. If the configured list of clients is
37
-	 *
38
-	 *  array( "subclient1", "subclient2" )
39
-	 *
40
-	 * you can easily change the order of the output by reordering the subparts:
41
-	 *
42
-	 *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
43
-	 *
44
-	 * You can also remove one or more parts if they shouldn't be rendered:
45
-	 *
46
-	 *  client/html/<clients>/subparts = array( "subclient1" )
47
-	 *
48
-	 * As the clients only generates structural HTML, the layout defined via CSS
49
-	 * should support adding, removing or reordering content by a fluid like
50
-	 * design.
51
-	 *
52
-	 * @param array List of sub-client names
53
-	 * @since 2015.11
54
-	 * @category Developer
55
-	 */
56
-	private $subPartPath = 'client/html/checkout/confirm/order/address/standard/subparts';
57
-	private $subPartNames = array();
58
-
59
-
60
-	/**
61
-	 * Returns the HTML code for insertion into the body.
62
-	 *
63
-	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
64
-	 * @param array &$tags Result array for the list of tags that are associated to the output
65
-	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
66
-	 * @return string HTML code
67
-	*/
68
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
69
-	{
70
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
71
-
72
-		$html = '';
73
-		foreach( $this->getSubClients() as $subclient ) {
74
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
-		}
76
-		$view->addressBody = $html;
77
-
78
-		/** client/html/checkout/confirm/order/address/standard/template-body
79
-		 * Relative path to the HTML body template of the checkout confirm order address client.
80
-		 *
81
-		 * The template file contains the HTML code and processing instructions
82
-		 * to generate the result shown in the body of the frontend. The
83
-		 * configuration string is the path to the template file relative
84
-		 * to the templates directory (usually in client/html/templates).
85
-		 *
86
-		 * You can overwrite the template file configuration in extensions and
87
-		 * provide alternative templates. These alternative templates should be
88
-		 * named like the default one but with the string "standard" replaced by
89
-		 * an unique name. You may use the name of your project for this. If
90
-		 * you've implemented an alternative client class as well, "standard"
91
-		 * (second one) should be replaced by the name of the new class in lower
92
-		 * case.
93
-		 *
94
-		 * @param string Relative path to the template creating code for the HTML page body
95
-		 * @since 2015.11
96
-		 * @category Developer
97
-		 * @see client/html/checkout/confirm/order/address/standard/template-header
98
-		 */
99
-		$tplconf = 'client/html/checkout/confirm/order/address/standard/template-body';
100
-		$default = 'common/summary/address-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->addressHeader = $html;
123
-
124
-		/** client/html/checkout/confirm/order/address/standard/template-header
125
-		 * Relative path to the HTML header template of the checkout confirm order address 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
-		 * (second one) should be replaced by the name of the new class in lower
139
-		 * case.
140
-		 *
141
-		 * @param string Relative path to the template creating code for the HTML page head
142
-		 * @since 2015.11
143
-		 * @category Developer
144
-		 * @see client/html/checkout/confirm/order/address/standard/template-body
145
-		 */
146
-		$tplconf = 'client/html/checkout/confirm/order/address/standard/template-header';
147
-		$default = 'common/summary/address-header-default.php';
148
-
149
-		return $view->render( $view->config( $tplconf, $default ) );
150
-	}
151
-
152
-
153
-	/**
154
-	 * Returns the sub-client given by its name.
155
-	 *
156
-	 * @param string $type Name of the client type
157
-	 * @param string|null $name Name of the sub-client (Default if null)
158
-	 * @return \Aimeos\Client\Html\Iface Sub-client object
159
-	 */
160
-	public function getSubClient( $type, $name = null )
161
-	{
162
-		/** client/html/checkout/confirm/order/address/decorators/excludes
163
-		 * Excludes decorators added by the "common" option from the checkout confirm order address html client
164
-		 *
165
-		 * Decorators extend the functionality of a class by adding new aspects
166
-		 * (e.g. log what is currently done), executing the methods of the underlying
167
-		 * class only in certain conditions (e.g. only for logged in users) or
168
-		 * modify what is returned to the caller.
169
-		 *
170
-		 * This option allows you to remove a decorator added via
171
-		 * "client/html/common/decorators/default" before they are wrapped
172
-		 * around the html client.
173
-		 *
174
-		 *  client/html/checkout/confirm/order/address/decorators/excludes = array( 'decorator1' )
175
-		 *
176
-		 * This would remove the decorator named "decorator1" from the list of
177
-		 * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
-		 * "client/html/common/decorators/default" to the html client.
179
-		 *
180
-		 * @param array List of decorator names
181
-		 * @since 2015.08
182
-		 * @category Developer
183
-		 * @see client/html/common/decorators/default
184
-		 * @see client/html/checkout/confirm/order/address/decorators/global
185
-		 * @see client/html/checkout/confirm/order/address/decorators/local
186
-		 */
187
-
188
-		/** client/html/checkout/confirm/order/address/decorators/global
189
-		 * Adds a list of globally available decorators only to the checkout confirm order address html client
190
-		 *
191
-		 * Decorators extend the functionality of a class by adding new aspects
192
-		 * (e.g. log what is currently done), executing the methods of the underlying
193
-		 * class only in certain conditions (e.g. only for logged in users) or
194
-		 * modify what is returned to the caller.
195
-		 *
196
-		 * This option allows you to wrap global decorators
197
-		 * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
-		 *
199
-		 *  client/html/checkout/confirm/order/address/decorators/global = array( 'decorator1' )
200
-		 *
201
-		 * This would add the decorator named "decorator1" defined by
202
-		 * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
-		 *
204
-		 * @param array List of decorator names
205
-		 * @since 2015.08
206
-		 * @category Developer
207
-		 * @see client/html/common/decorators/default
208
-		 * @see client/html/checkout/confirm/order/address/decorators/excludes
209
-		 * @see client/html/checkout/confirm/order/address/decorators/local
210
-		 */
211
-
212
-		/** client/html/checkout/confirm/order/address/decorators/local
213
-		 * Adds a list of local decorators only to the checkout confirm order address html client
214
-		 *
215
-		 * Decorators extend the functionality of a class by adding new aspects
216
-		 * (e.g. log what is currently done), executing the methods of the underlying
217
-		 * class only in certain conditions (e.g. only for logged in users) or
218
-		 * modify what is returned to the caller.
219
-		 *
220
-		 * This option allows you to wrap local decorators
221
-		 * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
-		 *
223
-		 *  client/html/checkout/confirm/order/address/decorators/local = array( 'decorator2' )
224
-		 *
225
-		 * This would add the decorator named "decorator2" defined by
226
-		 * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
-		 *
228
-		 * @param array List of decorator names
229
-		 * @since 2015.08
230
-		 * @category Developer
231
-		 * @see client/html/common/decorators/default
232
-		 * @see client/html/checkout/confirm/order/address/decorators/excludes
233
-		 * @see client/html/checkout/confirm/order/address/decorators/global
234
-		 */
235
-
236
-		return $this->createSubClient( 'checkout/confirm/order/address/' . $type, $name );
237
-	}
238
-
239
-
240
-	/**
241
-	 * Returns the list of sub-client names configured for the client.
242
-	 *
243
-	 * @return array List of HTML client names
244
-	 */
245
-	protected function getSubClientNames()
246
-	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
-	}
23
+    /** client/html/checkout/confirm/order/address/standard/subparts
24
+     * List of HTML sub-clients rendered within the checkout confirm order address section
25
+     *
26
+     * The output of the frontend is composed of the code generated by the HTML
27
+     * clients. Each HTML client can consist of serveral (or none) sub-clients
28
+     * that are responsible for rendering certain sub-parts of the output. The
29
+     * sub-clients can contain HTML clients themselves and therefore a
30
+     * hierarchical tree of HTML clients is composed. Each HTML client creates
31
+     * the output that is placed inside the container of its parent.
32
+     *
33
+     * At first, always the HTML code generated by the parent is printed, then
34
+     * the HTML code of its sub-clients. The order of the HTML sub-clients
35
+     * determines the order of the output of these sub-clients inside the parent
36
+     * container. If the configured list of clients is
37
+     *
38
+     *  array( "subclient1", "subclient2" )
39
+     *
40
+     * you can easily change the order of the output by reordering the subparts:
41
+     *
42
+     *  client/html/<clients>/subparts = array( "subclient1", "subclient2" )
43
+     *
44
+     * You can also remove one or more parts if they shouldn't be rendered:
45
+     *
46
+     *  client/html/<clients>/subparts = array( "subclient1" )
47
+     *
48
+     * As the clients only generates structural HTML, the layout defined via CSS
49
+     * should support adding, removing or reordering content by a fluid like
50
+     * design.
51
+     *
52
+     * @param array List of sub-client names
53
+     * @since 2015.11
54
+     * @category Developer
55
+     */
56
+    private $subPartPath = 'client/html/checkout/confirm/order/address/standard/subparts';
57
+    private $subPartNames = array();
58
+
59
+
60
+    /**
61
+     * Returns the HTML code for insertion into the body.
62
+     *
63
+     * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
64
+     * @param array &$tags Result array for the list of tags that are associated to the output
65
+     * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
66
+     * @return string HTML code
67
+     */
68
+    public function getBody( $uid = '', array &$tags = array(), &$expire = null )
69
+    {
70
+        $view = $this->setViewParams( $this->getView(), $tags, $expire );
71
+
72
+        $html = '';
73
+        foreach( $this->getSubClients() as $subclient ) {
74
+            $html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
75
+        }
76
+        $view->addressBody = $html;
77
+
78
+        /** client/html/checkout/confirm/order/address/standard/template-body
79
+         * Relative path to the HTML body template of the checkout confirm order address client.
80
+         *
81
+         * The template file contains the HTML code and processing instructions
82
+         * to generate the result shown in the body of the frontend. The
83
+         * configuration string is the path to the template file relative
84
+         * to the templates directory (usually in client/html/templates).
85
+         *
86
+         * You can overwrite the template file configuration in extensions and
87
+         * provide alternative templates. These alternative templates should be
88
+         * named like the default one but with the string "standard" replaced by
89
+         * an unique name. You may use the name of your project for this. If
90
+         * you've implemented an alternative client class as well, "standard"
91
+         * (second one) should be replaced by the name of the new class in lower
92
+         * case.
93
+         *
94
+         * @param string Relative path to the template creating code for the HTML page body
95
+         * @since 2015.11
96
+         * @category Developer
97
+         * @see client/html/checkout/confirm/order/address/standard/template-header
98
+         */
99
+        $tplconf = 'client/html/checkout/confirm/order/address/standard/template-body';
100
+        $default = 'common/summary/address-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->addressHeader = $html;
123
+
124
+        /** client/html/checkout/confirm/order/address/standard/template-header
125
+         * Relative path to the HTML header template of the checkout confirm order address 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
+         * (second one) should be replaced by the name of the new class in lower
139
+         * case.
140
+         *
141
+         * @param string Relative path to the template creating code for the HTML page head
142
+         * @since 2015.11
143
+         * @category Developer
144
+         * @see client/html/checkout/confirm/order/address/standard/template-body
145
+         */
146
+        $tplconf = 'client/html/checkout/confirm/order/address/standard/template-header';
147
+        $default = 'common/summary/address-header-default.php';
148
+
149
+        return $view->render( $view->config( $tplconf, $default ) );
150
+    }
151
+
152
+
153
+    /**
154
+     * Returns the sub-client given by its name.
155
+     *
156
+     * @param string $type Name of the client type
157
+     * @param string|null $name Name of the sub-client (Default if null)
158
+     * @return \Aimeos\Client\Html\Iface Sub-client object
159
+     */
160
+    public function getSubClient( $type, $name = null )
161
+    {
162
+        /** client/html/checkout/confirm/order/address/decorators/excludes
163
+         * Excludes decorators added by the "common" option from the checkout confirm order address html client
164
+         *
165
+         * Decorators extend the functionality of a class by adding new aspects
166
+         * (e.g. log what is currently done), executing the methods of the underlying
167
+         * class only in certain conditions (e.g. only for logged in users) or
168
+         * modify what is returned to the caller.
169
+         *
170
+         * This option allows you to remove a decorator added via
171
+         * "client/html/common/decorators/default" before they are wrapped
172
+         * around the html client.
173
+         *
174
+         *  client/html/checkout/confirm/order/address/decorators/excludes = array( 'decorator1' )
175
+         *
176
+         * This would remove the decorator named "decorator1" from the list of
177
+         * common decorators ("\Aimeos\Client\Html\Common\Decorator\*") added via
178
+         * "client/html/common/decorators/default" to the html client.
179
+         *
180
+         * @param array List of decorator names
181
+         * @since 2015.08
182
+         * @category Developer
183
+         * @see client/html/common/decorators/default
184
+         * @see client/html/checkout/confirm/order/address/decorators/global
185
+         * @see client/html/checkout/confirm/order/address/decorators/local
186
+         */
187
+
188
+        /** client/html/checkout/confirm/order/address/decorators/global
189
+         * Adds a list of globally available decorators only to the checkout confirm order address html client
190
+         *
191
+         * Decorators extend the functionality of a class by adding new aspects
192
+         * (e.g. log what is currently done), executing the methods of the underlying
193
+         * class only in certain conditions (e.g. only for logged in users) or
194
+         * modify what is returned to the caller.
195
+         *
196
+         * This option allows you to wrap global decorators
197
+         * ("\Aimeos\Client\Html\Common\Decorator\*") around the html client.
198
+         *
199
+         *  client/html/checkout/confirm/order/address/decorators/global = array( 'decorator1' )
200
+         *
201
+         * This would add the decorator named "decorator1" defined by
202
+         * "\Aimeos\Client\Html\Common\Decorator\Decorator1" only to the html client.
203
+         *
204
+         * @param array List of decorator names
205
+         * @since 2015.08
206
+         * @category Developer
207
+         * @see client/html/common/decorators/default
208
+         * @see client/html/checkout/confirm/order/address/decorators/excludes
209
+         * @see client/html/checkout/confirm/order/address/decorators/local
210
+         */
211
+
212
+        /** client/html/checkout/confirm/order/address/decorators/local
213
+         * Adds a list of local decorators only to the checkout confirm order address html client
214
+         *
215
+         * Decorators extend the functionality of a class by adding new aspects
216
+         * (e.g. log what is currently done), executing the methods of the underlying
217
+         * class only in certain conditions (e.g. only for logged in users) or
218
+         * modify what is returned to the caller.
219
+         *
220
+         * This option allows you to wrap local decorators
221
+         * ("\Aimeos\Client\Html\Checkout\Decorator\*") around the html client.
222
+         *
223
+         *  client/html/checkout/confirm/order/address/decorators/local = array( 'decorator2' )
224
+         *
225
+         * This would add the decorator named "decorator2" defined by
226
+         * "\Aimeos\Client\Html\Checkout\Decorator\Decorator2" only to the html client.
227
+         *
228
+         * @param array List of decorator names
229
+         * @since 2015.08
230
+         * @category Developer
231
+         * @see client/html/common/decorators/default
232
+         * @see client/html/checkout/confirm/order/address/decorators/excludes
233
+         * @see client/html/checkout/confirm/order/address/decorators/global
234
+         */
235
+
236
+        return $this->createSubClient( 'checkout/confirm/order/address/' . $type, $name );
237
+    }
238
+
239
+
240
+    /**
241
+     * Returns the list of sub-client names configured for the client.
242
+     *
243
+     * @return array List of HTML client names
244
+     */
245
+    protected function getSubClientNames()
246
+    {
247
+        return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
248
+    }
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
66 66
 	 * @return string HTML code
67 67
 	*/
68
-	public function getBody( $uid = '', array &$tags = array(), &$expire = null )
68
+	public function getBody($uid = '', array &$tags = array(), &$expire = null)
69 69
 	{
70
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
70
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
71 71
 
72 72
 		$html = '';
73
-		foreach( $this->getSubClients() as $subclient ) {
74
-			$html .= $subclient->setView( $view )->getBody( $uid, $tags, $expire );
73
+		foreach ($this->getSubClients() as $subclient) {
74
+			$html .= $subclient->setView($view)->getBody($uid, $tags, $expire);
75 75
 		}
76 76
 		$view->addressBody = $html;
77 77
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$tplconf = 'client/html/checkout/confirm/order/address/standard/template-body';
100 100
 		$default = 'common/summary/address-body-default.php';
101 101
 
102
-		return $view->render( $view->config( $tplconf, $default ) );
102
+		return $view->render($view->config($tplconf, $default));
103 103
 	}
104 104
 
105 105
 
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
112 112
 	 * @return string|null String including HTML tags for the header on error
113 113
 	 */
114
-	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
114
+	public function getHeader($uid = '', array &$tags = array(), &$expire = null)
115 115
 	{
116
-		$view = $this->setViewParams( $this->getView(), $tags, $expire );
116
+		$view = $this->setViewParams($this->getView(), $tags, $expire);
117 117
 
118 118
 		$html = '';
119
-		foreach( $this->getSubClients() as $subclient ) {
120
-			$html .= $subclient->setView( $view )->getHeader( $uid, $tags, $expire );
119
+		foreach ($this->getSubClients() as $subclient) {
120
+			$html .= $subclient->setView($view)->getHeader($uid, $tags, $expire);
121 121
 		}
122 122
 		$view->addressHeader = $html;
123 123
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$tplconf = 'client/html/checkout/confirm/order/address/standard/template-header';
147 147
 		$default = 'common/summary/address-header-default.php';
148 148
 
149
-		return $view->render( $view->config( $tplconf, $default ) );
149
+		return $view->render($view->config($tplconf, $default));
150 150
 	}
151 151
 
152 152
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @param string|null $name Name of the sub-client (Default if null)
158 158
 	 * @return \Aimeos\Client\Html\Iface Sub-client object
159 159
 	 */
160
-	public function getSubClient( $type, $name = null )
160
+	public function getSubClient($type, $name = null)
161 161
 	{
162 162
 		/** client/html/checkout/confirm/order/address/decorators/excludes
163 163
 		 * Excludes decorators added by the "common" option from the checkout confirm order address html client
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		 * @see client/html/checkout/confirm/order/address/decorators/global
234 234
 		 */
235 235
 
236
-		return $this->createSubClient( 'checkout/confirm/order/address/' . $type, $name );
236
+		return $this->createSubClient('checkout/confirm/order/address/'.$type, $name);
237 237
 	}
238 238
 
239 239
 
@@ -244,6 +244,6 @@  discard block
 block discarded – undo
244 244
 	 */
245 245
 	protected function getSubClientNames()
246 246
 	{
247
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
247
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
248 248
 	}
249 249
 }
250 250
\ No newline at end of file
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	 * @param string $uid Unique identifier for the output if the content is placed more than once on the same page
111 111
 	 * @param array &$tags Result array for the list of tags that are associated to the output
112 112
 	 * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
113
-	 * @return string|null String including HTML tags for the header on error
113
+	 * @return string String including HTML tags for the header on error
114 114
 	 */
115 115
 	public function getHeader( $uid = '', array &$tags = array(), &$expire = null )
116 116
 	{
Please login to merge, or discard this patch.