Completed
Push — master ( 521882...b49ab8 )
by Aimeos
04:07
created
admin/jqadm/templates/supplier/list-standard.php 1 patch
Spacing   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -8,30 +8,30 @@  discard block
 block discarded – undo
8 8
 $enc = $this->encoder();
9 9
 
10 10
 
11
-$target = $this->config( 'admin/jqadm/url/search/target' );
12
-$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' );
13
-$action = $this->config( 'admin/jqadm/url/search/action', 'search' );
14
-$config = $this->config( 'admin/jqadm/url/search/config', [] );
11
+$target = $this->config('admin/jqadm/url/search/target');
12
+$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm');
13
+$action = $this->config('admin/jqadm/url/search/action', 'search');
14
+$config = $this->config('admin/jqadm/url/search/config', []);
15 15
 
16
-$newTarget = $this->config( 'admin/jqadm/url/create/target' );
17
-$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' );
18
-$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' );
19
-$newConfig = $this->config( 'admin/jqadm/url/create/config', [] );
16
+$newTarget = $this->config('admin/jqadm/url/create/target');
17
+$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm');
18
+$newAction = $this->config('admin/jqadm/url/create/action', 'create');
19
+$newConfig = $this->config('admin/jqadm/url/create/config', []);
20 20
 
21
-$getTarget = $this->config( 'admin/jqadm/url/get/target' );
22
-$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' );
23
-$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' );
24
-$getConfig = $this->config( 'admin/jqadm/url/get/config', [] );
21
+$getTarget = $this->config('admin/jqadm/url/get/target');
22
+$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm');
23
+$getAction = $this->config('admin/jqadm/url/get/action', 'get');
24
+$getConfig = $this->config('admin/jqadm/url/get/config', []);
25 25
 
26
-$copyTarget = $this->config( 'admin/jqadm/url/copy/target' );
27
-$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' );
28
-$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' );
29
-$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] );
26
+$copyTarget = $this->config('admin/jqadm/url/copy/target');
27
+$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm');
28
+$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy');
29
+$copyConfig = $this->config('admin/jqadm/url/copy/config', []);
30 30
 
31
-$delTarget = $this->config( 'admin/jqadm/url/delete/target' );
32
-$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' );
33
-$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' );
34
-$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] );
31
+$delTarget = $this->config('admin/jqadm/url/delete/target');
32
+$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm');
33
+$delAction = $this->config('admin/jqadm/url/delete/action', 'delete');
34
+$delConfig = $this->config('admin/jqadm/url/delete/config', []);
35 35
 
36 36
 
37 37
 /** admin/jqadm/supplier/fields
@@ -49,38 +49,38 @@  discard block
 block discarded – undo
49 49
  * @category Developer
50 50
  */
51 51
 $default = ['supplier.status', 'supplier.code', 'supplier.label'];
52
-$default = $this->config( 'admin/jqadm/supplier/fields', $default );
53
-$fields = $this->session( 'aimeos/admin/jqadm/supplier/fields', $default );
52
+$default = $this->config('admin/jqadm/supplier/fields', $default);
53
+$fields = $this->session('aimeos/admin/jqadm/supplier/fields', $default);
54 54
 
55
-$searchParams = $params = $this->get( 'pageParams', [] );
55
+$searchParams = $params = $this->get('pageParams', []);
56 56
 $searchParams['page']['start'] = 0;
57 57
 
58 58
 $columnList = [
59
-	'supplier.id' => $this->translate( 'admin', 'ID' ),
60
-	'supplier.status' => $this->translate( 'admin', 'Status' ),
61
-	'supplier.code' => $this->translate( 'admin', 'Code' ),
62
-	'supplier.label' => $this->translate( 'admin', 'Label' ),
63
-	'supplier.ctime' => $this->translate( 'admin', 'Created' ),
64
-	'supplier.mtime' => $this->translate( 'admin', 'Modified' ),
65
-	'supplier.editor' => $this->translate( 'admin', 'Editor' ),
59
+	'supplier.id' => $this->translate('admin', 'ID'),
60
+	'supplier.status' => $this->translate('admin', 'Status'),
61
+	'supplier.code' => $this->translate('admin', 'Code'),
62
+	'supplier.label' => $this->translate('admin', 'Label'),
63
+	'supplier.ctime' => $this->translate('admin', 'Created'),
64
+	'supplier.mtime' => $this->translate('admin', 'Modified'),
65
+	'supplier.editor' => $this->translate('admin', 'Editor'),
66 66
 ];
67 67
 
68 68
 
69 69
 ?>
70
-<?php $this->block()->start( 'jqadm_content' ); ?>
70
+<?php $this->block()->start('jqadm_content'); ?>
71 71
 
72 72
 <nav class="main-navbar">
73 73
 
74 74
 	<span class="navbar-brand">
75
-		<?= $enc->html( $this->translate( 'admin', 'Supplier' ) ); ?>
76
-		<span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span>
75
+		<?= $enc->html($this->translate('admin', 'Supplier')); ?>
76
+		<span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span>
77 77
 	</span>
78 78
 
79 79
 	<?= $this->partial(
80
-		$this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard' ), [
81
-			'filter' => $this->session( 'aimeos/admin/jqadm/supplier/filter', [] ),
82
-			'filterAttributes' => $this->get( 'filterAttributes', [] ),
83
-			'filterOperators' => $this->get( 'filterOperators', [] ),
80
+		$this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard'), [
81
+			'filter' => $this->session('aimeos/admin/jqadm/supplier/filter', []),
82
+			'filterAttributes' => $this->get('filterAttributes', []),
83
+			'filterOperators' => $this->get('filterOperators', []),
84 84
 			'params' => $params,
85 85
 		]
86 86
 	); ?>
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
 
89 89
 
90 90
 <?= $this->partial(
91
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
92
-		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ),
93
-		'page' => $this->session( 'aimeos/admin/jqadm/supplier/page', [] )]
91
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
92
+		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'),
93
+		'page' => $this->session('aimeos/admin/jqadm/supplier/page', [])]
94 94
 	);
95 95
 ?>
96 96
 
97
-<form class="list list-supplier" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>">
97
+<form class="list list-supplier" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>">
98 98
 	<?= $this->csrf()->formfield(); ?>
99 99
 
100 100
 	<table class="list-items table table-hover table-striped">
@@ -102,20 +102,20 @@  discard block
 block discarded – undo
102 102
 			<tr>
103 103
 
104 104
 				<?= $this->partial(
105
-						$this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ),
106
-						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/supplier/sort' )]
105
+						$this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'),
106
+						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/supplier/sort')]
107 107
 					);
108 108
 				?>
109 109
 
110 110
 				<th class="actions">
111 111
 					<a class="btn fa act-add" tabindex="1"
112
-						href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>"
113
-						title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
114
-						aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>">
112
+						href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>"
113
+						title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
114
+						aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>">
115 115
 					</a>
116 116
 
117 117
 					<?= $this->partial(
118
-							$this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ),
118
+							$this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'),
119 119
 							['fields' => $fields, 'data' => $columnList]
120 120
 						);
121 121
 					?>
@@ -125,15 +125,15 @@  discard block
 block discarded – undo
125 125
 		<tbody>
126 126
 
127 127
 			<?= $this->partial(
128
-				$this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [
129
-					'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/supplier/filter', [] ),
128
+				$this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [
129
+					'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/supplier/filter', []),
130 130
 					'data' => [
131 131
 						'supplier.id' => ['op' => '=='],
132 132
 						'supplier.status' => ['op' => '==', 'type' => 'select', 'val' => [
133
-							'1' => $this->translate( 'mshop/code', 'status:1' ),
134
-							'0' => $this->translate( 'mshop/code', 'status:0' ),
135
-							'-1' => $this->translate( 'mshop/code', 'status:-1' ),
136
-							'-2' => $this->translate( 'mshop/code', 'status:-2' ),
133
+							'1' => $this->translate('mshop/code', 'status:1'),
134
+							'0' => $this->translate('mshop/code', 'status:0'),
135
+							'-1' => $this->translate('mshop/code', 'status:-1'),
136
+							'-2' => $this->translate('mshop/code', 'status:-2'),
137 137
 						]],
138 138
 						'supplier.code' => [],
139 139
 						'supplier.label' => [],
@@ -144,41 +144,41 @@  discard block
 block discarded – undo
144 144
 				] );
145 145
 			?>
146 146
 
147
-			<?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?>
148
-				<?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?>
149
-				<tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>">
150
-					<?php if( in_array( 'supplier.id', $fields ) ) : ?>
151
-						<td class="supplier-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td>
147
+			<?php foreach ($this->get('items', []) as $id => $item) : ?>
148
+				<?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?>
149
+				<tr class="<?= $this->site()->readonly($item->getSiteId()); ?>">
150
+					<?php if (in_array('supplier.id', $fields)) : ?>
151
+						<td class="supplier-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td>
152 152
 					<?php endif; ?>
153
-					<?php if( in_array( 'supplier.status', $fields ) ) : ?>
154
-						<td class="supplier-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td>
153
+					<?php if (in_array('supplier.status', $fields)) : ?>
154
+						<td class="supplier-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td>
155 155
 					<?php endif; ?>
156
-					<?php if( in_array( 'supplier.code', $fields ) ) : ?>
157
-						<td class="supplier-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getCode() ); ?></a></td>
156
+					<?php if (in_array('supplier.code', $fields)) : ?>
157
+						<td class="supplier-code"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getCode()); ?></a></td>
158 158
 					<?php endif; ?>
159
-					<?php if( in_array( 'supplier.label', $fields ) ) : ?>
160
-						<td class="supplier-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getLabel() ); ?></a></td>
159
+					<?php if (in_array('supplier.label', $fields)) : ?>
160
+						<td class="supplier-label"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getLabel()); ?></a></td>
161 161
 					<?php endif; ?>
162
-					<?php if( in_array( 'supplier.ctime', $fields ) ) : ?>
163
-						<td class="supplier-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td>
162
+					<?php if (in_array('supplier.ctime', $fields)) : ?>
163
+						<td class="supplier-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td>
164 164
 					<?php endif; ?>
165
-					<?php if( in_array( 'supplier.mtime', $fields ) ) : ?>
166
-						<td class="supplier-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td>
165
+					<?php if (in_array('supplier.mtime', $fields)) : ?>
166
+						<td class="supplier-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td>
167 167
 					<?php endif; ?>
168
-					<?php if( in_array( 'supplier.editor', $fields ) ) : ?>
169
-						<td class="supplier-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td>
168
+					<?php if (in_array('supplier.editor', $fields)) : ?>
169
+						<td class="supplier-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td>
170 170
 					<?php endif; ?>
171 171
 
172 172
 					<td class="actions">
173 173
 						<a class="btn act-copy fa" tabindex="1"
174
-							href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>"
175
-							title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>"
176
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a>
177
-						<?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?>
174
+							href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>"
175
+							title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>"
176
+							aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a>
177
+						<?php if (!$this->site()->readonly($item->getSiteId())) : ?>
178 178
 							<a class="btn act-delete fa" tabindex="1"
179
-								href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['resource' => 'supplier', 'id' => $id] + $params, [], $delConfig ) ); ?>"
180
-								title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
181
-								aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a>
179
+								href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['resource' => 'supplier', 'id' => $id] + $params, [], $delConfig)); ?>"
180
+								title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
181
+								aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a>
182 182
 						<?php endif; ?>
183 183
 					</td>
184 184
 				</tr>
@@ -186,18 +186,18 @@  discard block
 block discarded – undo
186 186
 		</tbody>
187 187
 	</table>
188 188
 
189
-	<?php if( $this->get( 'items', [] ) === [] ) : ?>
190
-		<div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div>
189
+	<?php if ($this->get('items', []) === []) : ?>
190
+		<div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div>
191 191
 	<?php endif; ?>
192 192
 </form>
193 193
 
194 194
 <?= $this->partial(
195
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
196
-		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ),
197
-		'page' => $this->session( 'aimeos/admin/jqadm/supplier/page', [] )]
195
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
196
+		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'),
197
+		'page' => $this->session('aimeos/admin/jqadm/supplier/page', [])]
198 198
 	);
199 199
 ?>
200 200
 
201 201
 <?php $this->block()->stop(); ?>
202 202
 
203
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
203
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/subscription/item-standard.php 1 patch
Spacing   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -5,21 +5,21 @@  discard block
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2018
6 6
  */
7 7
 
8
-$selected = function( $key, $code ) {
9
-	return ( $key === $code ? 'selected="selected"' : '' );
8
+$selected = function($key, $code) {
9
+	return ($key === $code ? 'selected="selected"' : '');
10 10
 };
11 11
 
12 12
 
13
-$sortItems = function( array $items )
13
+$sortItems = function(array $items)
14 14
 {
15 15
 	$result = [];
16 16
 
17
-	if( isset( $items['payment'] ) ) {
18
-		$result['payment'] = $items['payment']; unset( $items['payment'] );
17
+	if (isset($items['payment'])) {
18
+		$result['payment'] = $items['payment']; unset($items['payment']);
19 19
 	}
20 20
 
21
-	if( isset( $items['delivery'] ) ) {
22
-		$result['delivery'] = $items['delivery']; unset( $items['delivery'] );
21
+	if (isset($items['delivery'])) {
22
+		$result['delivery'] = $items['delivery']; unset($items['delivery']);
23 23
 	}
24 24
 
25 25
 	return $result + $items;
@@ -28,42 +28,42 @@  discard block
 block discarded – undo
28 28
 
29 29
 $enc = $this->encoder();
30 30
 
31
-$target = $this->config( 'admin/jqadm/url/save/target' );
32
-$cntl = $this->config( 'admin/jqadm/url/save/controller', 'Jqadm' );
33
-$action = $this->config( 'admin/jqadm/url/save/action', 'save' );
34
-$config = $this->config( 'admin/jqadm/url/save/config', [] );
31
+$target = $this->config('admin/jqadm/url/save/target');
32
+$cntl = $this->config('admin/jqadm/url/save/controller', 'Jqadm');
33
+$action = $this->config('admin/jqadm/url/save/action', 'save');
34
+$config = $this->config('admin/jqadm/url/save/config', []);
35 35
 
36
-$getTarget = $this->config( 'admin/jqadm/url/get/target' );
37
-$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' );
38
-$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' );
39
-$getConfig = $this->config( 'admin/jqadm/url/get/config', [] );
36
+$getTarget = $this->config('admin/jqadm/url/get/target');
37
+$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm');
38
+$getAction = $this->config('admin/jqadm/url/get/action', 'get');
39
+$getConfig = $this->config('admin/jqadm/url/get/config', []);
40 40
 
41
-$params = $this->get( 'pageParams', [] );
41
+$params = $this->get('pageParams', []);
42 42
 $basket = $this->itemBase;
43 43
 
44 44
 /// Price format with price value (%1$s) and currency (%2$s)
45
-$priceFormat = $this->translate( 'client/code', '%1$s %2$s' );
46
-$currency = $this->translate( 'currency', $basket->getPrice()->getCurrencyId() );
45
+$priceFormat = $this->translate('client/code', '%1$s %2$s');
46
+$currency = $this->translate('currency', $basket->getPrice()->getCurrencyId());
47 47
 
48 48
 
49 49
 ?>
50
-<?php $this->block()->start( 'jqadm_content' ); ?>
50
+<?php $this->block()->start('jqadm_content'); ?>
51 51
 
52
-<form class="item item-subscription form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr( $this->url( $target, $cntl, $action, $params, [], $config ) ); ?>">
53
-	<input id="item-id" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.id' ) ) ); ?>" value="<?= $enc->attr( $this->get( 'itemData/subscription.id' ) ); ?>" />
54
-	<input id="item-next" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'next' ) ) ); ?>" value="get" />
52
+<form class="item item-subscription form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr($this->url($target, $cntl, $action, $params, [], $config)); ?>">
53
+	<input id="item-id" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'subscription.id'))); ?>" value="<?= $enc->attr($this->get('itemData/subscription.id')); ?>" />
54
+	<input id="item-next" type="hidden" name="<?= $enc->attr($this->formparam(array('next'))); ?>" value="get" />
55 55
 	<?= $this->csrf()->formfield(); ?>
56 56
 
57 57
 	<nav class="main-navbar">
58 58
 		<span class="navbar-brand">
59
-			<?= $enc->html( $this->translate( 'admin', 'Subscription' ) ); ?>:
60
-			<?= $enc->html( $this->get( 'itemData/subscription.id' ) ); ?> -
61
-			<?= $enc->html( $this->get( 'itemData/subscription.datenext', $this->translate( 'admin', 'New' ) ) ); ?>
62
-			<?= $enc->html( $this->get( 'itemData/subscription.interval' ) ); ?>
63
-			<span class="navbar-secondary">(<?= $enc->html( $this->site()->match( $this->get( 'itemData/subscription.siteid' ) ) ); ?>)</span>
59
+			<?= $enc->html($this->translate('admin', 'Subscription')); ?>:
60
+			<?= $enc->html($this->get('itemData/subscription.id')); ?> -
61
+			<?= $enc->html($this->get('itemData/subscription.datenext', $this->translate('admin', 'New'))); ?>
62
+			<?= $enc->html($this->get('itemData/subscription.interval')); ?>
63
+			<span class="navbar-secondary">(<?= $enc->html($this->site()->match($this->get('itemData/subscription.siteid'))); ?>)</span>
64 64
 		</span>
65 65
 		<div class="item-actions">
66
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
66
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
67 67
 		</div>
68 68
 	</nav>
69 69
 
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 
75 75
 				<li class="nav-item basic">
76 76
 					<a class="nav-link active" href="#basic" data-toggle="tab" role="tab" aria-expanded="true" aria-controls="basic">
77
-						<?= $enc->html( $this->translate( 'admin', 'Basic' ) ); ?>
77
+						<?= $enc->html($this->translate('admin', 'Basic')); ?>
78 78
 					</a>
79 79
 				</li>
80 80
 
81
-				<?php foreach( array_values( $this->get( 'itemSubparts', [] ) ) as $idx => $subpart ) : ?>
82
-					<li class="nav-item <?= $enc->attr( $subpart ); ?>">
83
-						<a class="nav-link" href="#<?= $enc->attr( $subpart ); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx+1; ?>">
84
-							<?= $enc->html( $this->translate( 'admin', $subpart ) ); ?>
81
+				<?php foreach (array_values($this->get('itemSubparts', [])) as $idx => $subpart) : ?>
82
+					<li class="nav-item <?= $enc->attr($subpart); ?>">
83
+						<a class="nav-link" href="#<?= $enc->attr($subpart); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx + 1; ?>">
84
+							<?= $enc->html($this->translate('admin', $subpart)); ?>
85 85
 						</a>
86 86
 					</li>
87 87
 				<?php endforeach; ?>
@@ -90,163 +90,163 @@  discard block
 block discarded – undo
90 90
 
91 91
 			<div class="item-meta text-muted">
92 92
 				<small>
93
-					<?= $enc->html( $this->translate( 'admin', 'Modified' ) ); ?>:
94
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/subscription.mtime' ) ); ?></span>
93
+					<?= $enc->html($this->translate('admin', 'Modified')); ?>:
94
+					<span class="meta-value"><?= $enc->html($this->get('itemData/subscription.mtime')); ?></span>
95 95
 				</small>
96 96
 				<small>
97
-					<?= $enc->html( $this->translate( 'admin', 'Created' ) ); ?>:
98
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/subscription.ctime' ) ); ?></span>
97
+					<?= $enc->html($this->translate('admin', 'Created')); ?>:
98
+					<span class="meta-value"><?= $enc->html($this->get('itemData/subscription.ctime')); ?></span>
99 99
 				</small>
100 100
 				<small>
101
-					<?= $enc->html( $this->translate( 'admin', 'Editor' ) ); ?>:
102
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/subscription.editor' ) ); ?></span>
101
+					<?= $enc->html($this->translate('admin', 'Editor')); ?>:
102
+					<span class="meta-value"><?= $enc->html($this->get('itemData/subscription.editor')); ?></span>
103 103
 				</small>
104 104
 			</div>
105 105
 		</div>
106 106
 
107 107
 		<div class="col-md-9 item-content tab-content">
108
-			<?php $readonly = ( $this->access( 'admin' ) === false ? $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ) : '' ); ?>
108
+			<?php $readonly = ($this->access('admin') === false ? $this->site()->readonly($this->get('itemData/subscription.siteid')) : ''); ?>
109 109
 
110 110
 			<div id="basic" class="item-basic tab-pane fade show active" role="tabpanel" aria-labelledby="basic">
111 111
 
112 112
 				<div class="row">
113 113
 
114
-					<input class="item-ordbaseid" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.ordbaseid' ) ) ); ?>"
115
-						value="<?= $enc->attr( $this->param( 'subscription.ordbaseid', $this->get( 'itemData/subscription.ordbaseid' ) ) ); ?>" />
116
-					<input class="item-ordprodid" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.ordprodid' ) ) ); ?>"
117
-						value="<?= $enc->attr( $this->param( 'subscription.ordprodid', $this->get( 'itemData/subscription.ordprodid' ) ) ); ?>" />
114
+					<input class="item-ordbaseid" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'subscription.ordbaseid'))); ?>"
115
+						value="<?= $enc->attr($this->param('subscription.ordbaseid', $this->get('itemData/subscription.ordbaseid'))); ?>" />
116
+					<input class="item-ordprodid" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'subscription.ordprodid'))); ?>"
117
+						value="<?= $enc->attr($this->param('subscription.ordprodid', $this->get('itemData/subscription.ordprodid'))); ?>" />
118 118
 
119 119
 					<div class="col-xl-6 content-block <?= $readonly ?>">
120 120
 						<div class="form-group row mandatory">
121
-							<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label>
121
+							<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label>
122 122
 							<div class="col-sm-8">
123 123
 								<select class="form-control custom-select item-status" required="required" tabindex="1"
124
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.status' ) ) ); ?>"
125
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> >
124
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.status'))); ?>"
125
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> >
126 126
 									<option value="">
127
-										<?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?>
127
+										<?= $enc->attr($this->translate('admin', 'Please select')); ?>
128 128
 									</option>
129
-									<option value="1" <?= $selected( $this->get( 'itemData/subscription.status', 1 ), 1 ); ?> >
130
-										<?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?>
129
+									<option value="1" <?= $selected($this->get('itemData/subscription.status', 1), 1); ?> >
130
+										<?= $enc->html($this->translate('mshop/code', 'status:1')); ?>
131 131
 									</option>
132
-									<option value="0" <?= $selected( $this->get( 'itemData/subscription.status', 1 ), 0 ); ?> >
133
-										<?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?>
132
+									<option value="0" <?= $selected($this->get('itemData/subscription.status', 1), 0); ?> >
133
+										<?= $enc->html($this->translate('mshop/code', 'status:0')); ?>
134 134
 									</option>
135
-									<option value="-1" <?= $selected( $this->get( 'itemData/subscription.status', 1 ), -1 ); ?> >
136
-										<?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?>
135
+									<option value="-1" <?= $selected($this->get('itemData/subscription.status', 1), -1); ?> >
136
+										<?= $enc->html($this->translate('mshop/code', 'status:-1')); ?>
137 137
 									</option>
138
-									<option value="-2" <?= $selected( $this->get( 'itemData/subscription.status', 1 ), -2 ); ?> >
139
-										<?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?>
138
+									<option value="-2" <?= $selected($this->get('itemData/subscription.status', 1), -2); ?> >
139
+										<?= $enc->html($this->translate('mshop/code', 'status:-2')); ?>
140 140
 									</option>
141 141
 								</select>
142 142
 							</div>
143 143
 						</div>
144 144
 						<div class="form-group row mandatory">
145
-							<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Interval' ) ); ?></label>
145
+							<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Interval')); ?></label>
146 146
 							<div class="col-sm-8">
147 147
 								<input class="form-control item-interval" type="text" required="required" tabindex="1"
148
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.interval' ) ) ); ?>"
149
-									placeholder="<?= $enc->attr( $this->translate( 'admin', 'Interval (required)' ) ); ?>"
150
-									value="<?= $enc->attr( $this->get( 'itemData/subscription.interval', 'P1Y0M0W0D' ) ); ?>"
151
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> />
148
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.interval'))); ?>"
149
+									placeholder="<?= $enc->attr($this->translate('admin', 'Interval (required)')); ?>"
150
+									value="<?= $enc->attr($this->get('itemData/subscription.interval', 'P1Y0M0W0D')); ?>"
151
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> />
152 152
 							</div>
153 153
 							<div class="col-sm-12 form-text text-muted help-text">
154
-								<?= $enc->html( $this->translate( 'admin', 'Subscription interval with years, months, weeks and days, e.g. "P0Y1M2W3D" for zero years, one month, two weeks and three days' ) ); ?>
154
+								<?= $enc->html($this->translate('admin', 'Subscription interval with years, months, weeks and days, e.g. "P0Y1M2W3D" for zero years, one month, two weeks and three days')); ?>
155 155
 							</div>
156 156
 						</div>
157 157
 						<div class="form-group row mandatory">
158
-							<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Next date' ) ); ?></label>
158
+							<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Next date')); ?></label>
159 159
 							<div class="col-sm-8">
160 160
 								<input class="form-control item-datenext" type="date" required="required" tabindex="1"
161
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.datenext' ) ) ); ?>"
162
-									placeholder="<?= $enc->attr( $this->translate( 'admin', 'Next date (optional)' ) ); ?>"
163
-									value="<?= $enc->attr( $this->get( 'itemData/subscription.datenext' ) ); ?>"
164
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> />
161
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.datenext'))); ?>"
162
+									placeholder="<?= $enc->attr($this->translate('admin', 'Next date (optional)')); ?>"
163
+									value="<?= $enc->attr($this->get('itemData/subscription.datenext')); ?>"
164
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> />
165 165
 							</div>
166 166
 							<div class="col-sm-12 form-text text-muted help-text">
167
-								<?= $enc->html( $this->translate( 'admin', 'Next date the subscription is renewed' ) ); ?>
167
+								<?= $enc->html($this->translate('admin', 'Next date the subscription is renewed')); ?>
168 168
 							</div>
169 169
 						</div>
170 170
 						<div class="form-group row optional">
171
-							<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label>
171
+							<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label>
172 172
 							<div class="col-sm-8">
173 173
 								<input class="form-control item-dateendend" type="date" tabindex="1"
174
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.dateend' ) ) ); ?>"
175
-									placeholder="<?= $enc->attr( $this->translate( 'admin', 'End date (optional)' ) ); ?>"
176
-									value="<?= $enc->attr( $this->get( 'itemData/subscription.dateend' ) ); ?>"
177
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> />
174
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.dateend'))); ?>"
175
+									placeholder="<?= $enc->attr($this->translate('admin', 'End date (optional)')); ?>"
176
+									value="<?= $enc->attr($this->get('itemData/subscription.dateend')); ?>"
177
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> />
178 178
 							</div>
179 179
 							<div class="col-sm-12 form-text text-muted help-text">
180
-								<?= $enc->html( $this->translate( 'admin', 'Date the subscription ends' ) ); ?>
180
+								<?= $enc->html($this->translate('admin', 'Date the subscription ends')); ?>
181 181
 							</div>
182 182
 						</div>
183 183
 						<div class="form-group row optional">
184
-							<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Reason' ) ); ?></label>
184
+							<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Reason')); ?></label>
185 185
 							<div class="col-sm-8">
186 186
 								<select class="form-control custom-select item-reason" tabindex="1"
187
-									name="<?= $enc->attr( $this->formparam( array( 'item', 'subscription.reason' ) ) ); ?>"
188
-									<?= $this->site()->readonly( $this->get( 'itemData/subscription.siteid' ) ); ?> >
187
+									name="<?= $enc->attr($this->formparam(array('item', 'subscription.reason'))); ?>"
188
+									<?= $this->site()->readonly($this->get('itemData/subscription.siteid')); ?> >
189 189
 									<option value="">
190
-										<?= $enc->attr( $this->translate( 'admin', 'None' ) ); ?>
190
+										<?= $enc->attr($this->translate('admin', 'None')); ?>
191 191
 									</option>
192
-									<option value="1" <?= $selected( $this->get( 'itemData/subscription.reason' ), 1 ); ?> >
193
-										<?= $enc->html( $this->translate( 'mshop/code', 'reason:1' ) ); ?>
192
+									<option value="1" <?= $selected($this->get('itemData/subscription.reason'), 1); ?> >
193
+										<?= $enc->html($this->translate('mshop/code', 'reason:1')); ?>
194 194
 									</option>
195
-									<option value="0" <?= $selected( $this->get( 'itemData/subscription.reason' ), 0 ); ?> >
196
-										<?= $enc->html( $this->translate( 'mshop/code', 'reason:0' ) ); ?>
195
+									<option value="0" <?= $selected($this->get('itemData/subscription.reason'), 0); ?> >
196
+										<?= $enc->html($this->translate('mshop/code', 'reason:0')); ?>
197 197
 									</option>
198
-									<option value="-1" <?= $selected( $this->get( 'itemData/subscription.reason' ), -1 ); ?> >
199
-										<?= $enc->html( $this->translate( 'mshop/code', 'reason:-1' ) ); ?>
198
+									<option value="-1" <?= $selected($this->get('itemData/subscription.reason'), -1); ?> >
199
+										<?= $enc->html($this->translate('mshop/code', 'reason:-1')); ?>
200 200
 									</option>
201 201
 								</select>
202 202
 							</div>
203 203
 						</div>
204 204
 					</div>
205 205
 
206
-					<div class="col-xl-6 content-block <?= $this->site()->readonly( $basket->getLocale()->getSiteId() ); ?>">
206
+					<div class="col-xl-6 content-block <?= $this->site()->readonly($basket->getLocale()->getSiteId()); ?>">
207 207
 						<div class="form-group row">
208
-							<label class="col-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Site' ) ); ?></label>
208
+							<label class="col-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Site')); ?></label>
209 209
 							<div class="col-8">
210
-								<span class="form-control item-sitecode"><?= $enc->html( $basket->getSiteCode() ); ?></span>
210
+								<span class="form-control item-sitecode"><?= $enc->html($basket->getSiteCode()); ?></span>
211 211
 							</div>
212 212
 							<div class="col-12 form-text text-muted help-text">
213
-								<?= $enc->html( $this->translate( 'admin', 'Site the order was placed at' ) ); ?>
213
+								<?= $enc->html($this->translate('admin', 'Site the order was placed at')); ?>
214 214
 							</div>
215 215
 						</div>
216 216
 						<div class="form-group row">
217
-							<label class="col-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Customer ID' ) ); ?></label>
217
+							<label class="col-4 form-control-label"><?= $enc->html($this->translate('admin', 'Customer ID')); ?></label>
218 218
 							<div class="col-8">
219 219
 								<span class="form-control item-customerid">
220
-									<?php if( $basket->getCustomerId() ) : ?>
220
+									<?php if ($basket->getCustomerId()) : ?>
221 221
 										<a class="act-view" target="_blank"
222
-											href="<?= $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['resource' => 'customer', 'id' => $basket->getCustomerId()], [], $getConfig ) ); ?>">
223
-											<?= $enc->attr( $basket->getCustomerId() ); ?>
222
+											href="<?= $enc->attr($this->url($getTarget, $getCntl, $getAction, ['resource' => 'customer', 'id' => $basket->getCustomerId()], [], $getConfig)); ?>">
223
+											<?= $enc->attr($basket->getCustomerId()); ?>
224 224
 										</a>
225 225
 									<?php endif; ?>
226 226
 								</span>
227 227
 							</div>
228 228
 						</div>
229 229
 						<div class="form-group row">
230
-							<label class="col-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Order ID' ) ); ?></label>
230
+							<label class="col-4 form-control-label"><?= $enc->html($this->translate('admin', 'Order ID')); ?></label>
231 231
 							<div class="col-8">
232 232
 								<span class="form-control item-orderid">
233 233
 									<a class="act-view" target="_blank"
234
-										href="<?= $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['resource' => 'order', 'id' => $basket->getId()], [], $getConfig ) ); ?>">
235
-										<?= $enc->attr( $basket->getId() ); ?>
234
+										href="<?= $enc->attr($this->url($getTarget, $getCntl, $getAction, ['resource' => 'order', 'id' => $basket->getId()], [], $getConfig)); ?>">
235
+										<?= $enc->attr($basket->getId()); ?>
236 236
 									</a>
237 237
 								</span>
238 238
 							</div>
239 239
 						</div>
240 240
 						<div class="form-group row">
241
-							<label class="col-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Currency' ) ); ?></label>
241
+							<label class="col-4 form-control-label"><?= $enc->html($this->translate('admin', 'Currency')); ?></label>
242 242
 							<div class="col-8">
243
-								<span class="form-control item-currencyid"><?= $enc->html( $basket->getLocale()->getCurrencyId() ); ?></span>
243
+								<span class="form-control item-currencyid"><?= $enc->html($basket->getLocale()->getCurrencyId()); ?></span>
244 244
 							</div>
245 245
 						</div>
246 246
 						<div class="form-group row">
247
-							<label class="col-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Language' ) ); ?></label>
247
+							<label class="col-4 form-control-label"><?= $enc->html($this->translate('admin', 'Language')); ?></label>
248 248
 							<div class="col-8">
249
-								<span class="form-control item-languageid"><?= $enc->html( $this->translate( 'language', $basket->getLocale()->getLanguageId() ) ); ?></span>
249
+								<span class="form-control item-languageid"><?= $enc->html($this->translate('language', $basket->getLocale()->getLanguageId())); ?></span>
250 250
 							</div>
251 251
 						</div>
252 252
 					</div>
@@ -254,48 +254,48 @@  discard block
 block discarded – undo
254 254
 
255 255
 				<div class="row item-product">
256 256
 					<div class="col-sm-12 content-block">
257
-						<h2 class="col-sm-12 item-header"><?= $enc->html( $this->translate( 'admin', 'Product' ) ); ?></h2>
257
+						<h2 class="col-sm-12 item-header"><?= $enc->html($this->translate('admin', 'Product')); ?></h2>
258 258
 						<table class="item-product-list table table-striped">
259 259
 							<thead>
260 260
 								<tr>
261
-									<th class="item-column column-desc"><?= $enc->html( $this->translate( 'admin', 'Name' ) ); ?></th>
262
-									<th class="item-column column-quantity"><?= $enc->html( $this->translate( 'admin', 'Quantity' ) ); ?></th>
263
-									<th class="item-column column-price"><?= $enc->html( $this->translate( 'admin', 'Price' ) ); ?></th>
264
-									<th class="item-column column-sum"><?= $enc->html( $this->translate( 'admin', 'Sum' ) ); ?></th>
261
+									<th class="item-column column-desc"><?= $enc->html($this->translate('admin', 'Name')); ?></th>
262
+									<th class="item-column column-quantity"><?= $enc->html($this->translate('admin', 'Quantity')); ?></th>
263
+									<th class="item-column column-price"><?= $enc->html($this->translate('admin', 'Price')); ?></th>
264
+									<th class="item-column column-sum"><?= $enc->html($this->translate('admin', 'Sum')); ?></th>
265 265
 								</tr>
266 266
 							</thead>
267 267
 							<tbody>
268 268
 
269
-								<?php foreach( (array) $basket->getProducts() as $pos => $orderProduct ) : ?>
270
-									<?php if( $orderProduct->getId() == $this->param( 'subscription.ordprodid', $this->get( 'itemData/subscription.ordprodid' ) ) ) : ?>
269
+								<?php foreach ((array) $basket->getProducts() as $pos => $orderProduct) : ?>
270
+									<?php if ($orderProduct->getId() == $this->param('subscription.ordprodid', $this->get('itemData/subscription.ordprodid'))) : ?>
271 271
 										<tr class="list-item">
272 272
 											<td class="item-column column-desc">
273
-												<span class="product-name"><?= $enc->html( $orderProduct->getName() ); ?></span>
273
+												<span class="product-name"><?= $enc->html($orderProduct->getName()); ?></span>
274 274
 												<span class="product-attr">
275
-													<?php foreach( $orderProduct->getAttributeItems() as $attrItem ) : ?>
276
-														<span class="attr-code"><?= $enc->html( $attrItem->getCode() ); ?></span>
275
+													<?php foreach ($orderProduct->getAttributeItems() as $attrItem) : ?>
276
+														<span class="attr-code"><?= $enc->html($attrItem->getCode()); ?></span>
277 277
 														<span class="attr-value">
278
-															<?php if( $attrItem->getQuantity() > 1 ) : ?>
279
-																<?= $enc->html( $attrItem->getQuantity() ); ?>×
278
+															<?php if ($attrItem->getQuantity() > 1) : ?>
279
+																<?= $enc->html($attrItem->getQuantity()); ?>×
280 280
 															<?php endif; ?>
281
-															<?= $enc->html( $attrItem->getValue() ); ?>
281
+															<?= $enc->html($attrItem->getValue()); ?>
282 282
 														</span>
283 283
 													<?php endforeach; ?>
284 284
 												</span>
285
-												<span class="product-sku"><?= $enc->html( $orderProduct->getProductCode() ); ?></span>
285
+												<span class="product-sku"><?= $enc->html($orderProduct->getProductCode()); ?></span>
286 286
 											</td>
287 287
 											<td class="item-column column-quantity">
288
-												<span class="product-quantity"><?= $enc->html( $orderProduct->getQuantity() ); ?></span>
288
+												<span class="product-quantity"><?= $enc->html($orderProduct->getQuantity()); ?></span>
289 289
 											</td>
290 290
 											<td class="item-column column-price">
291
-												<span class="product-price"><?= $enc->html( sprintf( $priceFormat, $orderProduct->getPrice()->getValue(), $currency ) ); ?></span>
292
-												<span class="product-costs"><?= $enc->html( sprintf( $priceFormat, $orderProduct->getPrice()->getCosts(), $currency ) ); ?></span>
293
-												<span class="product-rebate"><?= $enc->html( sprintf( $priceFormat, $orderProduct->getPrice()->getRebate(), $currency ) ); ?></span>
291
+												<span class="product-price"><?= $enc->html(sprintf($priceFormat, $orderProduct->getPrice()->getValue(), $currency)); ?></span>
292
+												<span class="product-costs"><?= $enc->html(sprintf($priceFormat, $orderProduct->getPrice()->getCosts(), $currency)); ?></span>
293
+												<span class="product-rebate"><?= $enc->html(sprintf($priceFormat, $orderProduct->getPrice()->getRebate(), $currency)); ?></span>
294 294
 											</td>
295 295
 											<td class="item-column column-sum">
296
-												<span class="product-price"><?= $enc->html( sprintf( $priceFormat, $this->number( $orderProduct->getPrice()->getValue() * $orderProduct->getQuantity() ), $currency ) ); ?></span>
297
-												<span class="product-costs"><?= $enc->html( sprintf( $priceFormat, $this->number( $orderProduct->getPrice()->getCosts() * $orderProduct->getQuantity() ), $currency ) ); ?></span>
298
-												<span class="product-rebate"><?= $enc->html( sprintf( $priceFormat, $this->number( $orderProduct->getPrice()->getRebate() * $orderProduct->getQuantity() ), $currency ) ); ?></span>
296
+												<span class="product-price"><?= $enc->html(sprintf($priceFormat, $this->number($orderProduct->getPrice()->getValue() * $orderProduct->getQuantity()), $currency)); ?></span>
297
+												<span class="product-costs"><?= $enc->html(sprintf($priceFormat, $this->number($orderProduct->getPrice()->getCosts() * $orderProduct->getQuantity()), $currency)); ?></span>
298
+												<span class="product-rebate"><?= $enc->html(sprintf($priceFormat, $this->number($orderProduct->getPrice()->getRebate() * $orderProduct->getQuantity()), $currency)); ?></span>
299 299
 											</td>
300 300
 										</tr>
301 301
 									<?php endif; ?>
@@ -307,10 +307,10 @@  discard block
 block discarded – undo
307 307
 				</div>
308 308
 
309 309
 				<div class="row">
310
-					<?php foreach( $sortItems( $basket->getAddresses() ) as $type => $addr ) : $code = 'address:' . $type; ?>
310
+					<?php foreach ($sortItems($basket->getAddresses()) as $type => $addr) : $code = 'address:' . $type; ?>
311 311
 
312 312
 						<div class="col-xl-6 content-block item-address">
313
-							<h2 class="col-sm-12 item-header"><?= $enc->html( $this->translate( 'admin/ext', $code ) ); ?></h2>
313
+							<h2 class="col-sm-12 item-header"><?= $enc->html($this->translate('admin/ext', $code)); ?></h2>
314 314
 
315 315
 							<div class="address-short">
316 316
 								<span class="address-text">
@@ -321,12 +321,12 @@  discard block
 block discarded – undo
321 321
 											\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS,
322 322
 										);
323 323
 
324
-										echo preg_replace( "/\n+/m", "<br/>", trim( $enc->html( sprintf(
324
+										echo preg_replace("/\n+/m", "<br/>", trim($enc->html(sprintf(
325 325
 											/// Address format with company (%1$s), salutation (%2$s), title (%3$s), first name (%4$s), last name (%5$s),
326 326
 											/// address part one (%6$s, e.g street), address part two (%7$s, e.g house number), address part three (%8$s, e.g additional information),
327 327
 											/// postal/zip code (%9$s), city (%10$s), state (%11$s), country (%12$s), language (%13$s),
328 328
 											/// e-mail (%14$s), phone (%15$s), facsimile/telefax (%16$s), web site (%17$s), vatid (%18$s)
329
-											$this->translate( 'client', '%1$s
329
+											$this->translate('client', '%1$s
330 330
 %2$s %3$s %4$s %5$s
331 331
 %6$s %7$s
332 332
 %8$s
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 '
343 343
 											),
344 344
 											$addr->getCompany(),
345
-											( in_array( $addr->getSalutation(), $salutations ) ? $this->translate( 'mshop/code', $addr->getSalutation() ) : '' ),
345
+											(in_array($addr->getSalutation(), $salutations) ? $this->translate('mshop/code', $addr->getSalutation()) : ''),
346 346
 											$addr->getTitle(),
347 347
 											$addr->getFirstName(),
348 348
 											$addr->getLastName(),
@@ -352,14 +352,14 @@  discard block
 block discarded – undo
352 352
 											$addr->getPostal(),
353 353
 											$addr->getCity(),
354 354
 											$addr->getState(),
355
-											$this->translate( 'country', $addr->getCountryId() ),
356
-											$this->translate( 'language', $addr->getLanguageId() ),
355
+											$this->translate('country', $addr->getCountryId()),
356
+											$this->translate('language', $addr->getLanguageId()),
357 357
 											$addr->getEmail(),
358 358
 											$addr->getTelephone(),
359 359
 											$addr->getTelefax(),
360 360
 											$addr->getWebsite(),
361 361
 											$addr->getVatID()
362
-										) ) ) );
362
+										))));
363 363
 									?>
364 364
 								</span>
365 365
 							</div>
@@ -368,12 +368,12 @@  discard block
 block discarded – undo
368 368
 				</div>
369 369
 			</div>
370 370
 
371
-			<?= $this->get( 'itemBody' ); ?>
371
+			<?= $this->get('itemBody'); ?>
372 372
 
373 373
 		</div>
374 374
 
375 375
 		<div class="item-actions">
376
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
376
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
377 377
 		</div>
378 378
 	</div>
379 379
 </form>
@@ -381,4 +381,4 @@  discard block
 block discarded – undo
381 381
 <?php $this->block()->stop(); ?>
382 382
 
383 383
 
384
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
384
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/subscription/list-standard.php 1 patch
Spacing   +182 added lines, -182 removed lines patch added patch discarded remove patch
@@ -8,35 +8,35 @@  discard block
 block discarded – undo
8 8
 $enc = $this->encoder();
9 9
 
10 10
 
11
-$target = $this->config( 'admin/jqadm/url/search/target' );
12
-$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' );
13
-$action = $this->config( 'admin/jqadm/url/search/action', 'search' );
14
-$config = $this->config( 'admin/jqadm/url/search/config', [] );
11
+$target = $this->config('admin/jqadm/url/search/target');
12
+$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm');
13
+$action = $this->config('admin/jqadm/url/search/action', 'search');
14
+$config = $this->config('admin/jqadm/url/search/config', []);
15 15
 
16
-$newTarget = $this->config( 'admin/jqadm/url/create/target' );
17
-$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' );
18
-$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' );
19
-$newConfig = $this->config( 'admin/jqadm/url/create/config', [] );
16
+$newTarget = $this->config('admin/jqadm/url/create/target');
17
+$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm');
18
+$newAction = $this->config('admin/jqadm/url/create/action', 'create');
19
+$newConfig = $this->config('admin/jqadm/url/create/config', []);
20 20
 
21
-$getTarget = $this->config( 'admin/jqadm/url/get/target' );
22
-$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' );
23
-$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' );
24
-$getConfig = $this->config( 'admin/jqadm/url/get/config', [] );
21
+$getTarget = $this->config('admin/jqadm/url/get/target');
22
+$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm');
23
+$getAction = $this->config('admin/jqadm/url/get/action', 'get');
24
+$getConfig = $this->config('admin/jqadm/url/get/config', []);
25 25
 
26
-$copyTarget = $this->config( 'admin/jqadm/url/copy/target' );
27
-$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' );
28
-$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' );
29
-$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] );
26
+$copyTarget = $this->config('admin/jqadm/url/copy/target');
27
+$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm');
28
+$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy');
29
+$copyConfig = $this->config('admin/jqadm/url/copy/config', []);
30 30
 
31
-$delTarget = $this->config( 'admin/jqadm/url/delete/target' );
32
-$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' );
33
-$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' );
34
-$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] );
31
+$delTarget = $this->config('admin/jqadm/url/delete/target');
32
+$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm');
33
+$delAction = $this->config('admin/jqadm/url/delete/action', 'delete');
34
+$delConfig = $this->config('admin/jqadm/url/delete/config', []);
35 35
 
36
-$expTarget = $this->config( 'admin/jqadm/url/export/target' );
37
-$expCntl = $this->config( 'admin/jqadm/url/export/controller', 'Jqadm' );
38
-$expAction = $this->config( 'admin/jqadm/url/export/action', 'export' );
39
-$expConfig = $this->config( 'admin/jqadm/url/export/config', [] );
36
+$expTarget = $this->config('admin/jqadm/url/export/target');
37
+$expCntl = $this->config('admin/jqadm/url/export/controller', 'Jqadm');
38
+$expAction = $this->config('admin/jqadm/url/export/action', 'export');
39
+$expConfig = $this->config('admin/jqadm/url/export/config', []);
40 40
 
41 41
 
42 42
 /** admin/jqadm/subscription/fields
@@ -54,90 +54,90 @@  discard block
 block discarded – undo
54 54
  * @category Developer
55 55
  */
56 56
 $default = ['subscription.status', 'subscription.datenext', 'subscription.dateend', 'subscription.interval'];
57
-$default = $this->config( 'admin/jqadm/subscription/fields', $default );
58
-$fields = $this->session( 'aimeos/admin/jqadm/subscription/fields', $default );
57
+$default = $this->config('admin/jqadm/subscription/fields', $default);
58
+$fields = $this->session('aimeos/admin/jqadm/subscription/fields', $default);
59 59
 
60
-$searchParams = $params = $this->get( 'pageParams', [] );
60
+$searchParams = $params = $this->get('pageParams', []);
61 61
 $searchParams['page']['start'] = 0;
62 62
 
63
-$baseItems = $this->get( 'baseItems', [] );
63
+$baseItems = $this->get('baseItems', []);
64 64
 
65 65
 $columnList = [
66
-	'subscription.id' => $this->translate( 'admin', 'ID' ),
67
-	'subscription.status' => $this->translate( 'admin', 'Status' ),
68
-	'subscription.interval' => $this->translate( 'admin', 'Interval' ),
69
-	'subscription.datenext' => $this->translate( 'admin', 'Next date' ),
70
-	'subscription.dateend' => $this->translate( 'admin', 'End date' ),
71
-	'subscription.reason' => $this->translate( 'admin', 'Reason' ),
72
-	'subscription.ctime' => $this->translate( 'admin', 'Created' ),
73
-	'subscription.mtime' => $this->translate( 'admin', 'Modified' ),
74
-	'subscription.editor' => $this->translate( 'admin', 'Editor' ),
75
-	'order.base.customerid' => $this->translate( 'admin', 'Customer ID' ),
76
-	'order.base.sitecode' => $this->translate( 'admin', 'Site' ),
77
-	'order.base.languageid' => $this->translate( 'admin', 'Language' ),
78
-	'order.base.currencyid' => $this->translate( 'admin', 'Currency' ),
79
-	'order.base.taxflag' => $this->translate( 'admin', 'Incl. tax' ),
80
-	'order.base.comment' => $this->translate( 'admin', 'Comment' ),
81
-	'order.base.address.salutation' => $this->translate( 'admin', 'Salutation' ),
82
-	'order.base.address.company' => $this->translate( 'admin', 'Company' ),
83
-	'order.base.address.vatid' => $this->translate( 'admin', 'VAT ID' ),
84
-	'order.base.address.title' => $this->translate( 'admin', 'Title' ),
85
-	'order.base.address.firstname' => $this->translate( 'admin', 'First name' ),
86
-	'order.base.address.lastname' => $this->translate( 'admin', 'Last name' ),
87
-	'order.base.address.address1' => $this->translate( 'admin', 'Street' ),
88
-	'order.base.address.address2' => $this->translate( 'admin', 'House number' ),
89
-	'order.base.address.address3' => $this->translate( 'admin', 'Floor' ),
90
-	'order.base.address.postal' => $this->translate( 'admin', 'Zip code' ),
91
-	'order.base.address.city' => $this->translate( 'admin', 'City' ),
92
-	'order.base.address.state' => $this->translate( 'admin', 'State' ),
93
-	'order.base.address.countryid' => $this->translate( 'admin', 'Country' ),
94
-	'order.base.address.languageid' => $this->translate( 'admin', 'Language' ),
95
-	'order.base.address.telephone' => $this->translate( 'admin', 'Telephone' ),
96
-	'order.base.address.telefax' => $this->translate( 'admin', 'Facsimile' ),
97
-	'order.base.address.email' => $this->translate( 'admin', 'E-Mail' ),
98
-	'order.base.address.website' => $this->translate( 'admin', 'Web site' ),
66
+	'subscription.id' => $this->translate('admin', 'ID'),
67
+	'subscription.status' => $this->translate('admin', 'Status'),
68
+	'subscription.interval' => $this->translate('admin', 'Interval'),
69
+	'subscription.datenext' => $this->translate('admin', 'Next date'),
70
+	'subscription.dateend' => $this->translate('admin', 'End date'),
71
+	'subscription.reason' => $this->translate('admin', 'Reason'),
72
+	'subscription.ctime' => $this->translate('admin', 'Created'),
73
+	'subscription.mtime' => $this->translate('admin', 'Modified'),
74
+	'subscription.editor' => $this->translate('admin', 'Editor'),
75
+	'order.base.customerid' => $this->translate('admin', 'Customer ID'),
76
+	'order.base.sitecode' => $this->translate('admin', 'Site'),
77
+	'order.base.languageid' => $this->translate('admin', 'Language'),
78
+	'order.base.currencyid' => $this->translate('admin', 'Currency'),
79
+	'order.base.taxflag' => $this->translate('admin', 'Incl. tax'),
80
+	'order.base.comment' => $this->translate('admin', 'Comment'),
81
+	'order.base.address.salutation' => $this->translate('admin', 'Salutation'),
82
+	'order.base.address.company' => $this->translate('admin', 'Company'),
83
+	'order.base.address.vatid' => $this->translate('admin', 'VAT ID'),
84
+	'order.base.address.title' => $this->translate('admin', 'Title'),
85
+	'order.base.address.firstname' => $this->translate('admin', 'First name'),
86
+	'order.base.address.lastname' => $this->translate('admin', 'Last name'),
87
+	'order.base.address.address1' => $this->translate('admin', 'Street'),
88
+	'order.base.address.address2' => $this->translate('admin', 'House number'),
89
+	'order.base.address.address3' => $this->translate('admin', 'Floor'),
90
+	'order.base.address.postal' => $this->translate('admin', 'Zip code'),
91
+	'order.base.address.city' => $this->translate('admin', 'City'),
92
+	'order.base.address.state' => $this->translate('admin', 'State'),
93
+	'order.base.address.countryid' => $this->translate('admin', 'Country'),
94
+	'order.base.address.languageid' => $this->translate('admin', 'Language'),
95
+	'order.base.address.telephone' => $this->translate('admin', 'Telephone'),
96
+	'order.base.address.telefax' => $this->translate('admin', 'Facsimile'),
97
+	'order.base.address.email' => $this->translate('admin', 'E-Mail'),
98
+	'order.base.address.website' => $this->translate('admin', 'Web site'),
99 99
 ];
100 100
 
101 101
 $deliveryStatusList = [
102
-	'-1' => $this->translate( 'mshop/code', 'stat:-1' ),
103
-	'0' => $this->translate( 'mshop/code', 'stat:0' ),
104
-	'1' => $this->translate( 'mshop/code', 'stat:1' ),
105
-	'2' => $this->translate( 'mshop/code', 'stat:2' ),
106
-	'3' => $this->translate( 'mshop/code', 'stat:3' ),
107
-	'4' => $this->translate( 'mshop/code', 'stat:4' ),
108
-	'5' => $this->translate( 'mshop/code', 'stat:5' ),
109
-	'6' => $this->translate( 'mshop/code', 'stat:6' ),
110
-	'7' => $this->translate( 'mshop/code', 'stat:7' ),
102
+	'-1' => $this->translate('mshop/code', 'stat:-1'),
103
+	'0' => $this->translate('mshop/code', 'stat:0'),
104
+	'1' => $this->translate('mshop/code', 'stat:1'),
105
+	'2' => $this->translate('mshop/code', 'stat:2'),
106
+	'3' => $this->translate('mshop/code', 'stat:3'),
107
+	'4' => $this->translate('mshop/code', 'stat:4'),
108
+	'5' => $this->translate('mshop/code', 'stat:5'),
109
+	'6' => $this->translate('mshop/code', 'stat:6'),
110
+	'7' => $this->translate('mshop/code', 'stat:7'),
111 111
 ];
112 112
 
113 113
 $statusList = [
114
-	0 => $this->translate( 'admin', 'no' ),
115
-	1 => $this->translate( 'admin', 'yes' ),
114
+	0 => $this->translate('admin', 'no'),
115
+	1 => $this->translate('admin', 'yes'),
116 116
 ];
117 117
 
118 118
 $reasonList = [
119 119
 	null => '',
120
-	-1 => $this->translate( 'mshop/code', 'reason:-1' ),
121
-	0 => $this->translate( 'mshop/code', 'reason:0' ),
122
-	1 => $this->translate( 'mshop/code', 'reason:1' ),
120
+	-1 => $this->translate('mshop/code', 'reason:-1'),
121
+	0 => $this->translate('mshop/code', 'reason:0'),
122
+	1 => $this->translate('mshop/code', 'reason:1'),
123 123
 ];
124 124
 
125 125
 
126 126
 ?>
127
-<?php $this->block()->start( 'jqadm_content' ); ?>
127
+<?php $this->block()->start('jqadm_content'); ?>
128 128
 
129 129
 <nav class="main-navbar">
130 130
 
131 131
 	<span class="navbar-brand">
132
-		<?= $enc->html( $this->translate( 'admin', 'Subscription' ) ); ?>
133
-		<span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span>
132
+		<?= $enc->html($this->translate('admin', 'Subscription')); ?>
133
+		<span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span>
134 134
 	</span>
135 135
 
136 136
 	<?= $this->partial(
137
-		$this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard' ), [
138
-			'filter' => $this->session( 'aimeos/admin/jqadm/subscription/filter', [] ),
139
-			'filterAttributes' => $this->get( 'filterAttributes', [] ),
140
-			'filterOperators' => $this->get( 'filterOperators', [] ),
137
+		$this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard'), [
138
+			'filter' => $this->session('aimeos/admin/jqadm/subscription/filter', []),
139
+			'filterAttributes' => $this->get('filterAttributes', []),
140
+			'filterOperators' => $this->get('filterOperators', []),
141 141
 			'params' => $params,
142 142
 		]
143 143
 	); ?>
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 
146 146
 
147 147
 <?= $this->partial(
148
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
149
-		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ),
150
-		'page' => $this->session( 'aimeos/admin/jqadm/subscription/page', [] )]
148
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
149
+		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'),
150
+		'page' => $this->session('aimeos/admin/jqadm/subscription/page', [])]
151 151
 	);
152 152
 ?>
153 153
 
154
-<form class="list list-subscription" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>">
154
+<form class="list list-subscription" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>">
155 155
 	<?= $this->csrf()->formfield(); ?>
156 156
 
157 157
 	<table class="list-items table table-hover table-striped">
@@ -159,20 +159,20 @@  discard block
 block discarded – undo
159 159
 			<tr>
160 160
 
161 161
 				<?= $this->partial(
162
-						$this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ),
163
-						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/subscription/sort' )]
162
+						$this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'),
163
+						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/subscription/sort')]
164 164
 					);
165 165
 				?>
166 166
 
167 167
 				<th class="actions">
168 168
 					<a class="btn fa act-download" tabindex="1"
169
-						href="<?= $enc->attr( $this->url( $expTarget, $expCntl, $expAction, $params, [], $expConfig ) ); ?>"
170
-						title="<?= $enc->attr( $this->translate( 'admin', 'Download') ); ?>"
171
-						aria-label="<?= $enc->attr( $this->translate( 'admin', 'Download' ) ); ?>">
169
+						href="<?= $enc->attr($this->url($expTarget, $expCntl, $expAction, $params, [], $expConfig)); ?>"
170
+						title="<?= $enc->attr($this->translate('admin', 'Download')); ?>"
171
+						aria-label="<?= $enc->attr($this->translate('admin', 'Download')); ?>">
172 172
 					</a>
173 173
 
174 174
 					<?= $this->partial(
175
-							$this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ),
175
+							$this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'),
176 176
 							['fields' => $fields, 'data' => $columnList]
177 177
 						);
178 178
 					?>
@@ -182,15 +182,15 @@  discard block
 block discarded – undo
182 182
 		<tbody>
183 183
 
184 184
 			<?= $this->partial(
185
-				$this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [
186
-					'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/subscription/filter', [] ),
185
+				$this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [
186
+					'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/subscription/filter', []),
187 187
 					'data' => [
188 188
 						'subscription.id' => ['op' => '=='],
189 189
 						'subscription.status' => ['op' => '==', 'type' => 'select', 'val' => [
190
-							'1' => $this->translate( 'mshop/code', 'status:1' ),
191
-							'0' => $this->translate( 'mshop/code', 'status:0' ),
192
-							'-1' => $this->translate( 'mshop/code', 'status:-1' ),
193
-							'-2' => $this->translate( 'mshop/code', 'status:-2' ),
190
+							'1' => $this->translate('mshop/code', 'status:1'),
191
+							'0' => $this->translate('mshop/code', 'status:0'),
192
+							'-1' => $this->translate('mshop/code', 'status:-1'),
193
+							'-2' => $this->translate('mshop/code', 'status:-2'),
194 194
 						]],
195 195
 						'subscription.interval' => ['op' => '>=', 'type' => 'string'],
196 196
 						'subscription.datenext' => ['op' => '>=', 'type' => 'date'],
@@ -229,129 +229,129 @@  discard block
 block discarded – undo
229 229
 				] );
230 230
 			?>
231 231
 
232
-			<?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?>
233
-				<?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?>
234
-				<tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>">
235
-					<?php if( in_array( 'subscription.id', $fields ) ) : ?>
236
-						<td class="subscription-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td>
232
+			<?php foreach ($this->get('items', []) as $id => $item) : ?>
233
+				<?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?>
234
+				<tr class="<?= $this->site()->readonly($item->getSiteId()); ?>">
235
+					<?php if (in_array('subscription.id', $fields)) : ?>
236
+						<td class="subscription-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td>
237 237
 					<?php endif; ?>
238
-					<?php if( in_array( 'subscription.status', $fields ) ) : ?>
239
-						<td class="subscription-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td>
238
+					<?php if (in_array('subscription.status', $fields)) : ?>
239
+						<td class="subscription-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td>
240 240
 					<?php endif; ?>
241
-					<?php if( in_array( 'subscription.interval', $fields ) ) : ?>
242
-						<td class="subscription-interval"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getInterval() ); ?></a></td>
241
+					<?php if (in_array('subscription.interval', $fields)) : ?>
242
+						<td class="subscription-interval"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getInterval()); ?></a></td>
243 243
 					<?php endif; ?>
244
-					<?php if( in_array( 'subscription.datenext', $fields ) ) : ?>
245
-						<td class="subscription-datenext"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateNext() ); ?></a></td>
244
+					<?php if (in_array('subscription.datenext', $fields)) : ?>
245
+						<td class="subscription-datenext"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateNext()); ?></a></td>
246 246
 					<?php endif; ?>
247
-					<?php if( in_array( 'subscription.dateend', $fields ) ) : ?>
248
-						<td class="subscription-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateEnd() ); ?></a></td>
247
+					<?php if (in_array('subscription.dateend', $fields)) : ?>
248
+						<td class="subscription-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateEnd()); ?></a></td>
249 249
 					<?php endif; ?>
250
-					<?php if( in_array( 'subscription.reason', $fields ) ) : ?>
251
-						<td class="subscription-reason"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $reasonList[$item->getReason()] ); ?></td>
250
+					<?php if (in_array('subscription.reason', $fields)) : ?>
251
+						<td class="subscription-reason"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($reasonList[$item->getReason()]); ?></td>
252 252
 					<?php endif; ?>
253
-					<?php if( in_array( 'subscription.ctime', $fields ) ) : ?>
254
-						<td class="subscription-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td>
253
+					<?php if (in_array('subscription.ctime', $fields)) : ?>
254
+						<td class="subscription-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td>
255 255
 					<?php endif; ?>
256
-					<?php if( in_array( 'subscription.mtime', $fields ) ) : ?>
257
-						<td class="subscription-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td>
256
+					<?php if (in_array('subscription.mtime', $fields)) : ?>
257
+						<td class="subscription-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td>
258 258
 					<?php endif; ?>
259
-					<?php if( in_array( 'subscription.editor', $fields ) ) : ?>
260
-						<td class="subscription-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td>
259
+					<?php if (in_array('subscription.editor', $fields)) : ?>
260
+						<td class="subscription-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td>
261 261
 					<?php endif; ?>
262 262
 
263
-					<?php $baseItem = ( isset( $baseItems[$item->getOrderBaseId()] ) ? $baseItems[$item->getOrderBaseId()] : null ); ?>
263
+					<?php $baseItem = (isset($baseItems[$item->getOrderBaseId()]) ? $baseItems[$item->getOrderBaseId()] : null); ?>
264 264
 
265
-					<?php if( in_array( 'order.base.customerid', $fields ) ) : ?>
266
-						<td class="order-base-customerid"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html( $baseItem->getCustomerId() ) : ''; ?></a></td>
265
+					<?php if (in_array('order.base.customerid', $fields)) : ?>
266
+						<td class="order-base-customerid"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html($baseItem->getCustomerId()) : ''; ?></a></td>
267 267
 					<?php endif; ?>
268
-					<?php if( in_array( 'order.base.sitecode', $fields ) ) : ?>
269
-						<td class="order-base-sitecode"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html( $baseItem->getSiteCode() ) : ''; ?></a></td>
268
+					<?php if (in_array('order.base.sitecode', $fields)) : ?>
269
+						<td class="order-base-sitecode"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html($baseItem->getSiteCode()) : ''; ?></a></td>
270 270
 					<?php endif; ?>
271
-					<?php if( in_array( 'order.base.languageid', $fields ) ) : ?>
272
-						<td class="order-base-languageid"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html( $baseItem->getLocale()->getLanguageId() ) : ''; ?></a></td>
271
+					<?php if (in_array('order.base.languageid', $fields)) : ?>
272
+						<td class="order-base-languageid"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html($baseItem->getLocale()->getLanguageId()) : ''; ?></a></td>
273 273
 					<?php endif; ?>
274
-					<?php if( in_array( 'order.base.currencyid', $fields ) ) : ?>
275
-						<td class="order-base-currencyid"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html( $baseItem->getLocale()->getCurrencyId() ) : ''; ?></a></td>
274
+					<?php if (in_array('order.base.currencyid', $fields)) : ?>
275
+						<td class="order-base-currencyid"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html($baseItem->getLocale()->getCurrencyId()) : ''; ?></a></td>
276 276
 					<?php endif; ?>
277
-					<?php if( in_array( 'order.base.taxflag', $fields ) ) : ?>
278
-						<td class="order-base-taxflag"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html( $statusList[$baseItem->getPrice()->getTaxFlag()] ) : ''; ?></a></td>
277
+					<?php if (in_array('order.base.taxflag', $fields)) : ?>
278
+						<td class="order-base-taxflag"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html($statusList[$baseItem->getPrice()->getTaxFlag()]) : ''; ?></a></td>
279 279
 					<?php endif; ?>
280
-					<?php if( in_array( 'order.base.comment', $fields ) ) : ?>
281
-						<td class="order-base-comment"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html( $baseItem->getComment() ) : ''; ?></a></td>
280
+					<?php if (in_array('order.base.comment', $fields)) : ?>
281
+						<td class="order-base-comment"><a class="items-field" href="<?= $url; ?>"><?= $baseItem ? $enc->html($baseItem->getComment()) : ''; ?></a></td>
282 282
 					<?php endif; ?>
283 283
 
284 284
 					<?php $addrItem = null;
285
-						if( $baseItem && ( $addresses = $baseItem->getAddresses() ) && isset( $addresses[\Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT] ) ) {
285
+						if ($baseItem && ($addresses = $baseItem->getAddresses()) && isset($addresses[\Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT])) {
286 286
 							$addrItem = $addresses[\Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT];
287 287
 						}
288 288
 					?>
289 289
 
290
-					<?php if( in_array( 'order.base.address.salutation', $fields ) ) : ?>
291
-						<td class="order-base-address-salutation"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getSalutation() ) : ''; ?></a></td>
290
+					<?php if (in_array('order.base.address.salutation', $fields)) : ?>
291
+						<td class="order-base-address-salutation"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getSalutation()) : ''; ?></a></td>
292 292
 					<?php endif; ?>
293
-					<?php if( in_array( 'order.base.address.company', $fields ) ) : ?>
294
-						<td class="order-base-address-company"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getCompany() ) : ''; ?></a></td>
293
+					<?php if (in_array('order.base.address.company', $fields)) : ?>
294
+						<td class="order-base-address-company"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getCompany()) : ''; ?></a></td>
295 295
 					<?php endif; ?>
296
-					<?php if( in_array( 'order.base.address.vatid', $fields ) ) : ?>
297
-						<td class="order-base-address-vatid"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getVatID() ) : ''; ?></a></td>
296
+					<?php if (in_array('order.base.address.vatid', $fields)) : ?>
297
+						<td class="order-base-address-vatid"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getVatID()) : ''; ?></a></td>
298 298
 					<?php endif; ?>
299
-					<?php if( in_array( 'order.base.address.title', $fields ) ) : ?>
300
-						<td class="order-base-address-title"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getTitle() ) : ''; ?></a></td>
299
+					<?php if (in_array('order.base.address.title', $fields)) : ?>
300
+						<td class="order-base-address-title"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getTitle()) : ''; ?></a></td>
301 301
 					<?php endif; ?>
302
-					<?php if( in_array( 'order.base.address.firstname', $fields ) ) : ?>
303
-						<td class="order-base-address-firstname"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getFirstname() ) : ''; ?></a></td>
302
+					<?php if (in_array('order.base.address.firstname', $fields)) : ?>
303
+						<td class="order-base-address-firstname"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getFirstname()) : ''; ?></a></td>
304 304
 					<?php endif; ?>
305
-					<?php if( in_array( 'order.base.address.lastname', $fields ) ) : ?>
306
-						<td class="order-base-address-lastname"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getLastname() ) : ''; ?></a></td>
305
+					<?php if (in_array('order.base.address.lastname', $fields)) : ?>
306
+						<td class="order-base-address-lastname"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getLastname()) : ''; ?></a></td>
307 307
 					<?php endif; ?>
308
-					<?php if( in_array( 'order.base.address.address1', $fields ) ) : ?>
309
-						<td class="order-base-address-address1"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getAddress1() ) : ''; ?></a></td>
308
+					<?php if (in_array('order.base.address.address1', $fields)) : ?>
309
+						<td class="order-base-address-address1"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getAddress1()) : ''; ?></a></td>
310 310
 					<?php endif; ?>
311
-					<?php if( in_array( 'order.base.address.address2', $fields ) ) : ?>
312
-						<td class="order-base-address-address2"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getAddress2() ) : ''; ?></a></td>
311
+					<?php if (in_array('order.base.address.address2', $fields)) : ?>
312
+						<td class="order-base-address-address2"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getAddress2()) : ''; ?></a></td>
313 313
 					<?php endif; ?>
314
-					<?php if( in_array( 'order.base.address.address3', $fields ) ) : ?>
315
-						<td class="order-base-address-address3"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getAddress3() ) : ''; ?></a></td>
314
+					<?php if (in_array('order.base.address.address3', $fields)) : ?>
315
+						<td class="order-base-address-address3"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getAddress3()) : ''; ?></a></td>
316 316
 					<?php endif; ?>
317
-					<?php if( in_array( 'order.base.address.postal', $fields ) ) : ?>
318
-						<td class="order-base-address-postal"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getPostal() ) : ''; ?></a></td>
317
+					<?php if (in_array('order.base.address.postal', $fields)) : ?>
318
+						<td class="order-base-address-postal"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getPostal()) : ''; ?></a></td>
319 319
 					<?php endif; ?>
320
-					<?php if( in_array( 'order.base.address.city', $fields ) ) : ?>
321
-						<td class="order-base-address-city"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getCity() ) : ''; ?></a></td>
320
+					<?php if (in_array('order.base.address.city', $fields)) : ?>
321
+						<td class="order-base-address-city"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getCity()) : ''; ?></a></td>
322 322
 					<?php endif; ?>
323
-					<?php if( in_array( 'order.base.address.state', $fields ) ) : ?>
324
-						<td class="order-base-address-state"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getState() ) : ''; ?></a></td>
323
+					<?php if (in_array('order.base.address.state', $fields)) : ?>
324
+						<td class="order-base-address-state"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getState()) : ''; ?></a></td>
325 325
 					<?php endif; ?>
326
-					<?php if( in_array( 'order.base.address.countryid', $fields ) ) : ?>
327
-						<td class="order-base-address-countryid"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getCountryId() ) : ''; ?></a></td>
326
+					<?php if (in_array('order.base.address.countryid', $fields)) : ?>
327
+						<td class="order-base-address-countryid"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getCountryId()) : ''; ?></a></td>
328 328
 					<?php endif; ?>
329
-					<?php if( in_array( 'order.base.address.languageid', $fields ) ) : ?>
330
-						<td class="order-base-address-languageid"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getLanguageId() ) : ''; ?></a></td>
329
+					<?php if (in_array('order.base.address.languageid', $fields)) : ?>
330
+						<td class="order-base-address-languageid"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getLanguageId()) : ''; ?></a></td>
331 331
 					<?php endif; ?>
332
-					<?php if( in_array( 'order.base.address.telephone', $fields ) ) : ?>
333
-						<td class="order-base-address-telephone"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getTelephone() ) : ''; ?></a></td>
332
+					<?php if (in_array('order.base.address.telephone', $fields)) : ?>
333
+						<td class="order-base-address-telephone"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getTelephone()) : ''; ?></a></td>
334 334
 					<?php endif; ?>
335
-					<?php if( in_array( 'order.base.address.telefax', $fields ) ) : ?>
336
-						<td class="order-base-address-telefax"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getTelefax() ) : ''; ?></a></td>
335
+					<?php if (in_array('order.base.address.telefax', $fields)) : ?>
336
+						<td class="order-base-address-telefax"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getTelefax()) : ''; ?></a></td>
337 337
 					<?php endif; ?>
338
-					<?php if( in_array( 'order.base.address.email', $fields ) ) : ?>
339
-						<td class="order-base-address-email"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getEmail() ) : ''; ?></a></td>
338
+					<?php if (in_array('order.base.address.email', $fields)) : ?>
339
+						<td class="order-base-address-email"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getEmail()) : ''; ?></a></td>
340 340
 					<?php endif; ?>
341
-					<?php if( in_array( 'order.base.address.website', $fields ) ) : ?>
342
-						<td class="order-base-address-website"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html( $addrItem->getWebsite() ) : ''; ?></a></td>
341
+					<?php if (in_array('order.base.address.website', $fields)) : ?>
342
+						<td class="order-base-address-website"><a class="items-field" href="<?= $url; ?>"><?= $addrItem ? $enc->html($addrItem->getWebsite()) : ''; ?></a></td>
343 343
 					<?php endif; ?>
344 344
 
345 345
 					<td class="actions">
346 346
 						<a class="btn act-copy fa" tabindex="1"
347
-							href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>"
348
-							title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>"
349
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a>
350
-						<?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?>
347
+							href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>"
348
+							title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>"
349
+							aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a>
350
+						<?php if (!$this->site()->readonly($item->getSiteId())) : ?>
351 351
 							<a class="btn act-delete fa" tabindex="1"
352
-								href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['resource' => 'subscription', 'id' => $id] + $params, [], $delConfig ) ); ?>"
353
-								title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
354
-								aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a>
352
+								href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['resource' => 'subscription', 'id' => $id] + $params, [], $delConfig)); ?>"
353
+								title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
354
+								aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a>
355 355
 						<?php endif; ?>
356 356
 					</td>
357 357
 				</tr>
@@ -359,18 +359,18 @@  discard block
 block discarded – undo
359 359
 		</tbody>
360 360
 	</table>
361 361
 
362
-	<?php if( $this->get( 'items', [] ) === [] ) : ?>
363
-		<div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div>
362
+	<?php if ($this->get('items', []) === []) : ?>
363
+		<div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div>
364 364
 	<?php endif; ?>
365 365
 </form>
366 366
 
367 367
 <?= $this->partial(
368
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
369
-		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ),
370
-		'page' => $this->session( 'aimeos/admin/jqadm/subscription/page', [] )]
368
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
369
+		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'),
370
+		'page' => $this->session('aimeos/admin/jqadm/subscription/page', [])]
371 371
 	);
372 372
 ?>
373 373
 
374 374
 <?php $this->block()->stop(); ?>
375 375
 
376
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
376
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/coupon/item-standard.php 1 patch
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -5,44 +5,44 @@  discard block
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2017-2018
6 6
  */
7 7
 
8
-$attr = function( $list, $key, $code ) {
9
-	$map = ( isset( $list[$key] ) ? $list[$key]->toArray() : [] );
10
-	return ( isset( $map[$code] ) ? $map[$code] : '' );
8
+$attr = function($list, $key, $code) {
9
+	$map = (isset($list[$key]) ? $list[$key]->toArray() : []);
10
+	return (isset($map[$code]) ? $map[$code] : '');
11 11
 };
12 12
 
13
-$selected = function( $key, $code ) {
14
-	return ( $key == $code ? 'selected="selected"' : '' );
13
+$selected = function($key, $code) {
14
+	return ($key == $code ? 'selected="selected"' : '');
15 15
 };
16 16
 
17 17
 $enc = $this->encoder();
18 18
 
19 19
 
20
-$target = $this->config( 'admin/jqadm/url/save/target' );
21
-$cntl = $this->config( 'admin/jqadm/url/save/controller', 'Jqadm' );
22
-$action = $this->config( 'admin/jqadm/url/save/action', 'save' );
23
-$config = $this->config( 'admin/jqadm/url/save/config', [] );
20
+$target = $this->config('admin/jqadm/url/save/target');
21
+$cntl = $this->config('admin/jqadm/url/save/controller', 'Jqadm');
22
+$action = $this->config('admin/jqadm/url/save/action', 'save');
23
+$config = $this->config('admin/jqadm/url/save/config', []);
24 24
 
25
-$attributes = $this->get( 'itemAttributes', [] );
26
-$params = $this->get( 'pageParams', [] );
25
+$attributes = $this->get('itemAttributes', []);
26
+$params = $this->get('pageParams', []);
27 27
 
28 28
 
29 29
 ?>
30
-<?php $this->block()->start( 'jqadm_content' ); ?>
30
+<?php $this->block()->start('jqadm_content'); ?>
31 31
 
32
-<form class="item item-coupon form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr( $this->url( $target, $cntl, $action, $params, [], $config ) ); ?>">
33
-	<input id="item-id" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.id' ) ) ); ?>" value="<?= $enc->attr( $this->get( 'itemData/coupon.id' ) ); ?>" />
34
-	<input id="item-next" type="hidden" name="<?= $enc->attr( $this->formparam( array( 'next' ) ) ); ?>" value="get" />
32
+<form class="item item-coupon form-horizontal" method="POST" enctype="multipart/form-data" action="<?= $enc->attr($this->url($target, $cntl, $action, $params, [], $config)); ?>">
33
+	<input id="item-id" type="hidden" name="<?= $enc->attr($this->formparam(array('item', 'coupon.id'))); ?>" value="<?= $enc->attr($this->get('itemData/coupon.id')); ?>" />
34
+	<input id="item-next" type="hidden" name="<?= $enc->attr($this->formparam(array('next'))); ?>" value="get" />
35 35
 	<?= $this->csrf()->formfield(); ?>
36 36
 
37 37
 	<nav class="main-navbar">
38 38
 		<span class="navbar-brand">
39
-			<?= $enc->html( $this->translate( 'admin', 'Voucher' ) ); ?>:
40
-			<?= $enc->html( $this->get( 'itemData/coupon.id' ) ); ?> -
41
-			<?= $enc->html( $this->get( 'itemData/coupon.label', $this->translate( 'admin', 'New' ) ) ); ?>
42
-			<span class="navbar-secondary">(<?= $enc->html( $this->site()->match( $this->get( 'itemData/coupon.siteid' ) ) ); ?>)</span>
39
+			<?= $enc->html($this->translate('admin', 'Voucher')); ?>:
40
+			<?= $enc->html($this->get('itemData/coupon.id')); ?> -
41
+			<?= $enc->html($this->get('itemData/coupon.label', $this->translate('admin', 'New'))); ?>
42
+			<span class="navbar-secondary">(<?= $enc->html($this->site()->match($this->get('itemData/coupon.siteid'))); ?>)</span>
43 43
 		</span>
44 44
 		<div class="item-actions">
45
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
45
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
46 46
 		</div>
47 47
 	</nav>
48 48
 
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
 
54 54
 				<li class="nav-item basic">
55 55
 					<a class="nav-link active" href="#basic" data-toggle="tab" role="tab" aria-expanded="true" aria-controls="basic">
56
-						<?= $enc->html( $this->translate( 'admin', 'Basic' ) ); ?>
56
+						<?= $enc->html($this->translate('admin', 'Basic')); ?>
57 57
 					</a>
58 58
 				</li>
59 59
 
60
-				<?php foreach( array_values( $this->get( 'itemSubparts', [] ) ) as $idx => $subpart ) : ?>
61
-					<li class="nav-item <?= $enc->attr( $subpart ); ?>">
62
-						<a class="nav-link" href="#<?= $enc->attr( $subpart ); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx+1; ?>">
63
-							<?= $enc->html( $this->translate( 'admin', $subpart ) ); ?>
60
+				<?php foreach (array_values($this->get('itemSubparts', [])) as $idx => $subpart) : ?>
61
+					<li class="nav-item <?= $enc->attr($subpart); ?>">
62
+						<a class="nav-link" href="#<?= $enc->attr($subpart); ?>" data-toggle="tab" role="tab" tabindex="<?= ++$idx + 1; ?>">
63
+							<?= $enc->html($this->translate('admin', $subpart)); ?>
64 64
 						</a>
65 65
 					</li>
66 66
 				<?php endforeach; ?>
@@ -69,16 +69,16 @@  discard block
 block discarded – undo
69 69
 
70 70
 			<div class="item-meta text-muted">
71 71
 				<small>
72
-					<?= $enc->html( $this->translate( 'admin', 'Modified' ) ); ?>:
73
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/coupon.mtime' ) ); ?></span>
72
+					<?= $enc->html($this->translate('admin', 'Modified')); ?>:
73
+					<span class="meta-value"><?= $enc->html($this->get('itemData/coupon.mtime')); ?></span>
74 74
 				</small>
75 75
 				<small>
76
-					<?= $enc->html( $this->translate( 'admin', 'Created' ) ); ?>:
77
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/coupon.ctime' ) ); ?></span>
76
+					<?= $enc->html($this->translate('admin', 'Created')); ?>:
77
+					<span class="meta-value"><?= $enc->html($this->get('itemData/coupon.ctime')); ?></span>
78 78
 				</small>
79 79
 				<small>
80
-					<?= $enc->html( $this->translate( 'admin', 'Editor' ) ); ?>:
81
-					<span class="meta-value"><?= $enc->html( $this->get( 'itemData/coupon.editor' ) ); ?></span>
80
+					<?= $enc->html($this->translate('admin', 'Editor')); ?>:
81
+					<span class="meta-value"><?= $enc->html($this->get('itemData/coupon.editor')); ?></span>
82 82
 				</small>
83 83
 			</div>
84 84
 		</div>
@@ -87,111 +87,111 @@  discard block
 block discarded – undo
87 87
 
88 88
 			<div id="basic" class="row item-basic tab-pane fade show active" role="tabpanel" aria-labelledby="basic">
89 89
 
90
-				<div class="col-xl-6 content-block <?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?>">
90
+				<div class="col-xl-6 content-block <?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?>">
91 91
 					<div class="form-group row mandatory">
92
-						<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label>
92
+						<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label>
93 93
 						<div class="col-sm-8">
94 94
 							<select class="form-control custom-select item-status" required="required" tabindex="1"
95
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.status' ) ) ); ?>"
96
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> >
95
+								name="<?= $enc->attr($this->formparam(array('item', 'coupon.status'))); ?>"
96
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> >
97 97
 								<option value="">
98
-									<?= $enc->html( $this->translate( 'admin', 'Please select' ) ); ?>
98
+									<?= $enc->html($this->translate('admin', 'Please select')); ?>
99 99
 								</option>
100
-								<option value="1" <?= $selected( $this->get( 'itemData/coupon.status', 1 ), 1 ); ?> >
101
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?>
100
+								<option value="1" <?= $selected($this->get('itemData/coupon.status', 1), 1); ?> >
101
+									<?= $enc->html($this->translate('mshop/code', 'status:1')); ?>
102 102
 								</option>
103
-								<option value="0" <?= $selected( $this->get( 'itemData/coupon.status', 1 ), 0 ); ?> >
104
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?>
103
+								<option value="0" <?= $selected($this->get('itemData/coupon.status', 1), 0); ?> >
104
+									<?= $enc->html($this->translate('mshop/code', 'status:0')); ?>
105 105
 								</option>
106
-								<option value="-1" <?= $selected( $this->get( 'itemData/coupon.status', 1 ), -1 ); ?> >
107
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?>
106
+								<option value="-1" <?= $selected($this->get('itemData/coupon.status', 1), -1); ?> >
107
+									<?= $enc->html($this->translate('mshop/code', 'status:-1')); ?>
108 108
 								</option>
109
-								<option value="-2" <?= $selected( $this->get( 'itemData/coupon.status', 1 ), -2 ); ?> >
110
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?>
109
+								<option value="-2" <?= $selected($this->get('itemData/coupon.status', 1), -2); ?> >
110
+									<?= $enc->html($this->translate('mshop/code', 'status:-2')); ?>
111 111
 								</option>
112 112
 							</select>
113 113
 						</div>
114 114
 					</div>
115 115
 					<div class="form-group row mandatory">
116
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Label' ) ); ?></label>
116
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Label')); ?></label>
117 117
 						<div class="col-sm-8">
118 118
 							<input class="form-control item-label" type="text" required="required" tabindex="1"
119
-								name="<?= $this->formparam( array( 'item', 'coupon.label' ) ); ?>"
120
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'Internal name (required)' ) ); ?>"
121
-								value="<?= $enc->attr( $this->get( 'itemData/coupon.label' ) ); ?>"
122
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
119
+								name="<?= $this->formparam(array('item', 'coupon.label')); ?>"
120
+								placeholder="<?= $enc->attr($this->translate('admin', 'Internal name (required)')); ?>"
121
+								value="<?= $enc->attr($this->get('itemData/coupon.label')); ?>"
122
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
123 123
 						</div>
124 124
 						<div class="col-sm-12 form-text text-muted help-text">
125
-							<?= $enc->html( $this->translate( 'admin', 'Internal article name, will be used on the web site if no product name for the language is available' ) ); ?>
125
+							<?= $enc->html($this->translate('admin', 'Internal article name, will be used on the web site if no product name for the language is available')); ?>
126 126
 						</div>
127 127
 					</div>
128 128
 					<div class="form-group row mandatory">
129
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Provider' ) ); ?></label>
129
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Provider')); ?></label>
130 130
 						<div class="col-sm-8 input-group">
131 131
 							<input class="form-control item-provider combobox" type="text" required="required" tabindex="1"
132
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.provider' ) ) ); ?>"
133
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'Provider/decorator class names (required)' ) ); ?>"
134
-								value="<?= $enc->attr( $this->get( 'itemData/coupon.provider' ) ); ?>"
135
-								data-names="<?= implode( ',', $this->get( 'itemProviders', [] ) ); ?>"
136
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
132
+								name="<?= $enc->attr($this->formparam(array('item', 'coupon.provider'))); ?>"
133
+								placeholder="<?= $enc->attr($this->translate('admin', 'Provider/decorator class names (required)')); ?>"
134
+								value="<?= $enc->attr($this->get('itemData/coupon.provider')); ?>"
135
+								data-names="<?= implode(',', $this->get('itemProviders', [])); ?>"
136
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
137 137
 							<div class="dropdown input-group-append">
138 138
 								<button class="btn btn-secondary" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+</button>
139 139
 								<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="decoratorButton">
140
-									<?php foreach( $this->get( 'itemDecorators', [] ) as $name ) : ?>
141
-										<li class="dropdown-item"><a class="decorator-name" href="#" data-name="<?= $enc->attr( $name ); ?>"><?= $enc->html( $name ); ?></a></li>
140
+									<?php foreach ($this->get('itemDecorators', []) as $name) : ?>
141
+										<li class="dropdown-item"><a class="decorator-name" href="#" data-name="<?= $enc->attr($name); ?>"><?= $enc->html($name); ?></a></li>
142 142
 									<?php endforeach; ?>
143 143
 								</ul>
144 144
 							</div>
145 145
 						</div>
146 146
 						<div class="col-sm-12 form-text text-muted help-text">
147
-							<?= $enc->html( $this->translate( 'admin', 'One provider and zero or more decorator class names separated by commas' ) ); ?>
147
+							<?= $enc->html($this->translate('admin', 'One provider and zero or more decorator class names separated by commas')); ?>
148 148
 						</div>
149 149
 					</div>
150 150
 					<div class="form-group row optional">
151
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label>
151
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Start date')); ?></label>
152 152
 						<div class="col-sm-8">
153 153
 							<input class="form-control item-datestart" type="datetime-local" tabindex="1"
154
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.datestart' ) ) ); ?>"
155
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>"
156
-								value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'itemData/coupon.datestart' ) ) ); ?>"
157
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
154
+								name="<?= $enc->attr($this->formparam(array('item', 'coupon.datestart'))); ?>"
155
+								placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>"
156
+								value="<?= $enc->attr(str_replace(' ', 'T', $this->get('itemData/coupon.datestart'))); ?>"
157
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
158 158
 						</div>
159 159
 						<div class="col-sm-12 form-text text-muted help-text">
160
-							<?= $enc->html( $this->translate( 'admin', 'The article is only shown on the web site after that date and time, useful or seasonal articles' ) ); ?>
160
+							<?= $enc->html($this->translate('admin', 'The article is only shown on the web site after that date and time, useful or seasonal articles')); ?>
161 161
 						</div>
162 162
 					</div>
163 163
 					<div class="form-group row optional">
164
-						<label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label>
164
+						<label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'End date')); ?></label>
165 165
 						<div class="col-sm-8">
166 166
 							<input class="form-control item-dateend" type="datetime-local" tabindex="1"
167
-								name="<?= $enc->attr( $this->formparam( array( 'item', 'coupon.dateend' ) ) ); ?>"
168
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ); ?>"
169
-								value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'itemData/coupon.dateend' ) ) ); ?>"
170
-								<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
167
+								name="<?= $enc->attr($this->formparam(array('item', 'coupon.dateend'))); ?>"
168
+								placeholder="<?= $enc->attr($this->translate('admin', 'YYYY-MM-DD hh:mm:ss (optional)')); ?>"
169
+								value="<?= $enc->attr(str_replace(' ', 'T', $this->get('itemData/coupon.dateend'))); ?>"
170
+								<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
171 171
 						</div>
172 172
 						<div class="col-sm-12 form-text text-muted help-text">
173
-							<?= $enc->html( $this->translate( 'admin', 'The article is only shown on the web site until that date and time, useful or seasonal articles' ) ); ?>
173
+							<?= $enc->html($this->translate('admin', 'The article is only shown on the web site until that date and time, useful or seasonal articles')); ?>
174 174
 						</div>
175 175
 					</div>
176 176
 				</div><!--
177 177
 
178
-				--><div class="col-xl-6 content-block <?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?>">
178
+				--><div class="col-xl-6 content-block <?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?>">
179 179
 					<table class="item-config table table-striped">
180 180
 						<thead>
181 181
 							<tr>
182 182
 								<th class="config-row-key">
183
-									<span class="help"><?= $enc->html( $this->translate( 'admin', 'Option' ) ); ?></span>
183
+									<span class="help"><?= $enc->html($this->translate('admin', 'Option')); ?></span>
184 184
 									<div class="form-text text-muted help-text">
185
-										<?= $enc->html( $this->translate( 'admin', 'Coupon provider or coupon decorator configuration name' ) ); ?>
185
+										<?= $enc->html($this->translate('admin', 'Coupon provider or coupon decorator configuration name')); ?>
186 186
 									</div>
187 187
 								</th>
188 188
 								<th class="config-row-value">
189
-									<?= $enc->html( $this->translate( 'admin', 'Value' ) ); ?>
189
+									<?= $enc->html($this->translate('admin', 'Value')); ?>
190 190
 								</th>
191 191
 								<th class="actions">
192
-									<?php if( !$this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ) ) : ?>
192
+									<?php if (!$this->site()->readonly($this->get('itemData/coupon.siteid'))) : ?>
193 193
 										<div class="btn act-add fa" tabindex="1"
194
-											title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>">
194
+											title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>">
195 195
 										</div>
196 196
 									<?php endif; ?>
197 197
 								</th>
@@ -199,26 +199,26 @@  discard block
 block discarded – undo
199 199
 						</thead>
200 200
 						<tbody>
201 201
 
202
-							<?php foreach( (array) $this->get( 'itemData/config/key', [] ) as $idx => $key ) : ?>
202
+							<?php foreach ((array) $this->get('itemData/config/key', []) as $idx => $key) : ?>
203 203
 								<tr class="config-item">
204 204
 									<td class="config-row-key">
205 205
 										<input type="text" class="config-key form-control" tabindex="1"
206
-											name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'key', '' ) ) ); ?>"
207
-											value="<?= $enc->attr( $this->get( 'itemData/config/key/' . $idx, $key ) ); ?>"
208
-											<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
206
+											name="<?= $enc->attr($this->formparam(array('item', 'config', 'key', ''))); ?>"
207
+											value="<?= $enc->attr($this->get('itemData/config/key/' . $idx, $key)); ?>"
208
+											<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
209 209
 										<div class="form-text text-muted help-text"></div>
210 210
 									</td>
211 211
 									<td class="config-row-value">
212
-										<?php $cfgval = $this->get( 'itemData/config/val/' . $idx ); ?>
212
+										<?php $cfgval = $this->get('itemData/config/val/' . $idx); ?>
213 213
 										<input type="text" class="config-value form-control config-type" tabindex="1"
214
-											name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>"
215
-											value="<?= $enc->attr( !is_scalar( $cfgval ) ? json_encode( $cfgval ) : $cfgval ); ?>"
216
-											<?= $this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ); ?> />
214
+											name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>"
215
+											value="<?= $enc->attr(!is_scalar($cfgval) ? json_encode($cfgval) : $cfgval); ?>"
216
+											<?= $this->site()->readonly($this->get('itemData/coupon.siteid')); ?> />
217 217
 									</td>
218 218
 									<td class="actions">
219
-										<?php if( !$this->site()->readonly( $this->get( 'itemData/coupon.siteid' ) ) ) : ?>
219
+										<?php if (!$this->site()->readonly($this->get('itemData/coupon.siteid'))) : ?>
220 220
 											<div class="btn act-delete fa" tabindex="1"
221
-												title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>">
221
+												title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>">
222 222
 											</div>
223 223
 										<?php endif; ?>
224 224
 									</td>
@@ -228,20 +228,20 @@  discard block
 block discarded – undo
228 228
 							<tr class="config-item prototype">
229 229
 								<td class="config-row-key">
230 230
 									<input type="text" class="config-key form-control" tabindex="1" disabled="disabled"
231
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'key', '' ) ) ); ?>" />
231
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'key', ''))); ?>" />
232 232
 									<div class="form-text text-muted help-text"></div>
233 233
 								</td>
234 234
 								<td class="config-row-value">
235 235
 
236 236
 									<div class="config-type config-type-map">
237 237
 										<input type="text" class="config-value form-control" tabindex="1" disabled="disabled"
238
-											name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
238
+											name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
239 239
 
240 240
 										<table class="table table-striped config-map-table">
241 241
 											<tr class="config-map-row prototype-map">
242 242
 												<td class="config-map-actions">
243 243
 													<div class="btn act-delete fa" tabindex="1"
244
-														title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>">
244
+														title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>">
245 245
 													</div>
246 246
 												</td>
247 247
 												<td class="config-map-row-key">
@@ -254,12 +254,12 @@  discard block
 block discarded – undo
254 254
 											<tr class="config-map-actions">
255 255
 												<td class="config-map-action-add">
256 256
 													<div class="btn act-add fa" tabindex="1"
257
-														title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry') ); ?>">
257
+														title="<?= $enc->attr($this->translate('admin', 'Insert new entry')); ?>">
258 258
 													</div>
259 259
 												</td>
260 260
 												<td class="config-map-action-update" colspan="2">
261 261
 													<div class="btn btn-primary act-update" tabindex="1">
262
-														<?= $enc->attr( $this->translate( 'admin', 'OK') ); ?>
262
+														<?= $enc->attr($this->translate('admin', 'OK')); ?>
263 263
 													</div>
264 264
 												</td>
265 265
 											</tr>
@@ -267,37 +267,37 @@  discard block
 block discarded – undo
267 267
 									</div>
268 268
 
269 269
 									<select class="config-value form-control config-type config-type-select" tabindex="1" disabled="disabled"
270
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" >
270
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" >
271 271
 									</select>
272 272
 
273 273
 									<select class="config-value form-control config-type config-type-boolean" tabindex="1" disabled="disabled"
274
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" >
274
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" >
275 275
 										<option value=""></option>
276
-										<option value="0"><?= $enc->html( $this->translate( 'client', 'no' ) ); ?></option>
277
-										<option value="1"><?= $enc->html( $this->translate( 'client', 'yes' ) ); ?></option>
276
+										<option value="0"><?= $enc->html($this->translate('client', 'no')); ?></option>
277
+										<option value="1"><?= $enc->html($this->translate('client', 'yes')); ?></option>
278 278
 									</select>
279 279
 
280 280
 									<input type="text" class="config-value form-control config-type config-type-string" tabindex="1" disabled="disabled"
281
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
281
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
282 282
 
283 283
 									<input type="number" class="config-value form-control config-type config-type-number" tabindex="1" disabled="disabled"
284
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" step="0.01" />
284
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" step="0.01" />
285 285
 
286 286
 									<input type="number" class="config-value form-control config-type config-type-integer" tabindex="1" disabled="disabled"
287
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
287
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
288 288
 
289 289
 									<input type="date" class="config-value form-control config-type config-type-date" tabindex="1" disabled="disabled"
290
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
290
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
291 291
 
292 292
 									<input type="datetime-local" class="config-value form-control config-type config-type-datetime" tabindex="1" disabled="disabled"
293
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
293
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
294 294
 
295 295
 									<input type="time" class="config-value form-control config-type config-type-time" tabindex="1" disabled="disabled"
296
-										name="<?= $enc->attr( $this->formparam( array( 'item', 'config', 'val', '' ) ) ); ?>" />
296
+										name="<?= $enc->attr($this->formparam(array('item', 'config', 'val', ''))); ?>" />
297 297
 								</td>
298 298
 								<td class="actions">
299 299
 									<div class="btn act-delete fa" tabindex="1"
300
-										title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>">
300
+										title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>">
301 301
 									</div>
302 302
 								</td>
303 303
 							</tr>
@@ -307,12 +307,12 @@  discard block
 block discarded – undo
307 307
 
308 308
 			</div>
309 309
 
310
-			<?= $this->get( 'itemBody' ); ?>
310
+			<?= $this->get('itemBody'); ?>
311 311
 
312 312
 		</div>
313 313
 
314 314
 		<div class="item-actions">
315
-			<?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?>
315
+			<?= $this->partial($this->config('admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard'), ['params' => $params]); ?>
316 316
 		</div>
317 317
 	</div>
318 318
 </form>
@@ -320,4 +320,4 @@  discard block
 block discarded – undo
320 320
 <?php $this->block()->stop(); ?>
321 321
 
322 322
 
323
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
323
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/coupon/list-standard.php 1 patch
Spacing   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -8,30 +8,30 @@  discard block
 block discarded – undo
8 8
 $enc = $this->encoder();
9 9
 
10 10
 
11
-$target = $this->config( 'admin/jqadm/url/search/target' );
12
-$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' );
13
-$action = $this->config( 'admin/jqadm/url/search/action', 'search' );
14
-$config = $this->config( 'admin/jqadm/url/search/config', [] );
11
+$target = $this->config('admin/jqadm/url/search/target');
12
+$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm');
13
+$action = $this->config('admin/jqadm/url/search/action', 'search');
14
+$config = $this->config('admin/jqadm/url/search/config', []);
15 15
 
16
-$newTarget = $this->config( 'admin/jqadm/url/create/target' );
17
-$newCntl = $this->config( 'admin/jqadm/url/create/controller', 'Jqadm' );
18
-$newAction = $this->config( 'admin/jqadm/url/create/action', 'create' );
19
-$newConfig = $this->config( 'admin/jqadm/url/create/config', [] );
16
+$newTarget = $this->config('admin/jqadm/url/create/target');
17
+$newCntl = $this->config('admin/jqadm/url/create/controller', 'Jqadm');
18
+$newAction = $this->config('admin/jqadm/url/create/action', 'create');
19
+$newConfig = $this->config('admin/jqadm/url/create/config', []);
20 20
 
21
-$getTarget = $this->config( 'admin/jqadm/url/get/target' );
22
-$getCntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' );
23
-$getAction = $this->config( 'admin/jqadm/url/get/action', 'get' );
24
-$getConfig = $this->config( 'admin/jqadm/url/get/config', [] );
21
+$getTarget = $this->config('admin/jqadm/url/get/target');
22
+$getCntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm');
23
+$getAction = $this->config('admin/jqadm/url/get/action', 'get');
24
+$getConfig = $this->config('admin/jqadm/url/get/config', []);
25 25
 
26
-$copyTarget = $this->config( 'admin/jqadm/url/copy/target' );
27
-$copyCntl = $this->config( 'admin/jqadm/url/copy/controller', 'Jqadm' );
28
-$copyAction = $this->config( 'admin/jqadm/url/copy/action', 'copy' );
29
-$copyConfig = $this->config( 'admin/jqadm/url/copy/config', [] );
26
+$copyTarget = $this->config('admin/jqadm/url/copy/target');
27
+$copyCntl = $this->config('admin/jqadm/url/copy/controller', 'Jqadm');
28
+$copyAction = $this->config('admin/jqadm/url/copy/action', 'copy');
29
+$copyConfig = $this->config('admin/jqadm/url/copy/config', []);
30 30
 
31
-$delTarget = $this->config( 'admin/jqadm/url/delete/target' );
32
-$delCntl = $this->config( 'admin/jqadm/url/delete/controller', 'Jqadm' );
33
-$delAction = $this->config( 'admin/jqadm/url/delete/action', 'delete' );
34
-$delConfig = $this->config( 'admin/jqadm/url/delete/config', [] );
31
+$delTarget = $this->config('admin/jqadm/url/delete/target');
32
+$delCntl = $this->config('admin/jqadm/url/delete/controller', 'Jqadm');
33
+$delAction = $this->config('admin/jqadm/url/delete/action', 'delete');
34
+$delConfig = $this->config('admin/jqadm/url/delete/config', []);
35 35
 
36 36
 
37 37
 /** admin/jqadm/coupon/fields
@@ -49,40 +49,40 @@  discard block
 block discarded – undo
49 49
  * @category Developer
50 50
  */
51 51
 $default = ['coupon.status', 'coupon.label', 'coupon.provider'];
52
-$default = $this->config( 'admin/jqadm/coupon/fields', $default );
53
-$fields = $this->session( 'aimeos/admin/jqadm/coupon/fields', $default );
52
+$default = $this->config('admin/jqadm/coupon/fields', $default);
53
+$fields = $this->session('aimeos/admin/jqadm/coupon/fields', $default);
54 54
 
55
-$searchParams = $params = $this->get( 'pageParams', [] );
55
+$searchParams = $params = $this->get('pageParams', []);
56 56
 $searchParams['page']['start'] = 0;
57 57
 
58 58
 $columnList = [
59
-	'coupon.id' => $this->translate( 'admin', 'ID' ),
60
-	'coupon.status' => $this->translate( 'admin', 'Status' ),
61
-	'coupon.provider' => $this->translate( 'admin', 'Provider' ),
62
-	'coupon.label' => $this->translate( 'admin', 'Label' ),
63
-	'coupon.datestart' => $this->translate( 'admin', 'Start date' ),
64
-	'coupon.dateend' => $this->translate( 'admin', 'End date' ),
65
-	'coupon.config' => $this->translate( 'admin', 'Config' ),
66
-	'coupon.ctime' => $this->translate( 'admin', 'Created' ),
67
-	'coupon.mtime' => $this->translate( 'admin', 'Modified' ),
68
-	'coupon.editor' => $this->translate( 'admin', 'Editor' ),
59
+	'coupon.id' => $this->translate('admin', 'ID'),
60
+	'coupon.status' => $this->translate('admin', 'Status'),
61
+	'coupon.provider' => $this->translate('admin', 'Provider'),
62
+	'coupon.label' => $this->translate('admin', 'Label'),
63
+	'coupon.datestart' => $this->translate('admin', 'Start date'),
64
+	'coupon.dateend' => $this->translate('admin', 'End date'),
65
+	'coupon.config' => $this->translate('admin', 'Config'),
66
+	'coupon.ctime' => $this->translate('admin', 'Created'),
67
+	'coupon.mtime' => $this->translate('admin', 'Modified'),
68
+	'coupon.editor' => $this->translate('admin', 'Editor'),
69 69
 ];
70 70
 
71 71
 ?>
72
-<?php $this->block()->start( 'jqadm_content' ); ?>
72
+<?php $this->block()->start('jqadm_content'); ?>
73 73
 
74 74
 <nav class="main-navbar">
75 75
 
76 76
 	<span class="navbar-brand">
77
-		<?= $enc->html( $this->translate( 'admin', 'Voucher' ) ); ?>
78
-		<span class="navbar-secondary">(<?= $enc->html( $this->site()->label() ); ?>)</span>
77
+		<?= $enc->html($this->translate('admin', 'Voucher')); ?>
78
+		<span class="navbar-secondary">(<?= $enc->html($this->site()->label()); ?>)</span>
79 79
 	</span>
80 80
 
81 81
 	<?= $this->partial(
82
-		$this->config( 'admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard' ), [
83
-			'filter' => $this->session( 'aimeos/admin/jqadm/coupon/filter', [] ),
84
-			'filterAttributes' => $this->get( 'filterAttributes', [] ),
85
-			'filterOperators' => $this->get( 'filterOperators', [] ),
82
+		$this->config('admin/jqadm/partial/navsearch', 'common/partials/navsearch-standard'), [
83
+			'filter' => $this->session('aimeos/admin/jqadm/coupon/filter', []),
84
+			'filterAttributes' => $this->get('filterAttributes', []),
85
+			'filterOperators' => $this->get('filterOperators', []),
86 86
 			'params' => $params,
87 87
 		]
88 88
 	); ?>
@@ -90,33 +90,33 @@  discard block
 block discarded – undo
90 90
 
91 91
 
92 92
 <?= $this->partial(
93
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
94
-		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'total' ),
95
-		'page' => $this->session( 'aimeos/admin/jqadm/coupon/page', [] )]
93
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
94
+		['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('total'),
95
+		'page' => $this->session('aimeos/admin/jqadm/coupon/page', [])]
96 96
 	);
97 97
 ?>
98 98
 
99
-<form class="list list-product" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $searchParams, [], $config ) ); ?>">
99
+<form class="list list-product" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $searchParams, [], $config)); ?>">
100 100
 	<?= $this->csrf()->formfield(); ?>
101 101
 
102 102
 	<table class="list-items table table-hover table-striped">
103 103
 		<thead class="list-header">
104 104
 			<tr>
105 105
 				<?= $this->partial(
106
-						$this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ),
107
-						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session( 'aimeos/admin/jqadm/coupon/sort' )]
106
+						$this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'),
107
+						['fields' => $fields, 'params' => $params, 'data' => $columnList, 'sort' => $this->session('aimeos/admin/jqadm/coupon/sort')]
108 108
 					);
109 109
 				?>
110 110
 
111 111
 				<th class="actions">
112 112
 					<a class="btn fa act-add" tabindex="1"
113
-						href="<?= $enc->attr( $this->url( $newTarget, $newCntl, $newAction, $params, [], $newConfig ) ); ?>"
114
-						title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
115
-						aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>">
113
+						href="<?= $enc->attr($this->url($newTarget, $newCntl, $newAction, $params, [], $newConfig)); ?>"
114
+						title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
115
+						aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>">
116 116
 					</a>
117 117
 
118 118
 					<?= $this->partial(
119
-							$this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ),
119
+							$this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'),
120 120
 							['fields' => $fields, 'data' => $columnList]
121 121
 						);
122 122
 					?>
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 		<tbody>
127 127
 
128 128
 			<?= $this->partial(
129
-				$this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [
130
-					'fields' => $fields, 'filter' => $this->session( 'aimeos/admin/jqadm/coupon/filter', [] ),
129
+				$this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [
130
+					'fields' => $fields, 'filter' => $this->session('aimeos/admin/jqadm/coupon/filter', []),
131 131
 					'data' => [
132 132
 						'coupon.id' => ['op' => '=='],
133 133
 						'coupon.status' => ['op' => '==', 'type' => 'select', 'val' => [
134
-							'1' => $this->translate( 'mshop/code', 'status:1' ),
135
-							'0' => $this->translate( 'mshop/code', 'status:0' ),
136
-							'-1' => $this->translate( 'mshop/code', 'status:-1' ),
137
-							'-2' => $this->translate( 'mshop/code', 'status:-2' ),
134
+							'1' => $this->translate('mshop/code', 'status:1'),
135
+							'0' => $this->translate('mshop/code', 'status:0'),
136
+							'-1' => $this->translate('mshop/code', 'status:-1'),
137
+							'-2' => $this->translate('mshop/code', 'status:-2'),
138 138
 						]],
139 139
 						'coupon.provider' => [],
140 140
 						'coupon.label' => [],
@@ -148,58 +148,58 @@  discard block
 block discarded – undo
148 148
 				] );
149 149
 			?>
150 150
 
151
-			<?php foreach( $this->get( 'items', [] ) as $id => $item ) : ?>
152
-				<?php $url = $enc->attr( $this->url( $getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig ) ); ?>
153
-				<tr class="<?= $this->site()->readonly( $item->getSiteId() ); ?>">
154
-					<?php if( in_array( 'coupon.id', $fields ) ) : ?>
155
-						<td class="coupon-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getId() ); ?></a></td>
151
+			<?php foreach ($this->get('items', []) as $id => $item) : ?>
152
+				<?php $url = $enc->attr($this->url($getTarget, $getCntl, $getAction, ['id' => $id] + $params, [], $getConfig)); ?>
153
+				<tr class="<?= $this->site()->readonly($item->getSiteId()); ?>">
154
+					<?php if (in_array('coupon.id', $fields)) : ?>
155
+						<td class="coupon-id"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getId()); ?></a></td>
156 156
 					<?php endif; ?>
157
-					<?php if( in_array( 'coupon.status', $fields ) ) : ?>
158
-						<td class="coupon-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr( $item->getStatus() ); ?>"></div></a></td>
157
+					<?php if (in_array('coupon.status', $fields)) : ?>
158
+						<td class="coupon-status"><a class="items-field" href="<?= $url; ?>"><div class="fa status-<?= $enc->attr($item->getStatus()); ?>"></div></a></td>
159 159
 					<?php endif; ?>
160
-					<?php if( in_array( 'coupon.provider', $fields ) ) : ?>
161
-						<td class="coupon-provider"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getProvider() ); ?></a></td>
160
+					<?php if (in_array('coupon.provider', $fields)) : ?>
161
+						<td class="coupon-provider"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getProvider()); ?></a></td>
162 162
 					<?php endif; ?>
163
-					<?php if( in_array( 'coupon.label', $fields ) ) : ?>
164
-						<td class="coupon-label"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html( $item->getLabel() ); ?></a></td>
163
+					<?php if (in_array('coupon.label', $fields)) : ?>
164
+						<td class="coupon-label"><a class="items-field" href="<?= $url; ?>" tabindex="1"><?= $enc->html($item->getLabel()); ?></a></td>
165 165
 					<?php endif; ?>
166
-					<?php if( in_array( 'coupon.datestart', $fields ) ) : ?>
167
-						<td class="coupon-datestart"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateStart() ); ?></a></td>
166
+					<?php if (in_array('coupon.datestart', $fields)) : ?>
167
+						<td class="coupon-datestart"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateStart()); ?></a></td>
168 168
 					<?php endif; ?>
169
-					<?php if( in_array( 'coupon.dateend', $fields ) ) : ?>
170
-						<td class="coupon-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getDateEnd() ); ?></a></td>
169
+					<?php if (in_array('coupon.dateend', $fields)) : ?>
170
+						<td class="coupon-dateend"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getDateEnd()); ?></a></td>
171 171
 					<?php endif; ?>
172
-					<?php if( in_array( 'coupon.config', $fields ) ) : ?>
172
+					<?php if (in_array('coupon.config', $fields)) : ?>
173 173
 						<td class="coupon-config config-item">
174 174
 							<a class="items-field" href="<?= $url; ?>">
175
-								<?php foreach( $item->getConfig() as $key => $value ) : ?>
176
-									<span class="config-key"><?= $enc->html( $key ); ?></span>
177
-									<span class="config-value"><?= $enc->html( !is_scalar( $value ) ? json_encode( $value ) : $value ); ?></span>
175
+								<?php foreach ($item->getConfig() as $key => $value) : ?>
176
+									<span class="config-key"><?= $enc->html($key); ?></span>
177
+									<span class="config-value"><?= $enc->html(!is_scalar($value) ? json_encode($value) : $value); ?></span>
178 178
 									<br/>
179 179
 								<?php endforeach; ?>
180 180
 							</a>
181 181
 						</td>
182 182
 					<?php endif; ?>
183
-					<?php if( in_array( 'coupon.ctime', $fields ) ) : ?>
184
-						<td class="coupon-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeCreated() ); ?></a></td>
183
+					<?php if (in_array('coupon.ctime', $fields)) : ?>
184
+						<td class="coupon-ctime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeCreated()); ?></a></td>
185 185
 					<?php endif; ?>
186
-					<?php if( in_array( 'coupon.mtime', $fields ) ) : ?>
187
-						<td class="coupon-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getTimeModified() ); ?></a></td>
186
+					<?php if (in_array('coupon.mtime', $fields)) : ?>
187
+						<td class="coupon-mtime"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getTimeModified()); ?></a></td>
188 188
 					<?php endif; ?>
189
-					<?php if( in_array( 'coupon.editor', $fields ) ) : ?>
190
-						<td class="coupon-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html( $item->getEditor() ); ?></a></td>
189
+					<?php if (in_array('coupon.editor', $fields)) : ?>
190
+						<td class="coupon-editor"><a class="items-field" href="<?= $url; ?>"><?= $enc->html($item->getEditor()); ?></a></td>
191 191
 					<?php endif; ?>
192 192
 
193 193
 					<td class="actions">
194 194
 						<a class="btn act-copy fa" tabindex="1"
195
-							href="<?= $enc->attr( $this->url( $copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig ) ); ?>"
196
-							title="<?= $enc->attr( $this->translate( 'admin', 'Copy this entry') ); ?>"
197
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'Copy' ) ); ?>"></a>
198
-						<?php if( !$this->site()->readonly( $item->getSiteId() ) ) : ?>
195
+							href="<?= $enc->attr($this->url($copyTarget, $copyCntl, $copyAction, ['id' => $id] + $params, [], $copyConfig)); ?>"
196
+							title="<?= $enc->attr($this->translate('admin', 'Copy this entry')); ?>"
197
+							aria-label="<?= $enc->attr($this->translate('admin', 'Copy')); ?>"></a>
198
+						<?php if (!$this->site()->readonly($item->getSiteId())) : ?>
199 199
 							<a class="btn act-delete fa" tabindex="1"
200
-								href="<?= $enc->attr( $this->url( $delTarget, $delCntl, $delAction, ['resource' => 'coupon', 'id' => $id] + $params, [], $delConfig ) ); ?>"
201
-								title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
202
-								aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>"></a>
200
+								href="<?= $enc->attr($this->url($delTarget, $delCntl, $delAction, ['resource' => 'coupon', 'id' => $id] + $params, [], $delConfig)); ?>"
201
+								title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
202
+								aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"></a>
203 203
 						<?php endif; ?>
204 204
 					</td>
205 205
 				</tr>
@@ -207,18 +207,18 @@  discard block
 block discarded – undo
207 207
 		</tbody>
208 208
 	</table>
209 209
 
210
-	<?php if( $this->get( 'items', [] ) === [] ) : ?>
211
-		<?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?>
210
+	<?php if ($this->get('items', []) === []) : ?>
211
+		<?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?>
212 212
 	<?php endif; ?>
213 213
 </form>
214 214
 
215 215
 <?= $this->partial(
216
-		$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
217
-		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'total' ),
218
-		'page' => $this->session( 'aimeos/admin/jqadm/coupon/page', [] )]
216
+		$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
217
+		['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('total'),
218
+		'page' => $this->session('aimeos/admin/jqadm/coupon/page', [])]
219 219
 	);
220 220
 ?>
221 221
 
222 222
 <?php $this->block()->stop(); ?>
223 223
 
224
-<?= $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-standard' ) ); ?>
224
+<?= $this->render($this->config('admin/jqadm/template/page', 'common/page-standard')); ?>
Please login to merge, or discard this patch.
admin/jqadm/templates/coupon/item-code-standard.php 1 patch
Spacing   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 
9
-$selected = function( $key, $code ) {
10
-	return ( $key == $code ? 'selected="selected"' : '' );
9
+$selected = function($key, $code) {
10
+	return ($key == $code ? 'selected="selected"' : '');
11 11
 };
12 12
 
13
-$jsonTarget = $this->config( 'admin/jsonadm/url/target' );
14
-$jsonCntl = $this->config( 'admin/jsonadm/url/controller', 'Jsonadm' );
15
-$jsonAction = $this->config( 'admin/jsonadm/url/action', 'index' );
16
-$jsonConfig = $this->config( 'admin/jsonadm/url/config', [] );
13
+$jsonTarget = $this->config('admin/jsonadm/url/target');
14
+$jsonCntl = $this->config('admin/jsonadm/url/controller', 'Jsonadm');
15
+$jsonAction = $this->config('admin/jsonadm/url/action', 'index');
16
+$jsonConfig = $this->config('admin/jsonadm/url/config', []);
17 17
 
18 18
 $enc = $this->encoder();
19
-$params = $this->get( 'pageParams', [] );
19
+$params = $this->get('pageParams', []);
20 20
 
21 21
 
22 22
 /** admin/jqadm/coupon/code/fields
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
  * @since 2017.10
34 34
  * @category Developer
35 35
  */
36
-$default = $this->config( 'admin/jqadm/coupon/code/fields', ['coupon.code.code', 'coupon.code.count'] );
37
-$fields = $this->session( 'aimeos/admin/jqadm/couponcode/fields', $default );
36
+$default = $this->config('admin/jqadm/coupon/code/fields', ['coupon.code.code', 'coupon.code.count']);
37
+$fields = $this->session('aimeos/admin/jqadm/couponcode/fields', $default);
38 38
 
39 39
 $columnList = [
40
-	'coupon.code.code' => $this->translate( 'admin', 'Code' ),
41
-	'coupon.code.count' => $this->translate( 'admin', 'Count' ),
42
-	'coupon.code.datestart' => $this->translate( 'admin', 'Start date' ),
43
-	'coupon.code.dateend' => $this->translate( 'admin', 'End date' ),
44
-	'coupon.code.ctime' => $this->translate( 'admin', 'Created' ),
45
-	'coupon.code.mtime' => $this->translate( 'admin', 'Modified' ),
46
-	'coupon.code.editor' => $this->translate( 'admin', 'Editor' ),
40
+	'coupon.code.code' => $this->translate('admin', 'Code'),
41
+	'coupon.code.count' => $this->translate('admin', 'Count'),
42
+	'coupon.code.datestart' => $this->translate('admin', 'Start date'),
43
+	'coupon.code.dateend' => $this->translate('admin', 'End date'),
44
+	'coupon.code.ctime' => $this->translate('admin', 'Created'),
45
+	'coupon.code.mtime' => $this->translate('admin', 'Modified'),
46
+	'coupon.code.editor' => $this->translate('admin', 'Editor'),
47 47
 ];
48 48
 
49 49
 
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 <div id="code" class="item-code content-block tab-pane fade" role="tabpanel" aria-labelledby="code">
52 52
 
53 53
 	<?= $this->partial(
54
-			$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
55
-			['pageParams' => $params, 'pos' => 'top', 'total' => $this->get( 'codeTotal' ),
54
+			$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
55
+			['pageParams' => $params, 'pos' => 'top', 'total' => $this->get('codeTotal'),
56 56
 			'group' => 'vc', 'action' => 'get', 'fragment' => 'code',
57
-			'page' =>$this->session( 'aimeos/admin/jqadm/couponcode/page', [] )]
57
+			'page' =>$this->session('aimeos/admin/jqadm/couponcode/page', [])]
58 58
 		);
59 59
 	?>
60 60
 
@@ -62,40 +62,40 @@  discard block
 block discarded – undo
62 62
 		<thead class="list-header">
63 63
 			<tr>
64 64
 				<?= $this->partial(
65
-						$this->config( 'admin/jqadm/partial/listhead', 'common/partials/listhead-standard' ),
66
-						['fields' => $fields, 'params' => $params, 'tabindex' => $this->get( 'tabindex' ),
65
+						$this->config('admin/jqadm/partial/listhead', 'common/partials/listhead-standard'),
66
+						['fields' => $fields, 'params' => $params, 'tabindex' => $this->get('tabindex'),
67 67
 						'data' => $columnList, 'group' => 'vc', 'action' => 'get', 'fragment' => 'code',
68
-						'sort' => $this->session( 'aimeos/admin/jqadm/couponcode/sort' )]
68
+						'sort' => $this->session('aimeos/admin/jqadm/couponcode/sort')]
69 69
 					);
70 70
 				?>
71 71
 
72 72
 				<th class="actions">
73 73
 					<div class="dropdown list-menu">
74 74
 						<button class="btn act-menu fa" type="button" id="menuButton"
75
-							data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" tabindex="<?= $this->get( 'tabindex' ); ?>"
76
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'More' ) ); ?>"
77
-							title="<?= $enc->attr( $this->translate( 'admin', 'More') ); ?>">
75
+							data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" tabindex="<?= $this->get('tabindex'); ?>"
76
+							aria-label="<?= $enc->attr($this->translate('admin', 'More')); ?>"
77
+							title="<?= $enc->attr($this->translate('admin', 'More')); ?>">
78 78
 						</button>
79 79
 						<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="menuButton">
80 80
 							<li class="dropdown-item">
81
-								<a class="btn act-add fa label" href="#" tabindex="<?= $this->get( 'tabindex' ); ?>"
82
-									title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
83
-									aria-label="<?= $enc->attr( $this->translate( 'admin', 'Add' ) ); ?>">
84
-									<?= $enc->html( $this->translate( 'admin', 'Add' ) ); ?>
81
+								<a class="btn act-add fa label" href="#" tabindex="<?= $this->get('tabindex'); ?>"
82
+									title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
83
+									aria-label="<?= $enc->attr($this->translate('admin', 'Add')); ?>">
84
+									<?= $enc->html($this->translate('admin', 'Add')); ?>
85 85
 								</a>
86 86
 							</li>
87 87
 							<li class="dropdown-item">
88 88
 								<div class="btn fa fa-upload label">
89
-									<?= $enc->html( $this->translate( 'admin', 'Import' ) ); ?>
90
-									<input class="fileupload act-import" type="file" name="code[file]" tabindex="<?= $this->get( 'tabindex' ); ?>" />
89
+									<?= $enc->html($this->translate('admin', 'Import')); ?>
90
+									<input class="fileupload act-import" type="file" name="code[file]" tabindex="<?= $this->get('tabindex'); ?>" />
91 91
 								</div>
92 92
 							</li>
93 93
 						</ul>
94 94
 					</div>
95 95
 
96 96
 					<?= $this->partial(
97
-							$this->config( 'admin/jqadm/partial/columns', 'common/partials/columns-standard' ),
98
-							['fields' => $fields, 'group' => 'vc', 'data' => $columnList, 'tabindex' => $this->get( 'tabindex' )]
97
+							$this->config('admin/jqadm/partial/columns', 'common/partials/columns-standard'),
98
+							['fields' => $fields, 'group' => 'vc', 'data' => $columnList, 'tabindex' => $this->get('tabindex')]
99 99
 						);
100 100
 					?>
101 101
 				</th>
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 		</thead>
104 104
 		<tbody>
105 105
 			<?= $this->partial(
106
-				$this->config( 'admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard' ), [
107
-					'filter' => $this->session( 'aimeos/admin/jqadm/couponcode/filter', [] ),
108
-					'fields' => $fields, 'group' => 'vc', 'tabindex' => $this->get( 'tabindex' ),
106
+				$this->config('admin/jqadm/partial/listsearch', 'common/partials/listsearch-standard'), [
107
+					'filter' => $this->session('aimeos/admin/jqadm/couponcode/filter', []),
108
+					'fields' => $fields, 'group' => 'vc', 'tabindex' => $this->get('tabindex'),
109 109
 					'data' => [
110 110
 						'coupon.code.code' => [],
111 111
 						'coupon.code.count' => ['op' => '=='],
@@ -119,118 +119,118 @@  discard block
 block discarded – undo
119 119
 			?>
120 120
 
121 121
 			<tr class="list-item-new prototype">
122
-				<td colspan="<?= count( $fields ); ?>">
122
+				<td colspan="<?= count($fields); ?>">
123 123
 					<div class="content-block row">
124 124
 						<div class="col-xl-6">
125 125
 							<div class="form-group row mandatory">
126
-								<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Voucher' ) ); ?></label>
126
+								<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Voucher')); ?></label>
127 127
 								<div class="col-sm-8">
128
-									<input class="form-control coupon-code-code" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" required="required"
129
-										name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.code', '' ) ) ); ?>" disabled="disabled" />
128
+									<input class="form-control coupon-code-code" type="text" tabindex="<?= $this->get('tabindex'); ?>" required="required"
129
+										name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.code', ''))); ?>" disabled="disabled" />
130 130
 								</div>
131 131
 							</div>
132 132
 							<div class="form-group row mandatory">
133
-								<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Count' ) ); ?></label>
133
+								<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Count')); ?></label>
134 134
 								<div class="col-sm-8">
135
-									<input class="form-control coupon-code-count" type="number" min="0" step="1" tabindex="<?= $this->get( 'tabindex' ); ?>" required="required"
136
-										name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.count', '' ) ) ); ?>" disabled="disabled" />
135
+									<input class="form-control coupon-code-count" type="number" min="0" step="1" tabindex="<?= $this->get('tabindex'); ?>" required="required"
136
+										name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.count', ''))); ?>" disabled="disabled" />
137 137
 								</div>
138 138
 							</div>
139 139
 						</div>
140 140
 						<div class="col-xl-6">
141 141
 							<div class="form-group row optional">
142
-								<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Start date' ) ); ?></label>
142
+								<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Start date')); ?></label>
143 143
 								<div class="col-sm-8">
144
-									<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>"
145
-										name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.dateend', '' ) ) ); ?>" disabled="disabled" />
144
+									<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>"
145
+										name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.dateend', ''))); ?>" disabled="disabled" />
146 146
 								</div>
147 147
 							</div>
148 148
 							<div class="form-group row optional">
149
-								<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'End date' ) ); ?></label>
149
+								<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'End date')); ?></label>
150 150
 								<div class="col-sm-8">
151
-									<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>"
152
-										name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.dateend', '' ) ) ); ?>" disabled="disabled" />
151
+									<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>"
152
+										name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.dateend', ''))); ?>" disabled="disabled" />
153 153
 								</div>
154 154
 							</div>
155 155
 						</div>
156 156
 					</div>
157 157
 				</td>
158 158
 				<td class="actions">
159
-					<input type="hidden" name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.id', '' ) ) ); ?>" disabled="disabled" />
159
+					<input type="hidden" name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.id', ''))); ?>" disabled="disabled" />
160 160
 
161
-					<a class="btn fa act-close" href="#" tabindex="<?= $this->get( 'tabindex' ); ?>"
162
-						title="<?= $enc->attr( $this->translate( 'admin', 'Close') ); ?>"
163
-						aria-label="<?= $enc->attr( $this->translate( 'admin', 'Close' ) ); ?>">
161
+					<a class="btn fa act-close" href="#" tabindex="<?= $this->get('tabindex'); ?>"
162
+						title="<?= $enc->attr($this->translate('admin', 'Close')); ?>"
163
+						aria-label="<?= $enc->attr($this->translate('admin', 'Close')); ?>">
164 164
 					</a>
165 165
 				</td>
166 166
 			</tr>
167 167
 
168
-			<?php foreach( $this->get( 'codeData/coupon.code.id', [] ) as $idx => $id ) : ?>
169
-				<tr class="list-item <?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?>">
170
-					<?php if( in_array( 'coupon.code.code', $fields ) ) : ?>
168
+			<?php foreach ($this->get('codeData/coupon.code.id', []) as $idx => $id) : ?>
169
+				<tr class="list-item <?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?>">
170
+					<?php if (in_array('coupon.code.code', $fields)) : ?>
171 171
 						<td class="coupon-code">
172
-							<input class="form-control coupon-code-code" type="text" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>"
173
-								name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.code', '' ) ) ); ?>"
174
-								value="<?= $enc->attr( $this->get( 'codeData/coupon.code.code/' . $idx ) ); ?>"
175
-								<?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?> disabled="disabled" />
172
+							<input class="form-control coupon-code-code" type="text" required="required" tabindex="<?= $this->get('tabindex'); ?>"
173
+								name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.code', ''))); ?>"
174
+								value="<?= $enc->attr($this->get('codeData/coupon.code.code/' . $idx)); ?>"
175
+								<?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?> disabled="disabled" />
176 176
 						</td>
177 177
 					<?php endif; ?>
178
-					<?php if( in_array( 'coupon.code.count', $fields ) ) : ?>
178
+					<?php if (in_array('coupon.code.count', $fields)) : ?>
179 179
 						<td class="coupon-count">
180
-							<input class="form-control coupon-code-count" type="number" min="0" step="1" tabindex="<?= $this->get( 'tabindex' ); ?>"
181
-								name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.count', '' ) ) ); ?>"
182
-								value="<?= $enc->attr( $this->get( 'codeData/coupon.code.count/' . $idx ) ); ?>"
183
-								<?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?> disabled="disabled" />
180
+							<input class="form-control coupon-code-count" type="number" min="0" step="1" tabindex="<?= $this->get('tabindex'); ?>"
181
+								name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.count', ''))); ?>"
182
+								value="<?= $enc->attr($this->get('codeData/coupon.code.count/' . $idx)); ?>"
183
+								<?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?> disabled="disabled" />
184 184
 						</td>
185 185
 					<?php endif; ?>
186
-					<?php if( in_array( 'coupon.code.datestart', $fields ) ) : ?>
186
+					<?php if (in_array('coupon.code.datestart', $fields)) : ?>
187 187
 						<td class="coupon-datestart">
188
-							<input class="form-control coupon-code-datestart" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>"
189
-								name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.datestart', '' ) ) ); ?>"
190
-								value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'codeData/coupon.code.datestart/' . $idx ) ) ); ?>"
191
-								<?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?> disabled="disabled" />
188
+							<input class="form-control coupon-code-datestart" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>"
189
+								name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.datestart', ''))); ?>"
190
+								value="<?= $enc->attr(str_replace(' ', 'T', $this->get('codeData/coupon.code.datestart/' . $idx))); ?>"
191
+								<?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?> disabled="disabled" />
192 192
 						</td>
193 193
 					<?php endif; ?>
194
-					<?php if( in_array( 'coupon.code.dateend', $fields ) ) : ?>
194
+					<?php if (in_array('coupon.code.dateend', $fields)) : ?>
195 195
 						<td class="coupon-dateend">
196
-							<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get( 'tabindex' ); ?>"
197
-								name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.dateend', '' ) ) ); ?>"
198
-								value="<?= $enc->attr( str_replace( ' ', 'T', $this->get( 'codeData/coupon.code.dateend/' . $idx ) ) ); ?>"
199
-								<?= $this->site()->readonly( $this->get( 'codeData/coupon.code.siteid/' . $idx ) ); ?> disabled="disabled" />
196
+							<input class="form-control coupon-code-dateend" type="datetime-local" tabindex="<?= $this->get('tabindex'); ?>"
197
+								name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.dateend', ''))); ?>"
198
+								value="<?= $enc->attr(str_replace(' ', 'T', $this->get('codeData/coupon.code.dateend/' . $idx))); ?>"
199
+								<?= $this->site()->readonly($this->get('codeData/coupon.code.siteid/' . $idx)); ?> disabled="disabled" />
200 200
 						</td>
201 201
 					<?php endif; ?>
202
-					<?php if( in_array( 'coupon.code.ctime', $fields ) ) : ?>
202
+					<?php if (in_array('coupon.code.ctime', $fields)) : ?>
203 203
 						<td class="coupon-ctime">
204 204
 							<span class="form-control coupon-code-ctime">
205
-								<?= $enc->attr( $this->get( 'codeData/coupon.code.ctime/' . $idx ) ); ?>
205
+								<?= $enc->attr($this->get('codeData/coupon.code.ctime/' . $idx)); ?>
206 206
 							</span>
207 207
 						</td>
208 208
 					<?php endif; ?>
209
-					<?php if( in_array( 'coupon.code.mtime', $fields ) ) : ?>
209
+					<?php if (in_array('coupon.code.mtime', $fields)) : ?>
210 210
 						<td class="coupon-mtime">
211 211
 							<span class="form-control coupon-code-mtime">
212
-								<?= $enc->attr( $this->get( 'codeData/coupon.code.mtime/' . $idx ) ); ?>
212
+								<?= $enc->attr($this->get('codeData/coupon.code.mtime/' . $idx)); ?>
213 213
 							</span>
214 214
 						</td>
215 215
 					<?php endif; ?>
216
-					<?php if( in_array( 'coupon.code.editor', $fields ) ) : ?>
216
+					<?php if (in_array('coupon.code.editor', $fields)) : ?>
217 217
 						<td class="coupon-editor">
218 218
 							<span class="form-control coupon-code-editor">
219
-								<?= $enc->attr( $this->get( 'codeData/coupon.code.editor/' . $idx ) ); ?>
219
+								<?= $enc->attr($this->get('codeData/coupon.code.editor/' . $idx)); ?>
220 220
 							</span>
221 221
 						</td>
222 222
 					<?php endif; ?>
223 223
 					<td class="actions">
224
-						<input type="hidden" value="<?= $enc->attr( $id ); ?>" disabled="disabled"
225
-							name="<?= $enc->attr( $this->formparam( array( 'code', 'coupon.code.id', '' ) ) ); ?>" />
226
-
227
-						<a class="btn act-edit fa" tabindex="<?= $this->get( 'tabindex' ); ?>" href="#"
228
-							title="<?= $enc->attr( $this->translate( 'admin', 'Edit this entry') ); ?>"
229
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'Edit' ) ); ?>"></a>
230
-						<a class="btn fa act-delete" tabindex="<?= $this->get( 'tabindex' ); ?>"
231
-							href="<?= $this->url( $jsonTarget, $jsonCntl, $jsonAction, ['resource' => 'coupon/code', 'id' => $id], [], $jsonConfig ); ?>"
232
-							title="<?= $enc->attr( $this->translate( 'admin', 'Delete') ); ?>"
233
-							aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ); ?>">
224
+						<input type="hidden" value="<?= $enc->attr($id); ?>" disabled="disabled"
225
+							name="<?= $enc->attr($this->formparam(array('code', 'coupon.code.id', ''))); ?>" />
226
+
227
+						<a class="btn act-edit fa" tabindex="<?= $this->get('tabindex'); ?>" href="#"
228
+							title="<?= $enc->attr($this->translate('admin', 'Edit this entry')); ?>"
229
+							aria-label="<?= $enc->attr($this->translate('admin', 'Edit')); ?>"></a>
230
+						<a class="btn fa act-delete" tabindex="<?= $this->get('tabindex'); ?>"
231
+							href="<?= $this->url($jsonTarget, $jsonCntl, $jsonAction, ['resource' => 'coupon/code', 'id' => $id], [], $jsonConfig); ?>"
232
+							title="<?= $enc->attr($this->translate('admin', 'Delete')); ?>"
233
+							aria-label="<?= $enc->attr($this->translate('admin', 'Delete')); ?>">
234 234
 						</a>
235 235
 					</td>
236 236
 				</tr>
@@ -238,16 +238,16 @@  discard block
 block discarded – undo
238 238
 		</tbody>
239 239
 	</table>
240 240
 
241
-	<?php if( $this->get( 'codeData/coupon.code.siteid', [] ) === [] ) : ?>
242
-		<div class="noitems"><?= $enc->html( sprintf( $this->translate( 'admin', 'No items found' ) ) ); ?></div>
241
+	<?php if ($this->get('codeData/coupon.code.siteid', []) === []) : ?>
242
+		<div class="noitems"><?= $enc->html(sprintf($this->translate('admin', 'No items found'))); ?></div>
243 243
 	<?php endif; ?>
244 244
 
245 245
 	<?= $this->partial(
246
-			$this->config( 'admin/jqadm/partial/pagination', 'common/partials/pagination-standard' ),
247
-			['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get( 'codeTotal' ),
246
+			$this->config('admin/jqadm/partial/pagination', 'common/partials/pagination-standard'),
247
+			['pageParams' => $params, 'pos' => 'bottom', 'total' => $this->get('codeTotal'),
248 248
 			'group' => 'vc', 'action' => 'get', 'fragment' => 'code',
249
-			'page' =>$this->session( 'aimeos/admin/jqadm/couponcode/page', [] )]
249
+			'page' =>$this->session('aimeos/admin/jqadm/couponcode/page', [])]
250 250
 		);
251 251
 	?>
252 252
 </div>
253
-<?= $this->get( 'codeBody' ); ?>
253
+<?= $this->get('codeBody'); ?>
Please login to merge, or discard this patch.
admin/jqadm/tests/Admin/JQAdm/Attribute/StandardTest.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -300,6 +300,9 @@
 block discarded – undo
300 300
 	}
301 301
 
302 302
 
303
+	/**
304
+	 * @param string $method
305
+	 */
303 306
 	public function getClientMock( $method )
304 307
 	{
305 308
 		$object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Attribute\Standard::class )
Please login to merge, or discard this patch.
Spacing   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -19,22 +19,22 @@  discard block
 block discarded – undo
19 19
 	protected function setUp()
20 20
 	{
21 21
 		$this->view = \TestHelperJqadm::getView();
22
-		$request = $this->getMockBuilder( \Psr\Http\Message\ServerRequestInterface::class )->getMock();
23
-		$helper = new \Aimeos\MW\View\Helper\Request\Standard( $this->view, $request, '127.0.0.1', 'test' );
24
-		$this->view ->addHelper( 'request', $helper );
22
+		$request = $this->getMockBuilder(\Psr\Http\Message\ServerRequestInterface::class)->getMock();
23
+		$helper = new \Aimeos\MW\View\Helper\Request\Standard($this->view, $request, '127.0.0.1', 'test');
24
+		$this->view ->addHelper('request', $helper);
25 25
 
26 26
 		$this->context = \TestHelperJqadm::getContext();
27 27
 
28
-		$this->object = new \Aimeos\Admin\JQAdm\Attribute\Standard( $this->context );
29
-		$this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page( $this->object, $this->context );
30
-		$this->object->setAimeos( \TestHelperJqadm::getAimeos() );
31
-		$this->object->setView( $this->view );
28
+		$this->object = new \Aimeos\Admin\JQAdm\Attribute\Standard($this->context);
29
+		$this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page($this->object, $this->context);
30
+		$this->object->setAimeos(\TestHelperJqadm::getAimeos());
31
+		$this->object->setView($this->view);
32 32
 	}
33 33
 
34 34
 
35 35
 	protected function tearDown()
36 36
 	{
37
-		unset( $this->object, $this->view, $this->context );
37
+		unset($this->object, $this->view, $this->context);
38 38
 	}
39 39
 
40 40
 
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
 
47 47
 	public function testCreateException()
48 48
 	{
49
-		$object = $this->getClientMock( 'getSubClients' );
49
+		$object = $this->getClientMock('getSubClients');
50 50
 
51
-		$object->expects( $this->once() )->method( 'getSubClients' )
52
-			->will( $this->throwException( new \RuntimeException() ) );
51
+		$object->expects($this->once())->method('getSubClients')
52
+			->will($this->throwException(new \RuntimeException()));
53 53
 
54 54
 		$object->create();
55 55
 	}
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
 
58 58
 	public function testCreateMShopException()
59 59
 	{
60
-		$object = $this->getClientMock( 'getSubClients' );
60
+		$object = $this->getClientMock('getSubClients');
61 61
 
62
-		$object->expects( $this->once() )->method( 'getSubClients' )
63
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
62
+		$object->expects($this->once())->method('getSubClients')
63
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
64 64
 
65 65
 		$object->create();
66 66
 	}
@@ -68,24 +68,24 @@  discard block
 block discarded – undo
68 68
 
69 69
 	public function testCopy()
70 70
 	{
71
-		$manager = \Aimeos\MShop::create( $this->context, 'attribute' );
71
+		$manager = \Aimeos\MShop::create($this->context, 'attribute');
72 72
 
73
-		$param = ['site' => 'unittest', 'id' => $manager->findItem( '30', [], 'product', 'length' )->getId()];
74
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
75
-		$this->view->addHelper( 'param', $helper );
73
+		$param = ['site' => 'unittest', 'id' => $manager->findItem('30', [], 'product', 'length')->getId()];
74
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
75
+		$this->view->addHelper('param', $helper);
76 76
 
77 77
 		$result = $this->object->copy();
78 78
 
79
-		$this->assertContains( '30_copy', $result );
79
+		$this->assertContains('30_copy', $result);
80 80
 	}
81 81
 
82 82
 
83 83
 	public function testCopyException()
84 84
 	{
85
-		$object = $this->getClientMock( 'getSubClients' );
85
+		$object = $this->getClientMock('getSubClients');
86 86
 
87
-		$object->expects( $this->once() )->method( 'getSubClients' )
88
-			->will( $this->throwException( new \RuntimeException() ) );
87
+		$object->expects($this->once())->method('getSubClients')
88
+			->will($this->throwException(new \RuntimeException()));
89 89
 
90 90
 		$object->copy();
91 91
 	}
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 
94 94
 	public function testCopyMShopException()
95 95
 	{
96
-		$object = $this->getClientMock( 'getSubClients' );
96
+		$object = $this->getClientMock('getSubClients');
97 97
 
98
-		$object->expects( $this->once() )->method( 'getSubClients' )
99
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
98
+		$object->expects($this->once())->method('getSubClients')
99
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
100 100
 
101 101
 		$object->copy();
102 102
 	}
@@ -104,16 +104,16 @@  discard block
 block discarded – undo
104 104
 
105 105
 	public function testDelete()
106 106
 	{
107
-		$this->assertNotNull( $this->object->delete() );
107
+		$this->assertNotNull($this->object->delete());
108 108
 	}
109 109
 
110 110
 
111 111
 	public function testDeleteException()
112 112
 	{
113
-		$object = $this->getClientMock( 'getSubClients' );
113
+		$object = $this->getClientMock('getSubClients');
114 114
 
115
-		$object->expects( $this->exactly( 2 ) )->method( 'getSubClients' )
116
-			->will( $this->throwException( new \RuntimeException() ) );
115
+		$object->expects($this->exactly(2))->method('getSubClients')
116
+			->will($this->throwException(new \RuntimeException()));
117 117
 
118 118
 		$object->delete();
119 119
 	}
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 
122 122
 	public function testDeleteMShopException()
123 123
 	{
124
-		$object = $this->getClientMock( 'getSubClients' );
124
+		$object = $this->getClientMock('getSubClients');
125 125
 
126
-		$object->expects( $this->exactly( 2 ) )->method( 'getSubClients' )
127
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
126
+		$object->expects($this->exactly(2))->method('getSubClients')
127
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
128 128
 
129 129
 		$object->delete();
130 130
 	}
@@ -132,24 +132,24 @@  discard block
 block discarded – undo
132 132
 
133 133
 	public function testGet()
134 134
 	{
135
-		$manager = \Aimeos\MShop::create( $this->context, 'attribute' );
135
+		$manager = \Aimeos\MShop::create($this->context, 'attribute');
136 136
 
137
-		$param = ['site' => 'unittest', 'id' => $manager->findItem( '30', [], 'product', 'length' )->getId()];
138
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
139
-		$this->view->addHelper( 'param', $helper );
137
+		$param = ['site' => 'unittest', 'id' => $manager->findItem('30', [], 'product', 'length')->getId()];
138
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
139
+		$this->view->addHelper('param', $helper);
140 140
 
141 141
 		$result = $this->object->get();
142 142
 
143
-		$this->assertContains( '"30"', $result );
143
+		$this->assertContains('"30"', $result);
144 144
 	}
145 145
 
146 146
 
147 147
 	public function testGetException()
148 148
 	{
149
-		$object = $this->getClientMock( 'getSubClients' );
149
+		$object = $this->getClientMock('getSubClients');
150 150
 
151
-		$object->expects( $this->once() )->method( 'getSubClients' )
152
-			->will( $this->throwException( new \RuntimeException() ) );
151
+		$object->expects($this->once())->method('getSubClients')
152
+			->will($this->throwException(new \RuntimeException()));
153 153
 
154 154
 		$object->get();
155 155
 	}
@@ -157,10 +157,10 @@  discard block
 block discarded – undo
157 157
 
158 158
 	public function testGetMShopException()
159 159
 	{
160
-		$object = $this->getClientMock( 'getSubClients' );
160
+		$object = $this->getClientMock('getSubClients');
161 161
 
162
-		$object->expects( $this->once() )->method( 'getSubClients' )
163
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
162
+		$object->expects($this->once())->method('getSubClients')
163
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
164 164
 
165 165
 		$object->get();
166 166
 	}
@@ -168,16 +168,16 @@  discard block
 block discarded – undo
168 168
 
169 169
 	public function testGetViewException()
170 170
 	{
171
-		$object = new \Aimeos\Admin\JQAdm\Attribute\Standard( $this->context, [] );
171
+		$object = new \Aimeos\Admin\JQAdm\Attribute\Standard($this->context, []);
172 172
 
173
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
173
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
174 174
 		$object->getView();
175 175
 	}
176 176
 
177 177
 
178 178
 	public function testSave()
179 179
 	{
180
-		$manager = \Aimeos\MShop::create( $this->context, 'attribute' );
180
+		$manager = \Aimeos\MShop::create($this->context, 'attribute');
181 181
 
182 182
 		$param = array(
183 183
 			'site' => 'unittest',
@@ -192,21 +192,21 @@  discard block
 block discarded – undo
192 192
 			),
193 193
 		);
194 194
 
195
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
196
-		$this->view->addHelper( 'param', $helper );
195
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
196
+		$this->view->addHelper('param', $helper);
197 197
 
198 198
 		$this->object->save();
199 199
 
200
-		$manager->deleteItem( $manager->findItem( 'test', [], 'product', 'color' )->getId() );
200
+		$manager->deleteItem($manager->findItem('test', [], 'product', 'color')->getId());
201 201
 	}
202 202
 
203 203
 
204 204
 	public function testSaveException()
205 205
 	{
206
-		$object = $this->getClientMock( 'fromArray' );
206
+		$object = $this->getClientMock('fromArray');
207 207
 
208
-		$object->expects( $this->once() )->method( 'fromArray' )
209
-			->will( $this->throwException( new \RuntimeException() ) );
208
+		$object->expects($this->once())->method('fromArray')
209
+			->will($this->throwException(new \RuntimeException()));
210 210
 
211 211
 		$object->save();
212 212
 	}
@@ -214,10 +214,10 @@  discard block
 block discarded – undo
214 214
 
215 215
 	public function testSaveMShopException()
216 216
 	{
217
-		$object = $this->getClientMock( 'fromArray' );
217
+		$object = $this->getClientMock('fromArray');
218 218
 
219
-		$object->expects( $this->once() )->method( 'fromArray' )
220
-			->will( $this->throwException( new \RuntimeException() ) );
219
+		$object->expects($this->once())->method('fromArray')
220
+			->will($this->throwException(new \RuntimeException()));
221 221
 
222 222
 		$object->save();
223 223
 	}
@@ -225,10 +225,10 @@  discard block
 block discarded – undo
225 225
 
226 226
 	public function testSaveJQAdmException()
227 227
 	{
228
-		$object = $this->getClientMock( 'fromArray' );
228
+		$object = $this->getClientMock('fromArray');
229 229
 
230
-		$object->expects( $this->once() )->method( 'fromArray' )
231
-			->will( $this->throwException( new \RuntimeException() ) );
230
+		$object->expects($this->once())->method('fromArray')
231
+			->will($this->throwException(new \RuntimeException()));
232 232
 
233 233
 		$object->save();
234 234
 	}
@@ -239,27 +239,27 @@  discard block
 block discarded – undo
239 239
 		$param = array(
240 240
 			'site' => 'unittest', 'lang' => 'de',
241 241
 			'filter' => array(
242
-				'key' => array( 0 => 'attribute.code' ),
243
-				'op' => array( 0 => '==' ),
244
-				'val' => array( 0 => '30' ),
242
+				'key' => array(0 => 'attribute.code'),
243
+				'op' => array(0 => '=='),
244
+				'val' => array(0 => '30'),
245 245
 			),
246
-			'sort' => array( 'attribute.label', '-attribute.id' ),
246
+			'sort' => array('attribute.label', '-attribute.id'),
247 247
 		);
248
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
249
-		$this->view->addHelper( 'param', $helper );
248
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
249
+		$this->view->addHelper('param', $helper);
250 250
 
251 251
 		$result = $this->object->search();
252 252
 
253
-		$this->assertContains( '>30<', $result );
253
+		$this->assertContains('>30<', $result);
254 254
 	}
255 255
 
256 256
 
257 257
 	public function testSearchException()
258 258
 	{
259
-		$object = $this->getClientMock( 'initCriteria' );
259
+		$object = $this->getClientMock('initCriteria');
260 260
 
261
-		$object->expects( $this->once() )->method( 'initCriteria' )
262
-			->will( $this->throwException( new \RuntimeException() ) );
261
+		$object->expects($this->once())->method('initCriteria')
262
+			->will($this->throwException(new \RuntimeException()));
263 263
 
264 264
 		$object->search();
265 265
 	}
@@ -267,10 +267,10 @@  discard block
 block discarded – undo
267 267
 
268 268
 	public function testSearchMShopException()
269 269
 	{
270
-		$object = $this->getClientMock( 'initCriteria' );
270
+		$object = $this->getClientMock('initCriteria');
271 271
 
272
-		$object->expects( $this->once() )->method( 'initCriteria' )
273
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
272
+		$object->expects($this->once())->method('initCriteria')
273
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
274 274
 
275 275
 		$object->search();
276 276
 	}
@@ -278,34 +278,34 @@  discard block
 block discarded – undo
278 278
 
279 279
 	public function testGetSubClient()
280 280
 	{
281
-		$result = $this->object->getSubClient( 'media' );
282
-		$this->assertInstanceOf( \Aimeos\Admin\JQAdm\Iface::class, $result );
281
+		$result = $this->object->getSubClient('media');
282
+		$this->assertInstanceOf(\Aimeos\Admin\JQAdm\Iface::class, $result);
283 283
 	}
284 284
 
285 285
 
286 286
 	public function testGetSubClientInvalid()
287 287
 	{
288
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
289
-		$this->object->getSubClient( '$unknown$' );
288
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
289
+		$this->object->getSubClient('$unknown$');
290 290
 	}
291 291
 
292 292
 
293 293
 	public function testGetSubClientUnknown()
294 294
 	{
295
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
296
-		$this->object->getSubClient( 'unknown' );
295
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
296
+		$this->object->getSubClient('unknown');
297 297
 	}
298 298
 
299 299
 
300
-	public function getClientMock( $method )
300
+	public function getClientMock($method)
301 301
 	{
302
-		$object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Attribute\Standard::class )
303
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
304
-			->setMethods( [$method] )
302
+		$object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Attribute\Standard::class)
303
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
304
+			->setMethods([$method])
305 305
 			->getMock();
306 306
 
307
-		$object->setAimeos( \TestHelperJqadm::getAimeos() );
308
-		$object->setView( $this->getViewNoRender() );
307
+		$object->setAimeos(\TestHelperJqadm::getAimeos());
308
+		$object->setView($this->getViewNoRender());
309 309
 
310 310
 		return $object;
311 311
 	}
@@ -313,19 +313,19 @@  discard block
 block discarded – undo
313 313
 
314 314
 	protected function getViewNoRender()
315 315
 	{
316
-		$view = $this->getMockBuilder( \Aimeos\MW\View\Standard::class )
317
-			->setConstructorArgs( array( [] ) )
318
-			->setMethods( array( 'render', 'config' ) )
316
+		$view = $this->getMockBuilder(\Aimeos\MW\View\Standard::class)
317
+			->setConstructorArgs(array([]))
318
+			->setMethods(array('render', 'config'))
319 319
 			->getMock();
320 320
 
321
-		$manager = \Aimeos\MShop::create( $this->context, 'attribute' );
321
+		$manager = \Aimeos\MShop::create($this->context, 'attribute');
322 322
 
323
-		$param = ['site' => 'unittest', 'id' => $manager->findItem( '30', [], 'product', 'length' )->getId()];
324
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param );
325
-		$view->addHelper( 'param', $helper );
323
+		$param = ['site' => 'unittest', 'id' => $manager->findItem('30', [], 'product', 'length')->getId()];
324
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $param);
325
+		$view->addHelper('param', $helper);
326 326
 
327
-		$helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, [] );
328
-		$view->addHelper( 'access', $helper );
327
+		$helper = new \Aimeos\MW\View\Helper\Access\Standard($view, []);
328
+		$view->addHelper('access', $helper);
329 329
 
330 330
 		return $view;
331 331
 	}
Please login to merge, or discard this patch.
admin/jqadm/tests/Admin/JQAdm/Catalog/StandardTest.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -294,6 +294,9 @@
 block discarded – undo
294 294
 	}
295 295
 
296 296
 
297
+	/**
298
+	 * @param string $method
299
+	 */
297 300
 	public function getClientMock( $method )
298 301
 	{
299 302
 		$object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Catalog\Standard::class )
Please login to merge, or discard this patch.
Spacing   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -21,43 +21,43 @@  discard block
 block discarded – undo
21 21
 		$this->view = \TestHelperJqadm::getView();
22 22
 		$this->context = \TestHelperJqadm::getContext();
23 23
 
24
-		$request = $this->getMockBuilder( \Psr\Http\Message\ServerRequestInterface::class )->getMock();
25
-		$helper = new \Aimeos\MW\View\Helper\Request\Standard( $this->view, $request, '127.0.0.1', 'test' );
26
-		$this->view ->addHelper( 'request', $helper );
27
-
28
-		$this->object = new \Aimeos\Admin\JQAdm\Catalog\Standard( $this->context );
29
-		$this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page( $this->object, $this->context );
30
-		$this->object->setAimeos( \TestHelperJqadm::getAimeos() );
31
-		$this->object->setView( $this->view );
24
+		$request = $this->getMockBuilder(\Psr\Http\Message\ServerRequestInterface::class)->getMock();
25
+		$helper = new \Aimeos\MW\View\Helper\Request\Standard($this->view, $request, '127.0.0.1', 'test');
26
+		$this->view ->addHelper('request', $helper);
27
+
28
+		$this->object = new \Aimeos\Admin\JQAdm\Catalog\Standard($this->context);
29
+		$this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page($this->object, $this->context);
30
+		$this->object->setAimeos(\TestHelperJqadm::getAimeos());
31
+		$this->object->setView($this->view);
32 32
 	}
33 33
 
34 34
 
35 35
 	protected function tearDown()
36 36
 	{
37
-		unset( $this->object, $this->view, $this->context );
37
+		unset($this->object, $this->view, $this->context);
38 38
 	}
39 39
 
40 40
 
41 41
 	public function testCopy()
42 42
 	{
43
-		$manager = \Aimeos\MShop::create( $this->context, 'catalog' );
43
+		$manager = \Aimeos\MShop::create($this->context, 'catalog');
44 44
 
45
-		$param = ['site' => 'unittest', 'id' => $manager->findItem( 'cafe' )->getId()];
46
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
47
-		$this->view->addHelper( 'param', $helper );
45
+		$param = ['site' => 'unittest', 'id' => $manager->findItem('cafe')->getId()];
46
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
47
+		$this->view->addHelper('param', $helper);
48 48
 
49 49
 		$result = $this->object->copy();
50 50
 
51
-		$this->assertContains( 'cafe_copy', $result );
51
+		$this->assertContains('cafe_copy', $result);
52 52
 	}
53 53
 
54 54
 
55 55
 	public function testCopyException()
56 56
 	{
57
-		$object = $this->getClientMock( 'getSubClients' );
57
+		$object = $this->getClientMock('getSubClients');
58 58
 
59
-		$object->expects( $this->once() )->method( 'getSubClients' )
60
-			->will( $this->throwException( new \RuntimeException() ) );
59
+		$object->expects($this->once())->method('getSubClients')
60
+			->will($this->throwException(new \RuntimeException()));
61 61
 
62 62
 		$object->copy();
63 63
 	}
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 
66 66
 	public function testCopyMShopException()
67 67
 	{
68
-		$object = $this->getClientMock( 'getSubClients' );
68
+		$object = $this->getClientMock('getSubClients');
69 69
 
70
-		$object->expects( $this->once() )->method( 'getSubClients' )
71
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
70
+		$object->expects($this->once())->method('getSubClients')
71
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
72 72
 
73 73
 		$object->copy();
74 74
 	}
@@ -76,16 +76,16 @@  discard block
 block discarded – undo
76 76
 
77 77
 	public function testCreate()
78 78
 	{
79
-		$this->assertContains( 'item-catalog', $this->object->create() );
79
+		$this->assertContains('item-catalog', $this->object->create());
80 80
 	}
81 81
 
82 82
 
83 83
 	public function testCreateException()
84 84
 	{
85
-		$object = $this->getClientMock( 'getSubClients' );
85
+		$object = $this->getClientMock('getSubClients');
86 86
 
87
-		$object->expects( $this->once() )->method( 'getSubClients' )
88
-			->will( $this->throwException( new \RuntimeException() ) );
87
+		$object->expects($this->once())->method('getSubClients')
88
+			->will($this->throwException(new \RuntimeException()));
89 89
 
90 90
 		$object->create();
91 91
 	}
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 
94 94
 	public function testCreateMShopException()
95 95
 	{
96
-		$object = $this->getClientMock( 'getSubClients' );
96
+		$object = $this->getClientMock('getSubClients');
97 97
 
98
-		$object->expects( $this->once() )->method( 'getSubClients' )
99
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
98
+		$object->expects($this->once())->method('getSubClients')
99
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
100 100
 
101 101
 		$object->create();
102 102
 	}
@@ -104,16 +104,16 @@  discard block
 block discarded – undo
104 104
 
105 105
 	public function testDelete()
106 106
 	{
107
-		$this->assertNotNull( $this->object->delete() );
107
+		$this->assertNotNull($this->object->delete());
108 108
 	}
109 109
 
110 110
 
111 111
 	public function testDeleteException()
112 112
 	{
113
-		$object = $this->getClientMock( 'getSubClients' );
113
+		$object = $this->getClientMock('getSubClients');
114 114
 
115
-		$object->expects( $this->once() )->method( 'getSubClients' )
116
-			->will( $this->throwException( new \RuntimeException() ) );
115
+		$object->expects($this->once())->method('getSubClients')
116
+			->will($this->throwException(new \RuntimeException()));
117 117
 
118 118
 		$object->delete();
119 119
 	}
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 
122 122
 	public function testDeleteMShopException()
123 123
 	{
124
-		$object = $this->getClientMock( 'getSubClients' );
124
+		$object = $this->getClientMock('getSubClients');
125 125
 
126
-		$object->expects( $this->once() )->method( 'getSubClients' )
127
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
126
+		$object->expects($this->once())->method('getSubClients')
127
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
128 128
 
129 129
 		$object->delete();
130 130
 	}
@@ -132,24 +132,24 @@  discard block
 block discarded – undo
132 132
 
133 133
 	public function testGet()
134 134
 	{
135
-		$manager = \Aimeos\MShop::create( $this->context, 'catalog' );
135
+		$manager = \Aimeos\MShop::create($this->context, 'catalog');
136 136
 
137
-		$param = ['site' => 'unittest', 'id' => $manager->findItem( 'cafe' )->getId()];
138
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
139
-		$this->view->addHelper( 'param', $helper );
137
+		$param = ['site' => 'unittest', 'id' => $manager->findItem('cafe')->getId()];
138
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
139
+		$this->view->addHelper('param', $helper);
140 140
 
141 141
 		$result = $this->object->get();
142 142
 
143
-		$this->assertContains( 'cafe', $result );
143
+		$this->assertContains('cafe', $result);
144 144
 	}
145 145
 
146 146
 
147 147
 	public function testGetException()
148 148
 	{
149
-		$object = $this->getClientMock( 'getSubClients' );
149
+		$object = $this->getClientMock('getSubClients');
150 150
 
151
-		$object->expects( $this->once() )->method( 'getSubClients' )
152
-			->will( $this->throwException( new \RuntimeException() ) );
151
+		$object->expects($this->once())->method('getSubClients')
152
+			->will($this->throwException(new \RuntimeException()));
153 153
 
154 154
 		$object->get();
155 155
 	}
@@ -157,10 +157,10 @@  discard block
 block discarded – undo
157 157
 
158 158
 	public function testGetMShopException()
159 159
 	{
160
-		$object = $this->getClientMock( 'getSubClients' );
160
+		$object = $this->getClientMock('getSubClients');
161 161
 
162
-		$object->expects( $this->once() )->method( 'getSubClients' )
163
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
162
+		$object->expects($this->once())->method('getSubClients')
163
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
164 164
 
165 165
 		$object->get();
166 166
 	}
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
 
169 169
 	public function testGetViewException()
170 170
 	{
171
-		$object = new \Aimeos\Admin\JQAdm\Catalog\Standard( $this->context, [] );
171
+		$object = new \Aimeos\Admin\JQAdm\Catalog\Standard($this->context, []);
172 172
 
173
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
173
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
174 174
 		$object->getView();
175 175
 	}
176 176
 
@@ -187,31 +187,31 @@  discard block
 block discarded – undo
187 187
 				'catalog.datestart' => null,
188 188
 				'catalog.dateend' => null,
189 189
 				'config' => array(
190
-					'key' => array( 0 => 'test key' ),
191
-					'val' => array( 0 => 'test value' ),
190
+					'key' => array(0 => 'test key'),
191
+					'val' => array(0 => 'test value'),
192 192
 				),
193 193
 			),
194 194
 		);
195 195
 
196
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
197
-		$this->view->addHelper( 'param', $helper );
196
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
197
+		$this->view->addHelper('param', $helper);
198 198
 
199 199
 		$this->object->save();
200 200
 
201
-		$manager = \Aimeos\MShop::create( $this->context, 'catalog' );
202
-		$item = $manager->findItem( 'jqadm catalog test' );
203
-		$manager->deleteItem( $item->getId() );
201
+		$manager = \Aimeos\MShop::create($this->context, 'catalog');
202
+		$item = $manager->findItem('jqadm catalog test');
203
+		$manager->deleteItem($item->getId());
204 204
 
205
-		$this->assertEquals( ['test key' => 'test value'], $item->getConfig() );
205
+		$this->assertEquals(['test key' => 'test value'], $item->getConfig());
206 206
 	}
207 207
 
208 208
 
209 209
 	public function testSaveException()
210 210
 	{
211
-		$object = $this->getClientMock( 'fromArray' );
211
+		$object = $this->getClientMock('fromArray');
212 212
 
213
-		$object->expects( $this->once() )->method( 'fromArray' )
214
-			->will( $this->throwException( new \RuntimeException() ) );
213
+		$object->expects($this->once())->method('fromArray')
214
+			->will($this->throwException(new \RuntimeException()));
215 215
 
216 216
 		$object->save();
217 217
 	}
@@ -219,10 +219,10 @@  discard block
 block discarded – undo
219 219
 
220 220
 	public function testSaveMShopException()
221 221
 	{
222
-		$object = $this->getClientMock( 'fromArray' );
222
+		$object = $this->getClientMock('fromArray');
223 223
 
224
-		$object->expects( $this->once() )->method( 'fromArray' )
225
-			->will( $this->throwException( new \RuntimeException() ) );
224
+		$object->expects($this->once())->method('fromArray')
225
+			->will($this->throwException(new \RuntimeException()));
226 226
 
227 227
 		$object->save();
228 228
 	}
@@ -230,10 +230,10 @@  discard block
 block discarded – undo
230 230
 
231 231
 	public function testSaveJQAdmException()
232 232
 	{
233
-		$object = $this->getClientMock( 'fromArray' );
233
+		$object = $this->getClientMock('fromArray');
234 234
 
235
-		$object->expects( $this->once() )->method( 'fromArray' )
236
-			->will( $this->throwException( new \RuntimeException() ) );
235
+		$object->expects($this->once())->method('fromArray')
236
+			->will($this->throwException(new \RuntimeException()));
237 237
 
238 238
 		$object->save();
239 239
 	}
@@ -241,22 +241,22 @@  discard block
 block discarded – undo
241 241
 
242 242
 	public function testSearch()
243 243
 	{
244
-		$param = array( 'site' => 'unittest' );
245
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
246
-		$this->view->addHelper( 'param', $helper );
244
+		$param = array('site' => 'unittest');
245
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
246
+		$this->view->addHelper('param', $helper);
247 247
 
248 248
 		$result = $this->object->search();
249 249
 
250
-		$this->assertContains( '<div class="tree-content">', $result );
250
+		$this->assertContains('<div class="tree-content">', $result);
251 251
 	}
252 252
 
253 253
 
254 254
 	public function testSearchException()
255 255
 	{
256
-		$object = $this->getClientMock( 'getRootId' );
256
+		$object = $this->getClientMock('getRootId');
257 257
 
258
-		$object->expects( $this->once() )->method( 'getRootId' )
259
-			->will( $this->throwException( new \RuntimeException() ) );
258
+		$object->expects($this->once())->method('getRootId')
259
+			->will($this->throwException(new \RuntimeException()));
260 260
 
261 261
 		$object->search();
262 262
 	}
@@ -264,10 +264,10 @@  discard block
 block discarded – undo
264 264
 
265 265
 	public function testSearchMShopException()
266 266
 	{
267
-		$object = $this->getClientMock( 'getRootId' );
267
+		$object = $this->getClientMock('getRootId');
268 268
 
269
-		$object->expects( $this->once() )->method( 'getRootId' )
270
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
269
+		$object->expects($this->once())->method('getRootId')
270
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
271 271
 
272 272
 		$object->search();
273 273
 	}
@@ -275,34 +275,34 @@  discard block
 block discarded – undo
275 275
 
276 276
 	public function testGetSubClient()
277 277
 	{
278
-		$result = $this->object->getSubClient( 'media' );
279
-		$this->assertInstanceOf( \Aimeos\Admin\JQAdm\Iface::class, $result );
278
+		$result = $this->object->getSubClient('media');
279
+		$this->assertInstanceOf(\Aimeos\Admin\JQAdm\Iface::class, $result);
280 280
 	}
281 281
 
282 282
 
283 283
 	public function testGetSubClientInvalid()
284 284
 	{
285
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
286
-		$this->object->getSubClient( '$unknown$' );
285
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
286
+		$this->object->getSubClient('$unknown$');
287 287
 	}
288 288
 
289 289
 
290 290
 	public function testGetSubClientUnknown()
291 291
 	{
292
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
293
-		$this->object->getSubClient( 'unknown' );
292
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
293
+		$this->object->getSubClient('unknown');
294 294
 	}
295 295
 
296 296
 
297
-	public function getClientMock( $method )
297
+	public function getClientMock($method)
298 298
 	{
299
-		$object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Catalog\Standard::class )
300
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
301
-			->setMethods( [$method] )
299
+		$object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Catalog\Standard::class)
300
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
301
+			->setMethods([$method])
302 302
 			->getMock();
303 303
 
304
-		$object->setAimeos( \TestHelperJqadm::getAimeos() );
305
-		$object->setView( $this->getViewNoRender() );
304
+		$object->setAimeos(\TestHelperJqadm::getAimeos());
305
+		$object->setView($this->getViewNoRender());
306 306
 
307 307
 		return $object;
308 308
 	}
@@ -310,19 +310,19 @@  discard block
 block discarded – undo
310 310
 
311 311
 	protected function getViewNoRender()
312 312
 	{
313
-		$view = $this->getMockBuilder( \Aimeos\MW\View\Standard::class )
314
-			->setConstructorArgs( array( [] ) )
315
-			->setMethods( array( 'render', 'config' ) )
313
+		$view = $this->getMockBuilder(\Aimeos\MW\View\Standard::class)
314
+			->setConstructorArgs(array([]))
315
+			->setMethods(array('render', 'config'))
316 316
 			->getMock();
317 317
 
318
-		$manager = \Aimeos\MShop::create( $this->context, 'catalog' );
318
+		$manager = \Aimeos\MShop::create($this->context, 'catalog');
319 319
 
320
-		$param = ['site' => 'unittest', 'id' => $manager->findItem( 'cafe' )->getId()];
321
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param );
322
-		$view->addHelper( 'param', $helper );
320
+		$param = ['site' => 'unittest', 'id' => $manager->findItem('cafe')->getId()];
321
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $param);
322
+		$view->addHelper('param', $helper);
323 323
 
324
-		$helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, [] );
325
-		$view->addHelper( 'access', $helper );
324
+		$helper = new \Aimeos\MW\View\Helper\Access\Standard($view, []);
325
+		$view->addHelper('access', $helper);
326 326
 
327 327
 		return $view;
328 328
 	}
Please login to merge, or discard this patch.
admin/jqadm/tests/Admin/JQAdm/Coupon/StandardTest.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -306,6 +306,9 @@
 block discarded – undo
306 306
 	}
307 307
 
308 308
 
309
+	/**
310
+	 * @param string $method
311
+	 */
309 312
 	public function getClientMock( $method )
310 313
 	{
311 314
 		$object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Coupon\Standard::class )
Please login to merge, or discard this patch.
Spacing   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -19,22 +19,22 @@  discard block
 block discarded – undo
19 19
 	protected function setUp()
20 20
 	{
21 21
 		$this->view = \TestHelperJqadm::getView();
22
-		$request = $this->getMockBuilder( \Psr\Http\Message\ServerRequestInterface::class )->getMock();
23
-		$helper = new \Aimeos\MW\View\Helper\Request\Standard( $this->view, $request, '127.0.0.1', 'test' );
24
-		$this->view ->addHelper( 'request', $helper );
22
+		$request = $this->getMockBuilder(\Psr\Http\Message\ServerRequestInterface::class)->getMock();
23
+		$helper = new \Aimeos\MW\View\Helper\Request\Standard($this->view, $request, '127.0.0.1', 'test');
24
+		$this->view ->addHelper('request', $helper);
25 25
 
26 26
 		$this->context = \TestHelperJqadm::getContext();
27 27
 
28
-		$this->object = new \Aimeos\Admin\JQAdm\Coupon\Standard( $this->context );
29
-		$this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page( $this->object, $this->context );
30
-		$this->object->setAimeos( \TestHelperJqadm::getAimeos() );
31
-		$this->object->setView( $this->view );
28
+		$this->object = new \Aimeos\Admin\JQAdm\Coupon\Standard($this->context);
29
+		$this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page($this->object, $this->context);
30
+		$this->object->setAimeos(\TestHelperJqadm::getAimeos());
31
+		$this->object->setView($this->view);
32 32
 	}
33 33
 
34 34
 
35 35
 	protected function tearDown()
36 36
 	{
37
-		unset( $this->object, $this->view, $this->context );
37
+		unset($this->object, $this->view, $this->context);
38 38
 	}
39 39
 
40 40
 
@@ -42,16 +42,16 @@  discard block
 block discarded – undo
42 42
 	{
43 43
 		$result = $this->object->create();
44 44
 
45
-		$this->assertContains( 'item-coupon', $result );
45
+		$this->assertContains('item-coupon', $result);
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testCreateException()
50 50
 	{
51
-		$object = $this->getClientMock( 'getSubClientNames' );
51
+		$object = $this->getClientMock('getSubClientNames');
52 52
 
53
-		$object->expects( $this->once() )->method( 'getSubClientNames' )
54
-			->will( $this->throwException( new \RuntimeException() ) );
53
+		$object->expects($this->once())->method('getSubClientNames')
54
+			->will($this->throwException(new \RuntimeException()));
55 55
 
56 56
 		$object->create();
57 57
 	}
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 
60 60
 	public function testCreateMShopException()
61 61
 	{
62
-		$object = $this->getClientMock( 'getSubClientNames' );
62
+		$object = $this->getClientMock('getSubClientNames');
63 63
 
64
-		$object->expects( $this->once() )->method( 'getSubClientNames' )
65
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
64
+		$object->expects($this->once())->method('getSubClientNames')
65
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
66 66
 
67 67
 		$object->create();
68 68
 	}
@@ -71,21 +71,21 @@  discard block
 block discarded – undo
71 71
 	public function testCopy()
72 72
 	{
73 73
 		$param = ['site' => 'unittest', 'id' => $this->getCoupon()->getId()];
74
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
75
-		$this->view->addHelper( 'param', $helper );
74
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
75
+		$this->view->addHelper('param', $helper);
76 76
 
77 77
 		$result = $this->object->copy();
78 78
 
79
-		$this->assertContains( 'Unit test example', $result );
79
+		$this->assertContains('Unit test example', $result);
80 80
 	}
81 81
 
82 82
 
83 83
 	public function testCopyException()
84 84
 	{
85
-		$object = $this->getClientMock( 'getSubClientNames' );
85
+		$object = $this->getClientMock('getSubClientNames');
86 86
 
87
-		$object->expects( $this->once() )->method( 'getSubClientNames' )
88
-			->will( $this->throwException( new \RuntimeException() ) );
87
+		$object->expects($this->once())->method('getSubClientNames')
88
+			->will($this->throwException(new \RuntimeException()));
89 89
 
90 90
 		$object->copy();
91 91
 	}
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 
94 94
 	public function testCopyMShopException()
95 95
 	{
96
-		$object = $this->getClientMock( 'getSubClientNames' );
96
+		$object = $this->getClientMock('getSubClientNames');
97 97
 
98
-		$object->expects( $this->once() )->method( 'getSubClientNames' )
99
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
98
+		$object->expects($this->once())->method('getSubClientNames')
99
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
100 100
 
101 101
 		$object->copy();
102 102
 	}
@@ -104,16 +104,16 @@  discard block
 block discarded – undo
104 104
 
105 105
 	public function testDelete()
106 106
 	{
107
-		$this->assertNotNull( $this->object->delete() );
107
+		$this->assertNotNull($this->object->delete());
108 108
 	}
109 109
 
110 110
 
111 111
 	public function testDeleteException()
112 112
 	{
113
-		$object = $this->getClientMock( 'getSubClients' );
113
+		$object = $this->getClientMock('getSubClients');
114 114
 
115
-		$object->expects( $this->exactly( 2 ) )->method( 'getSubClients' )
116
-			->will( $this->throwException( new \RuntimeException() ) );
115
+		$object->expects($this->exactly(2))->method('getSubClients')
116
+			->will($this->throwException(new \RuntimeException()));
117 117
 
118 118
 		$object->delete();
119 119
 	}
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 
122 122
 	public function testDeleteMShopException()
123 123
 	{
124
-		$object = $this->getClientMock( 'getSubClients' );
124
+		$object = $this->getClientMock('getSubClients');
125 125
 
126
-		$object->expects( $this->exactly( 2 ) )->method( 'getSubClients' )
127
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
126
+		$object->expects($this->exactly(2))->method('getSubClients')
127
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
128 128
 
129 129
 		$object->delete();
130 130
 	}
@@ -133,21 +133,21 @@  discard block
 block discarded – undo
133 133
 	public function testGet()
134 134
 	{
135 135
 		$param = ['site' => 'unittest', 'id' => $this->getCoupon()->getId()];
136
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
137
-		$this->view->addHelper( 'param', $helper );
136
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
137
+		$this->view->addHelper('param', $helper);
138 138
 
139 139
 		$result = $this->object->get();
140 140
 
141
-		$this->assertContains( 'Unit test example', $result );
141
+		$this->assertContains('Unit test example', $result);
142 142
 	}
143 143
 
144 144
 
145 145
 	public function testGetException()
146 146
 	{
147
-		$object = $this->getClientMock( 'getSubClientNames' );
147
+		$object = $this->getClientMock('getSubClientNames');
148 148
 
149
-		$object->expects( $this->once() )->method( 'getSubClientNames' )
150
-			->will( $this->throwException( new \RuntimeException() ) );
149
+		$object->expects($this->once())->method('getSubClientNames')
150
+			->will($this->throwException(new \RuntimeException()));
151 151
 
152 152
 		$object->get();
153 153
 	}
@@ -155,10 +155,10 @@  discard block
 block discarded – undo
155 155
 
156 156
 	public function testGetMShopException()
157 157
 	{
158
-		$object = $this->getClientMock( 'getSubClientNames' );
158
+		$object = $this->getClientMock('getSubClientNames');
159 159
 
160
-		$object->expects( $this->once() )->method( 'getSubClientNames' )
161
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
160
+		$object->expects($this->once())->method('getSubClientNames')
161
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
162 162
 
163 163
 		$object->get();
164 164
 	}
@@ -166,16 +166,16 @@  discard block
 block discarded – undo
166 166
 
167 167
 	public function testGetViewException()
168 168
 	{
169
-		$object = new \Aimeos\Admin\JQAdm\Coupon\Standard( $this->context, [] );
169
+		$object = new \Aimeos\Admin\JQAdm\Coupon\Standard($this->context, []);
170 170
 
171
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
171
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
172 172
 		$object->getView();
173 173
 	}
174 174
 
175 175
 
176 176
 	public function testSave()
177 177
 	{
178
-		$manager = \Aimeos\MShop::create( $this->context, 'coupon' );
178
+		$manager = \Aimeos\MShop::create($this->context, 'coupon');
179 179
 
180 180
 		$param = array(
181 181
 			'site' => 'unittest',
@@ -186,27 +186,27 @@  discard block
 block discarded – undo
186 186
 				'coupon.datestart' => null,
187 187
 				'coupon.dateend' => null,
188 188
 				'config' => array(
189
-					'key' => array( 0 => 'test key' ),
190
-					'val' => array( 0 => 'test value' ),
189
+					'key' => array(0 => 'test key'),
190
+					'val' => array(0 => 'test value'),
191 191
 				),
192 192
 			),
193 193
 		);
194 194
 
195
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
196
-		$this->view->addHelper( 'param', $helper );
195
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
196
+		$this->view->addHelper('param', $helper);
197 197
 
198 198
 		$this->object->save();
199 199
 
200
-		$manager->deleteItem( $this->getCoupon( 'jqadm test label' )->getId() );
200
+		$manager->deleteItem($this->getCoupon('jqadm test label')->getId());
201 201
 	}
202 202
 
203 203
 
204 204
 	public function testSaveException()
205 205
 	{
206
-		$object = $this->getClientMock( 'fromArray' );
206
+		$object = $this->getClientMock('fromArray');
207 207
 
208
-		$object->expects( $this->once() )->method( 'fromArray' )
209
-			->will( $this->throwException( new \RuntimeException() ) );
208
+		$object->expects($this->once())->method('fromArray')
209
+			->will($this->throwException(new \RuntimeException()));
210 210
 
211 211
 		$object->save();
212 212
 	}
@@ -214,10 +214,10 @@  discard block
 block discarded – undo
214 214
 
215 215
 	public function testSaveMShopException()
216 216
 	{
217
-		$object = $this->getClientMock( 'fromArray' );
217
+		$object = $this->getClientMock('fromArray');
218 218
 
219
-		$object->expects( $this->once() )->method( 'fromArray' )
220
-			->will( $this->throwException( new \RuntimeException() ) );
219
+		$object->expects($this->once())->method('fromArray')
220
+			->will($this->throwException(new \RuntimeException()));
221 221
 
222 222
 		$object->save();
223 223
 	}
@@ -225,10 +225,10 @@  discard block
 block discarded – undo
225 225
 
226 226
 	public function testSaveJQAdmException()
227 227
 	{
228
-		$object = $this->getClientMock( 'fromArray' );
228
+		$object = $this->getClientMock('fromArray');
229 229
 
230
-		$object->expects( $this->once() )->method( 'fromArray' )
231
-			->will( $this->throwException( new \RuntimeException() ) );
230
+		$object->expects($this->once())->method('fromArray')
231
+			->will($this->throwException(new \RuntimeException()));
232 232
 
233 233
 		$object->save();
234 234
 	}
@@ -239,27 +239,27 @@  discard block
 block discarded – undo
239 239
 		$param = array(
240 240
 			'site' => 'unittest', 'lang' => 'de',
241 241
 			'filter' => array(
242
-				'key' => array( 0 => 'coupon.label' ),
243
-				'op' => array( 0 => '==' ),
244
-				'val' => array( 0 => 'Unit test example' ),
242
+				'key' => array(0 => 'coupon.label'),
243
+				'op' => array(0 => '=='),
244
+				'val' => array(0 => 'Unit test example'),
245 245
 			),
246
-			'sort' => array( '-coupon.id' ),
246
+			'sort' => array('-coupon.id'),
247 247
 		);
248
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
249
-		$this->view->addHelper( 'param', $helper );
248
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
249
+		$this->view->addHelper('param', $helper);
250 250
 
251 251
 		$result = $this->object->search();
252 252
 
253
-		$this->assertContains( '>Unit test example<', $result );
253
+		$this->assertContains('>Unit test example<', $result);
254 254
 	}
255 255
 
256 256
 
257 257
 	public function testSearchException()
258 258
 	{
259
-		$object = $this->getClientMock( 'initCriteria' );
259
+		$object = $this->getClientMock('initCriteria');
260 260
 
261
-		$object->expects( $this->once() )->method( 'initCriteria' )
262
-			->will( $this->throwException( new \RuntimeException() ) );
261
+		$object->expects($this->once())->method('initCriteria')
262
+			->will($this->throwException(new \RuntimeException()));
263 263
 
264 264
 		$object->search();
265 265
 	}
@@ -267,10 +267,10 @@  discard block
 block discarded – undo
267 267
 
268 268
 	public function testSearchMShopException()
269 269
 	{
270
-		$object = $this->getClientMock( 'initCriteria' );
270
+		$object = $this->getClientMock('initCriteria');
271 271
 
272
-		$object->expects( $this->once() )->method( 'initCriteria' )
273
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
272
+		$object->expects($this->once())->method('initCriteria')
273
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
274 274
 
275 275
 		$object->search();
276 276
 	}
@@ -278,43 +278,43 @@  discard block
 block discarded – undo
278 278
 
279 279
 	public function testGetSubClient()
280 280
 	{
281
-		$result = $this->object->getSubClient( 'code' );
282
-		$this->assertInstanceOf( \Aimeos\Admin\JQAdm\Iface::class, $result );
281
+		$result = $this->object->getSubClient('code');
282
+		$this->assertInstanceOf(\Aimeos\Admin\JQAdm\Iface::class, $result);
283 283
 	}
284 284
 
285 285
 
286 286
 	public function testGetSubClientInvalid()
287 287
 	{
288
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
289
-		$this->object->getSubClient( '$unknown$' );
288
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
289
+		$this->object->getSubClient('$unknown$');
290 290
 	}
291 291
 
292 292
 
293 293
 	public function testGetSubClientUnknown()
294 294
 	{
295
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
296
-		$this->object->getSubClient( 'unknown' );
295
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
296
+		$this->object->getSubClient('unknown');
297 297
 	}
298 298
 
299 299
 
300 300
 	public function testGetSubClientDecoratorInvalid()
301 301
 	{
302
-		$this->context->getConfig()->set( 'admin/jqadm/coupon/code/decorators/global', array( 'Invalid' ) );
302
+		$this->context->getConfig()->set('admin/jqadm/coupon/code/decorators/global', array('Invalid'));
303 303
 
304
-		$this->setExpectedException( \Aimeos\Admin\JQAdm\Exception::class );
305
-		$this->object->getSubClient( 'code' );
304
+		$this->setExpectedException(\Aimeos\Admin\JQAdm\Exception::class);
305
+		$this->object->getSubClient('code');
306 306
 	}
307 307
 
308 308
 
309
-	public function getClientMock( $method )
309
+	public function getClientMock($method)
310 310
 	{
311
-		$object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Coupon\Standard::class )
312
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
313
-			->setMethods( [$method] )
311
+		$object = $this->getMockBuilder(\Aimeos\Admin\JQAdm\Coupon\Standard::class)
312
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
313
+			->setMethods([$method])
314 314
 			->getMock();
315 315
 
316
-		$object->setAimeos( \TestHelperJqadm::getAimeos() );
317
-		$object->setView( $this->getViewNoRender() );
316
+		$object->setAimeos(\TestHelperJqadm::getAimeos());
317
+		$object->setView($this->getViewNoRender());
318 318
 
319 319
 		return $object;
320 320
 	}
@@ -322,32 +322,32 @@  discard block
 block discarded – undo
322 322
 
323 323
 	protected function getViewNoRender()
324 324
 	{
325
-		$view = $this->getMockBuilder( \Aimeos\MW\View\Standard::class )
326
-			->setConstructorArgs( array( [] ) )
327
-			->setMethods( array( 'render', 'config' ) )
325
+		$view = $this->getMockBuilder(\Aimeos\MW\View\Standard::class)
326
+			->setConstructorArgs(array([]))
327
+			->setMethods(array('render', 'config'))
328 328
 			->getMock();
329 329
 
330 330
 		$param = ['site' => 'unittest', 'id' => $this->getCoupon()->getId()];
331
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param );
332
-		$view->addHelper( 'param', $helper );
331
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $param);
332
+		$view->addHelper('param', $helper);
333 333
 
334
-		$helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, [] );
335
-		$view->addHelper( 'access', $helper );
334
+		$helper = new \Aimeos\MW\View\Helper\Access\Standard($view, []);
335
+		$view->addHelper('access', $helper);
336 336
 
337 337
 		return $view;
338 338
 	}
339 339
 
340 340
 
341
-	protected function getCoupon( $label = 'Unit test example' )
341
+	protected function getCoupon($label = 'Unit test example')
342 342
 	{
343
-		$manager = \Aimeos\MShop::create( $this->context, 'coupon' );
343
+		$manager = \Aimeos\MShop::create($this->context, 'coupon');
344 344
 
345 345
 		$search = $manager->createSearch();
346
-		$search->setConditions( $search->compare( '==', 'coupon.label', $label ) );
347
-		$items = $manager->searchItems( $search );
346
+		$search->setConditions($search->compare('==', 'coupon.label', $label));
347
+		$items = $manager->searchItems($search);
348 348
 
349
-		if( ( $item = reset( $items ) ) === false ) {
350
-			throw new \RuntimeException( sprintf( 'No coupon for label "%1$s" found', $label ) );
349
+		if (($item = reset($items)) === false) {
350
+			throw new \RuntimeException(sprintf('No coupon for label "%1$s" found', $label));
351 351
 		}
352 352
 
353 353
 		return $item;
Please login to merge, or discard this patch.