Completed
Push — master ( 521882...b49ab8 )
by Aimeos
04:07
created
admin/jqadm/templates/product/item-selection-standard.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@  discard block
 block discarded – undo
7 7
 
8 8
 $enc = $this->encoder();
9 9
 
10
-$target = $this->config( 'admin/jqadm/url/get/target' );
11
-$cntl = $this->config( 'admin/jqadm/url/get/controller', 'Jqadm' );
12
-$action = $this->config( 'admin/jqadm/url/get/action', 'get' );
13
-$config = $this->config( 'admin/jqadm/url/get/config', [] );
10
+$target = $this->config('admin/jqadm/url/get/target');
11
+$cntl = $this->config('admin/jqadm/url/get/controller', 'Jqadm');
12
+$action = $this->config('admin/jqadm/url/get/action', 'get');
13
+$config = $this->config('admin/jqadm/url/get/config', []);
14 14
 
15 15
 $keys = ['product.lists.siteid', 'product.lists.id', 'product.lists.refid', 'product.label', 'product.code', 'product.status'];
16 16
 
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 ?>
19 19
 <div id="selection" class="item-selection content-block tab-pane fade" role="tablist" aria-labelledby="selection">
20 20
 	<div id="item-selection-group" role="tablist" aria-multiselectable="true"
21
-		data-items="<?= $enc->attr( json_encode( $this->get( 'selectionData', [] ) ) ); ?>"
22
-		data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>"
21
+		data-items="<?= $enc->attr(json_encode($this->get('selectionData', []))); ?>"
22
+		data-keys="<?= $enc->attr(json_encode($keys)) ?>"
23 23
 		data-siteid="<?= $this->site()->siteid() ?>" >
24 24
 
25 25
 		<div v-for="(entry, idx) in items" class="group-item card">
@@ -28,25 +28,25 @@  discard block
 block discarded – undo
28 28
 				v-bind:data-target="'#item-selection-group-data-' + idx" data-toggle="collapse" role="tab" class="card-header header"
29 29
 				v-bind:aria-controls="'item-selection-group-data-' + idx" aria-expanded="false">
30 30
 				<div class="card-tools-left">
31
-					<div class="btn btn-card-header act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
32
-						title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide this entry') ); ?>">
31
+					<div class="btn btn-card-header act-show fa" tabindex="<?= $this->get('tabindex'); ?>"
32
+						title="<?= $enc->attr($this->translate('admin', 'Show/hide this entry')); ?>">
33 33
 					</div>
34 34
 				</div>
35 35
 				<span class="item-label header-label" v-html="getLabel(idx)"></span>
36 36
 				&nbsp;
37 37
 				<div class="card-tools-right">
38
-					<a v-if="entry['product.id']" class="btn btn-card-header act-view fa" target="_blank" tabindex="<?= $this->get( 'tabindex' ); ?>"
39
-						v-bind:href="'<?= $enc->attr( $this->url( $target, $cntl, $action, ['id' => '_ID_'] + $this->get( 'pageParams', [] ), [], $config ) ); ?>'.replace('_ID_', entry['product.id'])"
40
-						title="<?= $enc->attr( $this->translate( 'admin', 'View details') ); ?>"></a>
38
+					<a v-if="entry['product.id']" class="btn btn-card-header act-view fa" target="_blank" tabindex="<?= $this->get('tabindex'); ?>"
39
+						v-bind:href="'<?= $enc->attr($this->url($target, $cntl, $action, ['id' => '_ID_'] + $this->get('pageParams', []), [], $config)); ?>'.replace('_ID_', entry['product.id'])"
40
+						title="<?= $enc->attr($this->translate('admin', 'View details')); ?>"></a>
41 41
 
42
-					<div class="btn btn-card-header act-copy fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
43
-						title="<?= $enc->attr( $this->translate( 'admin', 'Duplicate entry (Ctrl+D)') ); ?>"
42
+					<div class="btn btn-card-header act-copy fa" tabindex="<?= $this->get('tabindex'); ?>"
43
+						title="<?= $enc->attr($this->translate('admin', 'Duplicate entry (Ctrl+D)')); ?>"
44 44
 						v-on:click.stop="copyItem(idx)">
45 45
 					</div>
46 46
 
47 47
 					<div v-if="!checkSite('product.lists.siteid', idx)"
48
-						class="btn btn-card-header act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
49
-						title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
48
+						class="btn btn-card-header act-delete fa" tabindex="<?= $this->get('tabindex'); ?>"
49
+						title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
50 50
 						v-on:click.stop="removeItem(idx)">
51 51
 					</div>
52 52
 				</div>
@@ -56,62 +56,62 @@  discard block
 block discarded – undo
56 56
 				v-bind:aria-labelledby="'item-selection-group-item-' + idx" role="tabpanel" class="card-block collapse row">
57 57
 
58 58
 				<input class="item-id" type="hidden" v-model="items[idx]['product.lists.id']"
59
-					v-bind:name="'<?= $enc->attr( $this->formparam( ['selection', 'idx', 'product.lists.id'] ) ); ?>'.replace('idx', idx)" />
59
+					v-bind:name="'<?= $enc->attr($this->formparam(['selection', 'idx', 'product.lists.id'])); ?>'.replace('idx', idx)" />
60 60
 				<input class="item-listid" type="hidden" v-model="items[idx]['product.id']"
61
-					v-bind:name="'<?= $enc->attr( $this->formparam( ['selection', 'idx', 'product.id'] ) ); ?>'.replace('idx', idx)" />
61
+					v-bind:name="'<?= $enc->attr($this->formparam(['selection', 'idx', 'product.id'])); ?>'.replace('idx', idx)" />
62 62
 
63 63
 				<div class="col-xl-6">
64 64
 
65 65
 					<div class="form-group row mandatory">
66
-						<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Status' ) ); ?></label>
66
+						<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Status')); ?></label>
67 67
 						<div class="col-sm-8">
68
-							<select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>"
69
-								v-bind:name="'<?= $enc->attr( $this->formparam( array( 'selection', 'idx', 'product.status' ) ) ); ?>'.replace('idx', idx)"
68
+							<select class="form-control custom-select item-status" required="required" tabindex="<?= $this->get('tabindex'); ?>"
69
+								v-bind:name="'<?= $enc->attr($this->formparam(array('selection', 'idx', 'product.status'))); ?>'.replace('idx', idx)"
70 70
 								v-bind:readonly="checkSite('product.siteid', idx)"
71 71
 								v-model="items[idx]['product.status']" >
72 72
 								<option value="1" v-bind:selected="items[idx]['product.status'] == 1" >
73
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:1' ) ); ?>
73
+									<?= $enc->html($this->translate('mshop/code', 'status:1')); ?>
74 74
 								</option>
75 75
 								<option value="0" v-bind:selected="items[idx]['product.status'] == 0" >
76
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:0' ) ); ?>
76
+									<?= $enc->html($this->translate('mshop/code', 'status:0')); ?>
77 77
 								</option>
78 78
 								<option value="-1" v-bind:selected="items[idx]['product.status'] == -1" >
79
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:-1' ) ); ?>
79
+									<?= $enc->html($this->translate('mshop/code', 'status:-1')); ?>
80 80
 								</option>
81 81
 								<option value="-2" v-bind:selected="items[idx]['product.status'] == -2" >
82
-									<?= $enc->html( $this->translate( 'mshop/code', 'status:-2' ) ); ?>
82
+									<?= $enc->html($this->translate('mshop/code', 'status:-2')); ?>
83 83
 								</option>
84 84
 							</select>
85 85
 						</div>
86 86
 					</div>
87 87
 					<div class="form-group row mandatory">
88
-						<label class="col-lg-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'SKU' ) ); ?></label>
88
+						<label class="col-lg-4 form-control-label help"><?= $enc->html($this->translate('admin', 'SKU')); ?></label>
89 89
 						<div class="col-lg-8">
90 90
 							<input is="auto-complete"
91 91
 								v-model="items[idx]['product.code']"
92
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'EAN, SKU or article number (required)' ) ); ?>"
93
-								v-bind:name="'<?= $enc->attr( $this->formparam( array( 'selection', 'idx', 'product.code' ) ) ); ?>'.replace('idx', idx)"
92
+								placeholder="<?= $enc->attr($this->translate('admin', 'EAN, SKU or article number (required)')); ?>"
93
+								v-bind:name="'<?= $enc->attr($this->formparam(array('selection', 'idx', 'product.code'))); ?>'.replace('idx', idx)"
94 94
 								v-bind:readonly="checkSite('product.lists.siteid', idx) || entry['product.lists.id'] != ''"
95
-								v-bind:tabindex="<?= $this->get( 'tabindex' ); ?>"
95
+								v-bind:tabindex="<?= $this->get('tabindex'); ?>"
96 96
 								v-bind:keys="getArticles"
97 97
 								v-bind:required="'required'"
98 98
 								v-on:input="updateProductItem(idx, ...arguments)" />
99 99
 						</div>
100 100
 						<div class="col-sm-12 form-text text-muted help-text">
101
-							<?= $enc->html( $this->translate( 'admin', 'Unique article code related to stock levels, e.g. from the ERP system, an EAN/GTIN number or self invented' ) ); ?>
101
+							<?= $enc->html($this->translate('admin', 'Unique article code related to stock levels, e.g. from the ERP system, an EAN/GTIN number or self invented')); ?>
102 102
 						</div>
103 103
 					</div>
104 104
 					<div class="form-group row mandatory">
105
-						<label class="col-lg-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Label' ) ); ?></label>
105
+						<label class="col-lg-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Label')); ?></label>
106 106
 						<div class="col-lg-8">
107
-							<input class="form-control item-label" type="text" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>"
108
-								v-bind:name="'<?= $enc->attr( $this->formparam( array( 'selection', 'idx', 'product.label' ) ) ); ?>'.replace('idx', idx)"
109
-								placeholder="<?= $enc->attr( $this->translate( 'admin', 'Internal name (required)' ) ); ?>"
107
+							<input class="form-control item-label" type="text" required="required" tabindex="<?= $this->get('tabindex'); ?>"
108
+								v-bind:name="'<?= $enc->attr($this->formparam(array('selection', 'idx', 'product.label'))); ?>'.replace('idx', idx)"
109
+								placeholder="<?= $enc->attr($this->translate('admin', 'Internal name (required)')); ?>"
110 110
 								v-bind:readonly="checkSite('product.siteid', idx)"
111 111
 								v-model="items[idx]['product.label']" />
112 112
 						</div>
113 113
 						<div class="col-sm-12 form-text text-muted help-text">
114
-							<?= $enc->html( $this->translate( 'admin', 'Internal article name, will be used on the web site if no product name for the language is available' ) ); ?>
114
+							<?= $enc->html($this->translate('admin', 'Internal article name, will be used on the web site if no product name for the language is available')); ?>
115 115
 						</div>
116 116
 					</div>
117 117
 
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
 						<thead>
123 123
 							<tr>
124 124
 								<th>
125
-									<span class="help"><?= $enc->html( $this->translate( 'admin', 'Variant attributes' ) ); ?></span>
125
+									<span class="help"><?= $enc->html($this->translate('admin', 'Variant attributes')); ?></span>
126 126
 									<div class="form-text text-muted help-text">
127
-										<?= $enc->html( $this->translate( 'admin', 'All attributes that uniquely define an article, e.g. width, length and color for jeans' ) ); ?>
127
+										<?= $enc->html($this->translate('admin', 'All attributes that uniquely define an article, e.g. width, length and color for jeans')); ?>
128 128
 									</div>
129 129
 								</th>
130 130
 								<th class="actions">
131
-									<div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
132
-										title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
131
+									<div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>"
132
+										title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
133 133
 										v-on:click="addAttributeItem(idx)">
134 134
 									</div>
135 135
 								</th>
@@ -140,21 +140,21 @@  discard block
 block discarded – undo
140 140
 							<tr v-for="(attr, attridx) in (entry['attr'] || [])">
141 141
 								<td>
142 142
 									<input class="item-attr-listid" type="hidden" v-model="items[idx]['attr'][attridx]['product.lists.id']"
143
-										v-bind:name="'<?= $enc->attr( $this->formparam( ['selection', 'idx', 'attr', 'attridx', 'product.lists.id'] ) ); ?>'.replace('idx', idx).replace('attridx', attridx)" />
143
+										v-bind:name="'<?= $enc->attr($this->formparam(['selection', 'idx', 'attr', 'attridx', 'product.lists.id'])); ?>'.replace('idx', idx).replace('attridx', attridx)" />
144 144
 
145 145
 									<input class="item-attr-siteid" type="hidden" v-model="items[idx]['attr'][attridx]['product.lists.siteid']"
146
-										v-bind:name="'<?= $enc->attr( $this->formparam( ['selection', 'idx', 'attr', 'attridx', 'product.lists.siteid'] ) ); ?>'.replace('idx', idx).replace('attridx', attridx)" />
146
+										v-bind:name="'<?= $enc->attr($this->formparam(['selection', 'idx', 'attr', 'attridx', 'product.lists.siteid'])); ?>'.replace('idx', idx).replace('attridx', attridx)" />
147 147
 
148 148
 									<input class="item-attr-type" type="hidden" v-model="items[idx]['attr'][attridx]['attribute.type']"
149
-										v-bind:name="'<?= $enc->attr( $this->formparam( ['selection', 'idx', 'attr', 'attridx', 'attribute.type'] ) ); ?>'.replace('idx', idx).replace('attridx', attridx)" />
149
+										v-bind:name="'<?= $enc->attr($this->formparam(['selection', 'idx', 'attr', 'attridx', 'attribute.type'])); ?>'.replace('idx', idx).replace('attridx', attridx)" />
150 150
 
151 151
 									<input class="item-attr-label" type="hidden" v-model="items[idx]['attr'][attridx]['attribute.label']"
152
-										v-bind:name="'<?= $enc->attr( $this->formparam( ['selection', 'idx', 'attr', 'attridx', 'attribute.label'] ) ); ?>'.replace('idx', idx).replace('attridx', attridx)" />
152
+										v-bind:name="'<?= $enc->attr($this->formparam(['selection', 'idx', 'attr', 'attridx', 'attribute.label'])); ?>'.replace('idx', idx).replace('attridx', attridx)" />
153 153
 
154 154
 									<select is="combo-box" class="form-control custom-select item-attr-refid"
155
-										v-bind:name="'<?= $enc->attr( $this->formparam( ['selection', 'idx', 'attr', 'attridx', 'product.lists.refid'] ) ); ?>'.replace('idx', idx).replace('attridx', attridx)"
155
+										v-bind:name="'<?= $enc->attr($this->formparam(['selection', 'idx', 'attr', 'attridx', 'product.lists.refid'])); ?>'.replace('idx', idx).replace('attridx', attridx)"
156 156
 										v-bind:readonly="checkSite('product.lists.siteid', idx, attridx) || attr['product.lists.id'] != ''"
157
-										v-bind:tabindex="'<?= $this->get( 'tabindex' ); ?>'"
157
+										v-bind:tabindex="'<?= $this->get('tabindex'); ?>'"
158 158
 										v-bind:label="getAttributeLabel(idx, attridx)"
159 159
 										v-bind:required="'required'"
160 160
 										v-bind:getfcn="getAttributeItems"
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 									</select>
164 164
 								</td>
165 165
 								<td class="actions">
166
-									<div v-if="!checkSite('product.lists.siteid', idx, attridx)" class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
167
-										title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
166
+									<div v-if="!checkSite('product.lists.siteid', idx, attridx)" class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>"
167
+										title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
168 168
 										v-on:click.stop="removeAttributeItem(idx, attridx)">
169 169
 									</div>
170 170
 								</td>
@@ -174,14 +174,14 @@  discard block
 block discarded – undo
174 174
 					</table>
175 175
 				</div>
176 176
 
177
-				<?= $this->get( 'selectionBody' ); ?>
177
+				<?= $this->get('selectionBody'); ?>
178 178
 
179 179
 			</div>
180 180
 		</div>
181 181
 
182 182
 		<div class="card-tools-more">
183
-			<div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
184
-				title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
183
+			<div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get('tabindex'); ?>"
184
+				title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
185 185
 				v-on:click="addItem()" >
186 186
 			</div>
187 187
 		</div>
Please login to merge, or discard this patch.
admin/jqadm/templates/product/item-option-config-standard.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,22 +18,22 @@  discard block
 block discarded – undo
18 18
 <div class="col-xl-6 content-block item-option-config">
19 19
 
20 20
 	<table class="attribute-list table table-default"
21
-		data-items="<?= $enc->attr( json_encode( $this->get( 'configData', [] ) ) ); ?>"
22
-		data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>"
21
+		data-items="<?= $enc->attr(json_encode($this->get('configData', []))); ?>"
22
+		data-keys="<?= $enc->attr(json_encode($keys)) ?>"
23 23
 		data-prefix="product.lists."
24 24
 		data-siteid="<?= $this->site()->siteid() ?>" >
25 25
 
26 26
 		<thead>
27 27
 			<tr>
28 28
 				<th>
29
-					<span class="help"><?= $enc->html( $this->translate( 'admin', 'Configurable' ) ); ?></span>
29
+					<span class="help"><?= $enc->html($this->translate('admin', 'Configurable')); ?></span>
30 30
 					<div class="form-text text-muted help-text">
31
-						<?= $enc->html( $this->translate( 'admin', 'Optional product components that can be chosen by the customer together with the product' ) ); ?>
31
+						<?= $enc->html($this->translate('admin', 'Optional product components that can be chosen by the customer together with the product')); ?>
32 32
 					</div>
33 33
 				</th>
34 34
 				<th class="actions">
35
-					<div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
36
-						title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
35
+					<div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>"
36
+						title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
37 37
 						v-on:click="addItem('product.lists.')">
38 38
 					</div>
39 39
 				</th>
@@ -46,18 +46,18 @@  discard block
 block discarded – undo
46 46
 
47 47
 				<td>
48 48
 					<input class="item-listid" type="hidden" v-model="items['product.lists.id'][idx]"
49
-						name="<?= $enc->attr( $this->formparam( array( 'option', 'config', 'product.lists.id', '' ) ) ); ?>" />
49
+						name="<?= $enc->attr($this->formparam(array('option', 'config', 'product.lists.id', ''))); ?>" />
50 50
 
51 51
 					<input class="item-label" type="hidden" v-model="items['attribute.label'][idx]"
52
-						name="<?= $enc->attr( $this->formparam( array( 'option', 'config', 'attribute.label', '' ) ) ); ?>" />
52
+						name="<?= $enc->attr($this->formparam(array('option', 'config', 'attribute.label', ''))); ?>" />
53 53
 
54 54
 					<input class="item-type" type="hidden" v-model="items['attribute.type'][idx]"
55
-						name="<?= $enc->attr( $this->formparam( array( 'option', 'config', 'attribute.type', '' ) ) ); ?>" />
55
+						name="<?= $enc->attr($this->formparam(array('option', 'config', 'attribute.type', ''))); ?>" />
56 56
 
57 57
 					<select is="combo-box" class="form-control custom-select item-refid"
58
-						v-bind:name="'<?= $enc->attr( $this->formparam( array( 'option', 'config', 'product.lists.refid', '' ) ) ); ?>'"
58
+						v-bind:name="'<?= $enc->attr($this->formparam(array('option', 'config', 'product.lists.refid', ''))); ?>'"
59 59
 						v-bind:readonly="checkSite('product.lists.siteid', idx) || id != ''"
60
-						v-bind:tabindex="'<?= $this->get( 'tabindex' ); ?>'"
60
+						v-bind:tabindex="'<?= $this->get('tabindex'); ?>'"
61 61
 						v-bind:label="getLabel(idx)"
62 62
 						v-bind:required="'required'"
63 63
 						v-bind:getfcn="getItems"
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 					</select>
68 68
 				</td>
69 69
 				<td class="actions">
70
-					<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
71
-						title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
70
+					<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>"
71
+						title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
72 72
 						v-on:click.stop="removeItem(idx)">
73 73
 				</td>
74 74
 
@@ -77,6 +77,6 @@  discard block
 block discarded – undo
77 77
 
78 78
 	</table>
79 79
 
80
-	<?= $this->get( 'configBody' ); ?>
80
+	<?= $this->get('configBody'); ?>
81 81
 
82 82
 </div>
Please login to merge, or discard this patch.
admin/jqadm/templates/product/item-related-suggest-standard.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,22 +16,22 @@  discard block
 block discarded – undo
16 16
 <div class="col-xl-6 content-block item-related-suggest">
17 17
 
18 18
 	<table class="product-list table table-default"
19
-		data-items="<?= $enc->attr( json_encode( $this->get( 'suggestData', [] ) ) ); ?>"
20
-		data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>"
19
+		data-items="<?= $enc->attr(json_encode($this->get('suggestData', []))); ?>"
20
+		data-keys="<?= $enc->attr(json_encode($keys)) ?>"
21 21
 		data-prefix="product.lists."
22 22
 		data-siteid="<?= $this->site()->siteid() ?>" >
23 23
 
24 24
 		<thead>
25 25
 			<tr>
26 26
 				<th>
27
-					<span class="help"><?= $enc->html( $this->translate( 'admin', 'Suggested products' ) ); ?></span>
27
+					<span class="help"><?= $enc->html($this->translate('admin', 'Suggested products')); ?></span>
28 28
 					<div class="form-text text-muted help-text">
29
-						<?= $enc->html( $this->translate( 'admin', 'List of suggested products' ) ); ?>
29
+						<?= $enc->html($this->translate('admin', 'List of suggested products')); ?>
30 30
 					</div>
31 31
 				</th>
32 32
 				<th class="actions">
33
-					<div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
34
-						title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
33
+					<div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>"
34
+						title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
35 35
 						v-on:click="addItem()">
36 36
 					</div>
37 37
 				</th>
@@ -45,18 +45,18 @@  discard block
 block discarded – undo
45 45
 
46 46
 				<td>
47 47
 					<input class="item-listid" type="hidden" v-model="items['product.lists.id'][idx]"
48
-						name="<?= $enc->attr( $this->formparam( array( 'related', 'suggest', 'product.lists.id', '' ) ) ); ?>" />
48
+						name="<?= $enc->attr($this->formparam(array('related', 'suggest', 'product.lists.id', ''))); ?>" />
49 49
 
50 50
 					<input class="item-label" type="hidden" v-model="items['product.label'][idx]"
51
-						name="<?= $enc->attr( $this->formparam( array( 'related', 'suggest', 'product.label', '' ) ) ); ?>" />
51
+						name="<?= $enc->attr($this->formparam(array('related', 'suggest', 'product.label', ''))); ?>" />
52 52
 
53 53
 					<input class="item-code" type="hidden" v-model="items['product.code'][idx]"
54
-						name="<?= $enc->attr( $this->formparam( array( 'related', 'suggest', 'product.code', '' ) ) ); ?>" />
54
+						name="<?= $enc->attr($this->formparam(array('related', 'suggest', 'product.code', ''))); ?>" />
55 55
 
56 56
 					<select is="combo-box" class="form-control custom-select item-refid"
57
-						v-bind:name="'<?= $enc->attr( $this->formparam( array( 'related', 'suggest', 'product.lists.refid', '' ) ) ); ?>'"
57
+						v-bind:name="'<?= $enc->attr($this->formparam(array('related', 'suggest', 'product.lists.refid', ''))); ?>'"
58 58
 						v-bind:readonly="checkSite('product.lists.siteid', idx) || id != ''"
59
-						v-bind:tabindex="'<?= $this->get( 'tabindex' ); ?>'"
59
+						v-bind:tabindex="'<?= $this->get('tabindex'); ?>'"
60 60
 						v-bind:label="getLabel(idx)"
61 61
 						v-bind:required="'required'"
62 62
 						v-bind:getfcn="getItems"
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 					</select>
67 67
 				</td>
68 68
 				<td class="actions">
69
-					<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
70
-						title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
69
+					<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>"
70
+						title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
71 71
 						v-on:click.stop="removeItem(idx)">
72 72
 				</td>
73 73
 			</tr>
@@ -75,6 +75,6 @@  discard block
 block discarded – undo
75 75
 		</tbody>
76 76
 	</table>
77 77
 
78
-	<?= $this->get( 'suggestBody' ); ?>
78
+	<?= $this->get('suggestBody'); ?>
79 79
 
80 80
 </div>
Please login to merge, or discard this patch.
admin/jqadm/templates/product/item-related-bought-standard.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,22 +16,22 @@  discard block
 block discarded – undo
16 16
 <div class="col-xl-6 content-block item-related-bought">
17 17
 
18 18
 	<table class="product-list table table-default"
19
-		data-items="<?= $enc->attr( json_encode( $this->get( 'boughtData', [] ) ) ); ?>"
20
-		data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>"
19
+		data-items="<?= $enc->attr(json_encode($this->get('boughtData', []))); ?>"
20
+		data-keys="<?= $enc->attr(json_encode($keys)) ?>"
21 21
 		data-prefix="product.lists."
22 22
 		data-siteid="<?= $this->site()->siteid() ?>" >
23 23
 
24 24
 		<thead>
25 25
 			<tr>
26 26
 				<th>
27
-					<span class="help"><?= $enc->html( $this->translate( 'admin', 'Products bought together' ) ); ?></span>
27
+					<span class="help"><?= $enc->html($this->translate('admin', 'Products bought together')); ?></span>
28 28
 					<div class="form-text text-muted help-text">
29
-						<?= $enc->html( $this->translate( 'admin', 'List of products often bought together' ) ); ?>
29
+						<?= $enc->html($this->translate('admin', 'List of products often bought together')); ?>
30 30
 					</div>
31 31
 				</th>
32 32
 				<th class="actions">
33
-					<div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
34
-						title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
33
+					<div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>"
34
+						title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
35 35
 						v-on:click="addItem()">
36 36
 					</div>
37 37
 				</th>
@@ -45,18 +45,18 @@  discard block
 block discarded – undo
45 45
 
46 46
 				<td>
47 47
 					<input class="item-listid" type="hidden" v-model="items['product.lists.id'][idx]"
48
-						name="<?= $enc->attr( $this->formparam( array( 'related', 'bought', 'product.lists.id', '' ) ) ); ?>" />
48
+						name="<?= $enc->attr($this->formparam(array('related', 'bought', 'product.lists.id', ''))); ?>" />
49 49
 
50 50
 					<input class="item-label" type="hidden" v-model="items['product.label'][idx]"
51
-						name="<?= $enc->attr( $this->formparam( array( 'related', 'bought', 'product.label', '' ) ) ); ?>" />
51
+						name="<?= $enc->attr($this->formparam(array('related', 'bought', 'product.label', ''))); ?>" />
52 52
 
53 53
 					<input class="item-code" type="hidden" v-model="items['product.code'][idx]"
54
-						name="<?= $enc->attr( $this->formparam( array( 'related', 'bought', 'product.code', '' ) ) ); ?>" />
54
+						name="<?= $enc->attr($this->formparam(array('related', 'bought', 'product.code', ''))); ?>" />
55 55
 
56 56
 					<select is="combo-box" class="form-control custom-select item-refid"
57
-						v-bind:name="'<?= $enc->attr( $this->formparam( array( 'related', 'bought', 'product.lists.refid', '' ) ) ); ?>'"
57
+						v-bind:name="'<?= $enc->attr($this->formparam(array('related', 'bought', 'product.lists.refid', ''))); ?>'"
58 58
 						v-bind:readonly="checkSite('product.lists.siteid', idx) || id != ''"
59
-						v-bind:tabindex="'<?= $this->get( 'tabindex' ); ?>'"
59
+						v-bind:tabindex="'<?= $this->get('tabindex'); ?>'"
60 60
 						v-bind:label="getLabel(idx)"
61 61
 						v-bind:required="'required'"
62 62
 						v-bind:getfcn="getItems"
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 					</select>
67 67
 				</td>
68 68
 				<td class="actions">
69
-					<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
70
-						title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
69
+					<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>"
70
+						title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
71 71
 						v-on:click.stop="removeItem(idx)">
72 72
 				</td>
73 73
 			</tr>
@@ -75,5 +75,5 @@  discard block
 block discarded – undo
75 75
 		</tbody>
76 76
 	</table>
77 77
 
78
-	<?= $this->get( 'boughtBody' ); ?>
78
+	<?= $this->get('boughtBody'); ?>
79 79
 </div>
Please login to merge, or discard this patch.
admin/jqadm/templates/product/item-option-custom-standard.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,22 +17,22 @@  discard block
 block discarded – undo
17 17
 <div class="col-xl-6 content-block item-option-custom">
18 18
 
19 19
 	<table class="attribute-list table table-default"
20
-		data-items="<?= $enc->attr( json_encode( $this->get( 'customData', [] ) ) ); ?>"
21
-		data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>"
20
+		data-items="<?= $enc->attr(json_encode($this->get('customData', []))); ?>"
21
+		data-keys="<?= $enc->attr(json_encode($keys)) ?>"
22 22
 		data-prefix="product.lists."
23 23
 		data-siteid="<?= $this->site()->siteid() ?>" >
24 24
 
25 25
 		<thead>
26 26
 			<tr>
27 27
 				<th>
28
-					<span class="help"><?= $enc->html( $this->translate( 'admin', 'Custom' ) ); ?></span>
28
+					<span class="help"><?= $enc->html($this->translate('admin', 'Custom')); ?></span>
29 29
 					<div class="form-text text-muted help-text">
30
-						<?= $enc->html( $this->translate( 'admin', 'Product attributes stored in the basket where customers can enter their own texts or values' ) ); ?>
30
+						<?= $enc->html($this->translate('admin', 'Product attributes stored in the basket where customers can enter their own texts or values')); ?>
31 31
 					</div>
32 32
 				</th>
33 33
 				<th class="actions">
34
-					<div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
35
-						title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
34
+					<div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>"
35
+						title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
36 36
 						v-on:click="addItem('product.lists.')">
37 37
 				</th>
38 38
 			</tr>
@@ -44,18 +44,18 @@  discard block
 block discarded – undo
44 44
 
45 45
 				<td>
46 46
 					<input class="item-listid" type="hidden" v-model="items['product.lists.id'][idx]"
47
-						name="<?= $enc->attr( $this->formparam( array( 'option', 'custom', 'product.lists.id', '' ) ) ); ?>" />
47
+						name="<?= $enc->attr($this->formparam(array('option', 'custom', 'product.lists.id', ''))); ?>" />
48 48
 
49 49
 					<input class="item-label" type="hidden" v-model="items['attribute.label'][idx]"
50
-						name="<?= $enc->attr( $this->formparam( array( 'option', 'custom', 'attribute.label', '' ) ) ); ?>" />
50
+						name="<?= $enc->attr($this->formparam(array('option', 'custom', 'attribute.label', ''))); ?>" />
51 51
 
52 52
 					<input class="item-type" type="hidden" v-model="items['attribute.type'][idx]"
53
-						name="<?= $enc->attr( $this->formparam( array( 'option', 'custom', 'attribute.type', '' ) ) ); ?>" />
53
+						name="<?= $enc->attr($this->formparam(array('option', 'custom', 'attribute.type', ''))); ?>" />
54 54
 
55 55
 					<select is="combo-box" class="form-control custom-select item-refid"
56
-						v-bind:name="'<?= $enc->attr( $this->formparam( array( 'option', 'custom', 'product.lists.refid', '' ) ) ); ?>'"
56
+						v-bind:name="'<?= $enc->attr($this->formparam(array('option', 'custom', 'product.lists.refid', ''))); ?>'"
57 57
 						v-bind:readonly="checkSite('product.lists.siteid', idx) || id != ''"
58
-						v-bind:tabindex="'<?= $this->get( 'tabindex' ); ?>'"
58
+						v-bind:tabindex="'<?= $this->get('tabindex'); ?>'"
59 59
 						v-bind:label="getLabel(idx)"
60 60
 						v-bind:required="'required'"
61 61
 						v-bind:getfcn="getItems"
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 					</select>
66 66
 				</td>
67 67
 				<td class="actions">
68
-					<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
69
-						title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
68
+					<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>"
69
+						title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
70 70
 						v-on:click.stop="removeItem(idx)">
71 71
 				</td>
72 72
 
@@ -75,6 +75,6 @@  discard block
 block discarded – undo
75 75
 
76 76
 	</table>
77 77
 
78
-	<?= $this->get( 'customBody' ); ?>
78
+	<?= $this->get('customBody'); ?>
79 79
 
80 80
 </div>
Please login to merge, or discard this patch.
admin/jqadm/templates/product/item-bundle-standard.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,22 +18,22 @@  discard block
 block discarded – undo
18 18
 	<div class="col-xl-6 content-block product-default">
19 19
 
20 20
 		<table class="product-list table table-default"
21
-			data-items="<?= $enc->attr( json_encode( $this->get( 'bundleData', [] ) ) ); ?>"
22
-			data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>"
21
+			data-items="<?= $enc->attr(json_encode($this->get('bundleData', []))); ?>"
22
+			data-keys="<?= $enc->attr(json_encode($keys)) ?>"
23 23
 			data-prefix="product.lists."
24 24
 			data-siteid="<?= $this->site()->siteid() ?>" >
25 25
 
26 26
 			<thead>
27 27
 				<tr>
28 28
 					<th>
29
-						<span class="help"><?= $enc->html( $this->translate( 'admin', 'Products' ) ); ?></span>
29
+						<span class="help"><?= $enc->html($this->translate('admin', 'Products')); ?></span>
30 30
 						<div class="form-text text-muted help-text">
31
-							<?= $enc->html( $this->translate( 'admin', 'List of articles that should be sold as one product, often at a reduced price' ) ); ?>
31
+							<?= $enc->html($this->translate('admin', 'List of articles that should be sold as one product, often at a reduced price')); ?>
32 32
 						</div>
33 33
 					</th>
34 34
 					<th class="actions">
35
-						<div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
36
-							title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>"
35
+						<div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>"
36
+							title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>"
37 37
 							v-on:click="addItem()">
38 38
 						</div>
39 39
 					</th>
@@ -47,18 +47,18 @@  discard block
 block discarded – undo
47 47
 
48 48
 					<td>
49 49
 						<input class="item-listid" type="hidden" v-model="items['product.lists.id'][idx]"
50
-							name="<?= $enc->attr( $this->formparam( array( 'bundle', 'product.lists.id', '' ) ) ); ?>" />
50
+							name="<?= $enc->attr($this->formparam(array('bundle', 'product.lists.id', ''))); ?>" />
51 51
 
52 52
 						<input class="item-label" type="hidden" v-model="items['product.label'][idx]"
53
-							name="<?= $enc->attr( $this->formparam( array( 'bundle', 'product.label', '' ) ) ); ?>" />
53
+							name="<?= $enc->attr($this->formparam(array('bundle', 'product.label', ''))); ?>" />
54 54
 
55 55
 						<input class="item-code" type="hidden" v-model="items['product.code'][idx]"
56
-							name="<?= $enc->attr( $this->formparam( array( 'bundle', 'product.code', '' ) ) ); ?>" />
56
+							name="<?= $enc->attr($this->formparam(array('bundle', 'product.code', ''))); ?>" />
57 57
 
58 58
 						<select is="combo-box" class="form-control custom-select item-refid"
59
-							v-bind:name="'<?= $enc->attr( $this->formparam( array( 'bundle', 'product.lists.refid', '' ) ) ); ?>'"
59
+							v-bind:name="'<?= $enc->attr($this->formparam(array('bundle', 'product.lists.refid', ''))); ?>'"
60 60
 							v-bind:readonly="checkSite('product.lists.siteid', idx) || id != ''"
61
-							v-bind:tabindex="'<?= $this->get( 'tabindex' ); ?>'"
61
+							v-bind:tabindex="'<?= $this->get('tabindex'); ?>'"
62 62
 							v-bind:label="getLabel(idx)"
63 63
 							v-bind:required="'required'"
64 64
 							v-bind:getfcn="getItems"
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 						</select>
69 69
 					</td>
70 70
 					<td class="actions">
71
-						<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>"
72
-							title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"
71
+						<div v-if="!checkSite('product.lists.siteid', idx)" class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>"
72
+							title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"
73 73
 							v-on:click.stop="removeItem(idx)">
74 74
 					</td>
75 75
 				</tr>
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 			</tbody>
78 78
 		</table>
79 79
 
80
-		<?= $this->get( 'bundleBody' ); ?>
80
+		<?= $this->get('bundleBody'); ?>
81 81
 
82 82
 	</div>
83 83
 </div>
Please login to merge, or discard this patch.
admin/jqadm/templates/common/partials/problem-standard.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
 $enc = $this->encoder();
9 9
 
10 10
 
11
-$bytes = function( $value ) {
11
+$bytes = function($value) {
12 12
 
13
-	$result = substr( $value, 0, -1 );
13
+	$result = substr($value, 0, -1);
14 14
 
15
-	switch( substr( $value, -1 ) )
15
+	switch (substr($value, -1))
16 16
 	{
17 17
 		case 'G': case 'g': $result *= 1024;
18 18
 		case 'M': case 'm': $result *= 1024;
@@ -28,28 +28,28 @@  discard block
 block discarded – undo
28 28
 	<div class="modal-dialog">
29 29
 		<div class="modal-content">
30 30
 			<div class="modal-header">
31
-				<h4 class="modal-title"><?= $enc->html( $this->translate( 'admin', 'Problem' ) ); ?></h4>
32
-				<button type="button" class="close" data-dismiss="modal" aria-label="<?= $enc->attr( $this->translate( 'admin', 'Close' ) ); ?>"><span aria-hidden="true">&times;</span></button>
31
+				<h4 class="modal-title"><?= $enc->html($this->translate('admin', 'Problem')); ?></h4>
32
+				<button type="button" class="close" data-dismiss="modal" aria-label="<?= $enc->attr($this->translate('admin', 'Close')); ?>"><span aria-hidden="true">&times;</span></button>
33 33
 			</div>
34 34
 			<div class="modal-body">
35
-				<p class="file_uploads hidden" data-value="<?= $enc->attr( (int) ini_get( 'file_uploads' ) ); ?>">
36
-					<?= $enc->html( sprintf( $this->translate( 'admin', 'PHP setting "%1$s" is disabled' ), "file_uploads" ) ); ?>
35
+				<p class="file_uploads hidden" data-value="<?= $enc->attr((int) ini_get('file_uploads')); ?>">
36
+					<?= $enc->html(sprintf($this->translate('admin', 'PHP setting "%1$s" is disabled'), "file_uploads")); ?>
37 37
 				</p>
38
-				<p class="max_input_vars hidden" data-value="<?= $enc->attr( ini_get( 'max_input_vars' ) ); ?>">
39
-					<?= $enc->html( sprintf( $this->translate( 'admin', 'PHP setting for "%1$s" is too low' ), "max_input_vars" ) ); ?>
38
+				<p class="max_input_vars hidden" data-value="<?= $enc->attr(ini_get('max_input_vars')); ?>">
39
+					<?= $enc->html(sprintf($this->translate('admin', 'PHP setting for "%1$s" is too low'), "max_input_vars")); ?>
40 40
 				</p>
41
-				<p class="max_file_uploads hidden" data-value="<?= $enc->attr( ini_get( 'max_file_uploads' ) ); ?>">
42
-					<?= $enc->html( sprintf( $this->translate( 'admin', 'PHP setting for "%1$s" is too low' ), "max_file_uploads" ) ); ?>
41
+				<p class="max_file_uploads hidden" data-value="<?= $enc->attr(ini_get('max_file_uploads')); ?>">
42
+					<?= $enc->html(sprintf($this->translate('admin', 'PHP setting for "%1$s" is too low'), "max_file_uploads")); ?>
43 43
 				</p>
44
-				<p class="post_max_size hidden" data-value="<?= $enc->attr( $bytes( ini_get( 'post_max_size' ) ) ); ?>">
45
-					<?= $enc->html( sprintf( $this->translate( 'admin', 'PHP setting for "%1$s" is too low' ), "post_max_size" ) ); ?>
44
+				<p class="post_max_size hidden" data-value="<?= $enc->attr($bytes(ini_get('post_max_size'))); ?>">
45
+					<?= $enc->html(sprintf($this->translate('admin', 'PHP setting for "%1$s" is too low'), "post_max_size")); ?>
46 46
 				</p>
47
-				<p class="upload_max_filesize hidden" data-value="<?= $enc->attr( $bytes( ini_get( 'upload_max_filesize' ) ) ); ?>">
48
-					<?= $enc->html( sprintf( $this->translate( 'admin', 'PHP setting for "%1$s" is too low' ), "upload_max_filesize" ) ); ?>
47
+				<p class="upload_max_filesize hidden" data-value="<?= $enc->attr($bytes(ini_get('upload_max_filesize'))); ?>">
48
+					<?= $enc->html(sprintf($this->translate('admin', 'PHP setting for "%1$s" is too low'), "upload_max_filesize")); ?>
49 49
 				</p>
50 50
 			</div>
51 51
 			<div class="modal-footer">
52
-				<button type="button" class="btn btn-secondary" data-dismiss="modal"><?= $enc->html( $this->translate( 'admin', 'Close' ) ); ?></button>
52
+				<button type="button" class="btn btn-secondary" data-dismiss="modal"><?= $enc->html($this->translate('admin', 'Close')); ?></button>
53 53
 			</div>
54 54
 		</div>
55 55
 	</div>
Please login to merge, or discard this patch.
admin/jqadm/templates/common/partials/confirm-standard.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@
 block discarded – undo
12 12
 	<div class="modal-dialog">
13 13
 		<div class="modal-content">
14 14
 			<div class="modal-header">
15
-				<h4 class="modal-title"><?= $enc->html( $this->translate( 'admin', 'Delete items?' ) ); ?></h4>
16
-				<button type="button" class="close" data-dismiss="modal" aria-label="<?= $enc->attr( $this->translate( 'admin', 'Close' ) ); ?>"><span aria-hidden="true">&times;</span></button>
15
+				<h4 class="modal-title"><?= $enc->html($this->translate('admin', 'Delete items?')); ?></h4>
16
+				<button type="button" class="close" data-dismiss="modal" aria-label="<?= $enc->attr($this->translate('admin', 'Close')); ?>"><span aria-hidden="true">&times;</span></button>
17 17
 			</div>
18 18
 			<div class="modal-body">
19
-				<p><?= $enc->html( $this->translate( 'admin', 'You are going to delete one or more items. Would you like to proceed?' ) ); ?></p>
19
+				<p><?= $enc->html($this->translate('admin', 'You are going to delete one or more items. Would you like to proceed?')); ?></p>
20 20
 			</div>
21 21
 			<div class="modal-footer">
22
-				<button type="button" class="btn btn-danger" data-dismiss="modal"><?= $enc->html( $this->translate( 'admin', 'Delete' ) ); ?></button>
23
-				<button type="button" class="btn btn-secondary" data-dismiss="modal"><?= $enc->html( $this->translate( 'admin', 'Close' ) ); ?></button>
22
+				<button type="button" class="btn btn-danger" data-dismiss="modal"><?= $enc->html($this->translate('admin', 'Delete')); ?></button>
23
+				<button type="button" class="btn btn-secondary" data-dismiss="modal"><?= $enc->html($this->translate('admin', 'Close')); ?></button>
24 24
 			</div>
25 25
 		</div>
26 26
 	</div>
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Base.php 1 patch
Spacing   +144 added lines, -144 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Aimeos\Admin\JQAdm;
12 12
 
13
-sprintf( 'type' ); // for translation
13
+sprintf('type'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 *
34 34
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
35 35
 	 */
36
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context )
36
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context)
37 37
 	{
38 38
 		$this->context = $context;
39 39
 	}
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 	 * @param array $param List of method parameter
47 47
 	 * @throws \Aimeos\Admin\JQAdm\Exception If method call failed
48 48
 	 */
49
-	public function __call( $name, array $param )
49
+	public function __call($name, array $param)
50 50
 	{
51
-		throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Unable to call method "%1$s"', $name ) );
51
+		throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Unable to call method "%1$s"', $name));
52 52
 	}
53 53
 
54 54
 
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 	 */
60 60
 	public function getAimeos()
61 61
 	{
62
-		if( !isset( $this->aimeos ) ) {
63
-			throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Aimeos object not available' ) );
62
+		if (!isset($this->aimeos)) {
63
+			throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Aimeos object not available'));
64 64
 		}
65 65
 
66 66
 		return $this->aimeos;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 * @param \Aimeos\Bootstrap $aimeos The Aimeos bootstrap object
74 74
 	 * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls
75 75
 	 */
76
-	public function setAimeos( \Aimeos\Bootstrap $aimeos )
76
+	public function setAimeos(\Aimeos\Bootstrap $aimeos)
77 77
 	{
78 78
 		$this->aimeos = $aimeos;
79 79
 		return $this;
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function getView()
89 89
 	{
90
-		if( !isset( $this->view ) ) {
91
-			throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'No view available' ) );
90
+		if (!isset($this->view)) {
91
+			throw new \Aimeos\Admin\JQAdm\Exception(sprintf('No view available'));
92 92
 		}
93 93
 
94 94
 		return $this->view;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 * @param \Aimeos\MW\View\Iface $view The view object which generates the admin output
102 102
 	 * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls
103 103
 	 */
104
-	public function setView( \Aimeos\MW\View\Iface $view )
104
+	public function setView(\Aimeos\MW\View\Iface $view)
105 105
 	{
106 106
 		$this->view = $view;
107 107
 		return $this;
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 	public function copy()
117 117
 	{
118
-		foreach( $this->getSubClients() as $client ) {
118
+		foreach ($this->getSubClients() as $client) {
119 119
 			$client->copy();
120 120
 		}
121 121
 	}
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	 */
129 129
 	public function create()
130 130
 	{
131
-		foreach( $this->getSubClients() as $client ) {
131
+		foreach ($this->getSubClients() as $client) {
132 132
 			$client->create();
133 133
 		}
134 134
 	}
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 */
142 142
 	public function delete()
143 143
 	{
144
-		foreach( $this->getSubClients() as $client ) {
144
+		foreach ($this->getSubClients() as $client) {
145 145
 			$client->delete();
146 146
 		}
147 147
 	}
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public function export()
156 156
 	{
157
-		foreach( $this->getSubClients() as $client ) {
157
+		foreach ($this->getSubClients() as $client) {
158 158
 			$client->export();
159 159
 		}
160 160
 	}
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 */
168 168
 	public function get()
169 169
 	{
170
-		foreach( $this->getSubClients() as $client ) {
170
+		foreach ($this->getSubClients() as $client) {
171 171
 			$client->get();
172 172
 		}
173 173
 	}
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	 */
181 181
 	public function import()
182 182
 	{
183
-		foreach( $this->getSubClients() as $client ) {
183
+		foreach ($this->getSubClients() as $client) {
184 184
 			$client->import();
185 185
 		}
186 186
 	}
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	 */
194 194
 	public function save()
195 195
 	{
196
-		foreach( $this->getSubClients() as $client ) {
196
+		foreach ($this->getSubClients() as $client) {
197 197
 			$client->save();
198 198
 		}
199 199
 	}
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 */
207 207
 	public function search()
208 208
 	{
209
-		foreach( $this->getSubClients() as $client ) {
209
+		foreach ($this->getSubClients() as $client) {
210 210
 			$client->search();
211 211
 		}
212 212
 	}
@@ -220,25 +220,25 @@  discard block
 block discarded – undo
220 220
 	 * @param string $classprefix Decorator class prefix, e.g. "\Aimeos\Admin\JQAdm\Catalog\Decorator\"
221 221
 	 * @return \Aimeos\Admin\JQAdm\Iface Admin object
222 222
 	 */
223
-	protected function addDecorators( \Aimeos\Admin\JQAdm\Iface $client, array $decorators, $classprefix )
223
+	protected function addDecorators(\Aimeos\Admin\JQAdm\Iface $client, array $decorators, $classprefix)
224 224
 	{
225
-		foreach( $decorators as $name )
225
+		foreach ($decorators as $name)
226 226
 		{
227
-			if( ctype_alnum( $name ) === false )
227
+			if (ctype_alnum($name) === false)
228 228
 			{
229
-				$classname = is_string( $name ) ? $classprefix . $name : '<not a string>';
230
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid class name "%1$s"', $classname ) );
229
+				$classname = is_string($name) ? $classprefix . $name : '<not a string>';
230
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Invalid class name "%1$s"', $classname));
231 231
 			}
232 232
 
233 233
 			$classname = $classprefix . $name;
234 234
 
235
-			if( class_exists( $classname ) === false ) {
236
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Class "%1$s" not found', $classname ) );
235
+			if (class_exists($classname) === false) {
236
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Class "%1$s" not found', $classname));
237 237
 			}
238 238
 
239
-			$client = new $classname( $client, $this->context );
239
+			$client = new $classname($client, $this->context);
240 240
 
241
-			\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\Iface', $client );
241
+			\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\Iface', $client);
242 242
 		}
243 243
 
244 244
 		return $client;
@@ -252,35 +252,35 @@  discard block
 block discarded – undo
252 252
 	 * @param string $path Admin string in lower case, e.g. "catalog/detail/basic"
253 253
 	 * @return \Aimeos\Admin\JQAdm\Iface Admin object
254 254
 	 */
255
-	protected function addClientDecorators( \Aimeos\Admin\JQAdm\Iface $client, $path )
255
+	protected function addClientDecorators(\Aimeos\Admin\JQAdm\Iface $client, $path)
256 256
 	{
257
-		if( !is_string( $path ) || $path === '' ) {
258
-			throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid domain "%1$s"', $path ) );
257
+		if (!is_string($path) || $path === '') {
258
+			throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Invalid domain "%1$s"', $path));
259 259
 		}
260 260
 
261
-		$localClass = str_replace( ' ', '\\', ucwords( str_replace( '/', ' ', $path ) ) );
261
+		$localClass = str_replace(' ', '\\', ucwords(str_replace('/', ' ', $path)));
262 262
 		$config = $this->context->getConfig();
263 263
 
264
-		$decorators = $config->get( 'admin/jqadm/common/decorators/default', [] );
265
-		$excludes = $config->get( 'admin/jqadm/' . $path . '/decorators/excludes', [] );
264
+		$decorators = $config->get('admin/jqadm/common/decorators/default', []);
265
+		$excludes = $config->get('admin/jqadm/' . $path . '/decorators/excludes', []);
266 266
 
267
-		foreach( $decorators as $key => $name )
267
+		foreach ($decorators as $key => $name)
268 268
 		{
269
-			if( in_array( $name, $excludes ) ) {
270
-				unset( $decorators[$key] );
269
+			if (in_array($name, $excludes)) {
270
+				unset($decorators[$key]);
271 271
 			}
272 272
 		}
273 273
 
274 274
 		$classprefix = '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\';
275
-		$client = $this->addDecorators( $client, $decorators, $classprefix );
275
+		$client = $this->addDecorators($client, $decorators, $classprefix);
276 276
 
277 277
 		$classprefix = '\\Aimeos\\Admin\\JQAdm\\Common\\Decorator\\';
278
-		$decorators = $config->get( 'admin/jqadm/' . $path . '/decorators/global', [] );
279
-		$client = $this->addDecorators( $client, $decorators, $classprefix );
278
+		$decorators = $config->get('admin/jqadm/' . $path . '/decorators/global', []);
279
+		$client = $this->addDecorators($client, $decorators, $classprefix);
280 280
 
281 281
 		$classprefix = '\\Aimeos\\Admin\\JQAdm\\' . $localClass . '\\Decorator\\';
282
-		$decorators = $config->get( 'admin/jqadm/' . $path . '/decorators/local', [] );
283
-		$client = $this->addDecorators( $client, $decorators, $classprefix );
282
+		$decorators = $config->get('admin/jqadm/' . $path . '/decorators/local', []);
283
+		$client = $this->addDecorators($client, $decorators, $classprefix);
284 284
 
285 285
 		return $client;
286 286
 	}
@@ -293,33 +293,33 @@  discard block
 block discarded – undo
293 293
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
294 294
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-part object
295 295
 	 */
296
-	protected function createSubClient( $path, $name )
296
+	protected function createSubClient($path, $name)
297 297
 	{
298
-		$path = strtolower( $path );
298
+		$path = strtolower($path);
299 299
 
300
-		if( $name === null ) {
301
-			$name = $this->context->getConfig()->get( 'admin/jqadm/' . $path . '/name', 'Standard' );
300
+		if ($name === null) {
301
+			$name = $this->context->getConfig()->get('admin/jqadm/' . $path . '/name', 'Standard');
302 302
 		}
303 303
 
304
-		if( empty( $name ) || ctype_alnum( $name ) === false ) {
305
-			throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid characters in client name "%1$s"', $name ) );
304
+		if (empty($name) || ctype_alnum($name) === false) {
305
+			throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Invalid characters in client name "%1$s"', $name));
306 306
 		}
307 307
 
308
-		$subnames = str_replace( ' ', '\\', ucwords( str_replace( '/', ' ', $path ) ) );
308
+		$subnames = str_replace(' ', '\\', ucwords(str_replace('/', ' ', $path)));
309 309
 
310 310
 		$classname = '\\Aimeos\\Admin\\JQAdm\\' . $subnames . '\\' . $name;
311 311
 
312
-		if( class_exists( $classname ) === false ) {
313
-			throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
312
+		if (class_exists($classname) === false) {
313
+			throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Class "%1$s" not available', $classname));
314 314
 		}
315 315
 
316
-		$object = new $classname( $this->context );
316
+		$object = new $classname($this->context);
317 317
 
318
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Admin\\JQAdm\\Iface', $object );
318
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Admin\\JQAdm\\Iface', $object);
319 319
 
320
-		$object = $this->addClientDecorators( $object, $path );
321
-		$object->setAimeos( $this->aimeos );
322
-		$object->setView( $this->view );
320
+		$object = $this->addClientDecorators($object, $path);
321
+		$object->setAimeos($this->aimeos);
322
+		$object->setView($this->view);
323 323
 
324 324
 		return $object;
325 325
 	}
@@ -333,11 +333,11 @@  discard block
 block discarded – undo
333 333
 	 * @param mixed $default Returned value if no one for key is available
334 334
 	 * @return mixed Value from the array or default value if not present in array
335 335
 	 */
336
-	protected function getValue( array $values, $key, $default = null )
336
+	protected function getValue(array $values, $key, $default = null)
337 337
 	{
338
-		foreach( explode( '/', trim( $key, '/' ) ) as $part )
338
+		foreach (explode('/', trim($key, '/')) as $part)
339 339
 		{
340
-			if( isset( $values[$part] ) ) {
340
+			if (isset($values[$part])) {
341 341
 				$values = $values[$part];
342 342
 			} else {
343 343
 				return $default;
@@ -354,13 +354,13 @@  discard block
 block discarded – undo
354 354
 	 * @param array $names List of parameter names
355 355
 	 * @return array Associative list of parameters names as key and their values
356 356
 	 */
357
-	protected function getClientParams( $names = array( 'id', 'resource', 'site', 'lang' ) )
357
+	protected function getClientParams($names = array('id', 'resource', 'site', 'lang'))
358 358
 	{
359 359
 		$list = [];
360 360
 
361
-		foreach( $names as $name )
361
+		foreach ($names as $name)
362 362
 		{
363
-			if( ( $val = $this->view->param( $name ) ) !== null ) {
363
+			if (($val = $this->view->param($name)) !== null) {
364 364
 				$list[$name] = $val;
365 365
 			}
366 366
 		}
@@ -395,26 +395,26 @@  discard block
 block discarded – undo
395 395
 	 * @param string[] $excludes List of file names to execlude
396 396
 	 * @return string[] List of available class names
397 397
 	 */
398
-	protected function getClassNames( $relpath, array $excludes = ['Base.php', 'Iface.php', 'Example.php', 'None.php'] )
398
+	protected function getClassNames($relpath, array $excludes = ['Base.php', 'Iface.php', 'Example.php', 'None.php'])
399 399
 	{
400 400
 		$list = [];
401 401
 
402
-		foreach( $this->getAimeos()->getIncludePaths() as $path )
402
+		foreach ($this->getAimeos()->getIncludePaths() as $path)
403 403
 		{
404 404
 			$path .= DIRECTORY_SEPARATOR . $relpath;
405 405
 
406
-			if( is_dir( $path ) )
406
+			if (is_dir($path))
407 407
 			{
408
-				foreach( new \DirectoryIterator( $path ) as $entry )
408
+				foreach (new \DirectoryIterator($path) as $entry)
409 409
 				{
410
-					if( $entry->isFile() && !in_array( $entry->getFileName(), $excludes ) ) {
411
-						$list[] = pathinfo( $entry->getFileName(), PATHINFO_FILENAME );
410
+					if ($entry->isFile() && !in_array($entry->getFileName(), $excludes)) {
411
+						$list[] = pathinfo($entry->getFileName(), PATHINFO_FILENAME);
412 412
 					}
413 413
 				}
414 414
 			}
415 415
 		}
416 416
 
417
-		sort( $list );
417
+		sort($list);
418 418
 		return $list;
419 419
 	}
420 420
 
@@ -425,22 +425,22 @@  discard block
 block discarded – undo
425 425
 	 * @param array $params List of criteria data with condition, sorting and paging
426 426
 	 * @return array Multi-dimensional associative list of criteria conditions
427 427
 	 */
428
-	protected function getCriteriaConditions( array $params )
428
+	protected function getCriteriaConditions(array $params)
429 429
 	{
430 430
 		$expr = [];
431 431
 
432
-		if( isset( $params['key'] ) )
432
+		if (isset($params['key']))
433 433
 		{
434
-			foreach( (array) $params['key'] as $idx => $key )
434
+			foreach ((array) $params['key'] as $idx => $key)
435 435
 			{
436
-				if( $key != '' && isset( $params['op'][$idx] ) && $params['op'][$idx] != ''
437
-					&& isset( $params['val'][$idx] ) && $params['val'][$idx] != ''
436
+				if ($key != '' && isset($params['op'][$idx]) && $params['op'][$idx] != ''
437
+					&& isset($params['val'][$idx]) && $params['val'][$idx] != ''
438 438
 				) {
439 439
 					$expr[] = [$params['op'][$idx] => [$key => $params['val'][$idx]]];
440 440
 				}
441 441
 			}
442 442
 
443
-			if( !empty( $expr ) ) {
443
+			if (!empty($expr)) {
444 444
 				$expr = ['&&' => $expr];
445 445
 			}
446 446
 		}
@@ -455,14 +455,14 @@  discard block
 block discarded – undo
455 455
 	 * @param array $params List of criteria data with condition, sorting and paging
456 456
 	 * @return array Associative list of criteria sortations
457 457
 	 */
458
-	protected function getCriteriaSortations( array $params )
458
+	protected function getCriteriaSortations(array $params)
459 459
 	{
460 460
 		$sortation = [];
461 461
 
462
-		foreach( $params as $sort )
462
+		foreach ($params as $sort)
463 463
 		{
464
-			if( $sort[0] === '-' ) {
465
-				$sortation[substr( $sort, 1 )] = '-';
464
+			if ($sort[0] === '-') {
465
+				$sortation[substr($sort, 1)] = '-';
466 466
 			} else {
467 467
 				$sortation[$sort] = '+';
468 468
 			}
@@ -479,12 +479,12 @@  discard block
 block discarded – undo
479 479
 	 */
480 480
 	protected function getSubClients()
481 481
 	{
482
-		if( !isset( $this->subclients ) )
482
+		if (!isset($this->subclients))
483 483
 		{
484 484
 			$this->subclients = [];
485 485
 
486
-			foreach( $this->getSubClientNames() as $name ) {
487
-				$this->subclients[] = $this->getSubClient( $name );
486
+			foreach ($this->getSubClientNames() as $name) {
487
+				$this->subclients[] = $this->getSubClient($name);
488 488
 			}
489 489
 		}
490 490
 
@@ -499,22 +499,22 @@  discard block
 block discarded – undo
499 499
 	 * @param array $params List of criteria data with condition, sorting and paging
500 500
 	 * @return \Aimeos\MW\Criteria\Iface Initialized criteria object
501 501
 	 */
502
-	protected function initCriteria( \Aimeos\MW\Criteria\Iface $criteria, array $params )
502
+	protected function initCriteria(\Aimeos\MW\Criteria\Iface $criteria, array $params)
503 503
 	{
504
-		if( isset( $params['filter'] ) ) {
505
-			$criteria = $this->initCriteriaConditions( $criteria, (array) $params['filter'] );
504
+		if (isset($params['filter'])) {
505
+			$criteria = $this->initCriteriaConditions($criteria, (array) $params['filter']);
506 506
 		}
507 507
 
508
-		if( isset( $params['sort'] ) ) {
509
-			$criteria = $this->initCriteriaSortations( $criteria, (array) $params['sort'] );
508
+		if (isset($params['sort'])) {
509
+			$criteria = $this->initCriteriaSortations($criteria, (array) $params['sort']);
510 510
 		}
511 511
 
512 512
 		$page = [];
513
-		if( isset( $params['page'] ) ) {
513
+		if (isset($params['page'])) {
514 514
 			$page = (array) $params['page'];
515 515
 		}
516 516
 
517
-		return $this->initCriteriaSlice( $criteria, $page );
517
+		return $this->initCriteriaSlice($criteria, $page);
518 518
 	}
519 519
 
520 520
 
@@ -523,12 +523,12 @@  discard block
 block discarded – undo
523 523
 	 *
524 524
 	 * @param \Exception $e Exception object
525 525
 	 */
526
-	protected function logException( \Exception $e )
526
+	protected function logException(\Exception $e)
527 527
 	{
528 528
 		$logger = $this->context->getLogger();
529 529
 
530
-		$logger->log( $e->getMessage(), \Aimeos\MW\Logger\Base::WARN, 'admin/jqadm' );
531
-		$logger->log( $e->getTraceAsString(), \Aimeos\MW\Logger\Base::WARN, 'admin/jqadm' );
530
+		$logger->log($e->getMessage(), \Aimeos\MW\Logger\Base::WARN, 'admin/jqadm');
531
+		$logger->log($e->getTraceAsString(), \Aimeos\MW\Logger\Base::WARN, 'admin/jqadm');
532 532
 	}
533 533
 
534 534
 
@@ -541,50 +541,50 @@  discard block
 block discarded – undo
541 541
 	 * @param string $id ID of the next resource item
542 542
 	 * @return \Aimeos\MW\View\Iface Modified view object
543 543
 	 */
544
-	protected function nextAction( \Aimeos\MW\View\Iface $view, $action, $resource, $id = null, $act = null )
544
+	protected function nextAction(\Aimeos\MW\View\Iface $view, $action, $resource, $id = null, $act = null)
545 545
 	{
546 546
 		$params = $this->getClientParams();
547 547
 		$params['resource'] = $resource;
548
-		unset( $params['id'] );
548
+		unset($params['id']);
549 549
 
550
-		if( $act ) {
550
+		if ($act) {
551 551
 			$params['act'] = $act;
552 552
 		}
553 553
 
554
-		switch( $action )
554
+		switch ($action)
555 555
 		{
556 556
 			case 'search':
557
-				$target = $view->config( 'admin/jqadm/url/search/target' );
558
-				$cntl = $view->config( 'admin/jqadm/url/search/controller', 'Jqadm' );
559
-				$action = $view->config( 'admin/jqadm/url/search/action', 'search' );
560
-				$conf = $view->config( 'admin/jqadm/url/search/config', [] );
561
-				$url = $view->url( $target, $cntl, $action, $params, [], $conf );
557
+				$target = $view->config('admin/jqadm/url/search/target');
558
+				$cntl = $view->config('admin/jqadm/url/search/controller', 'Jqadm');
559
+				$action = $view->config('admin/jqadm/url/search/action', 'search');
560
+				$conf = $view->config('admin/jqadm/url/search/config', []);
561
+				$url = $view->url($target, $cntl, $action, $params, [], $conf);
562 562
 				break;
563 563
 			case 'create':
564
-				$target = $view->config( 'admin/jqadm/url/create/target' );
565
-				$cntl = $view->config( 'admin/jqadm/url/create/controller', 'Jqadm' );
566
-				$action = $view->config( 'admin/jqadm/url/create/action', 'create' );
567
-				$conf = $view->config( 'admin/jqadm/url/create/config', [] );
568
-				$url = $view->url( $target, $cntl, $action, $params, [], $conf );
564
+				$target = $view->config('admin/jqadm/url/create/target');
565
+				$cntl = $view->config('admin/jqadm/url/create/controller', 'Jqadm');
566
+				$action = $view->config('admin/jqadm/url/create/action', 'create');
567
+				$conf = $view->config('admin/jqadm/url/create/config', []);
568
+				$url = $view->url($target, $cntl, $action, $params, [], $conf);
569 569
 				break;
570 570
 			case 'copy':
571
-				$target = $view->config( 'admin/jqadm/url/copy/target' );
572
-				$cntl = $view->config( 'admin/jqadm/url/copy/controller', 'Jqadm' );
573
-				$action = $view->config( 'admin/jqadm/url/copy/action', 'copy' );
574
-				$conf = $view->config( 'admin/jqadm/url/copy/config', [] );
575
-				$url = $view->url( $target, $cntl, $action, ['id' => $id] + $params, [], $conf );
571
+				$target = $view->config('admin/jqadm/url/copy/target');
572
+				$cntl = $view->config('admin/jqadm/url/copy/controller', 'Jqadm');
573
+				$action = $view->config('admin/jqadm/url/copy/action', 'copy');
574
+				$conf = $view->config('admin/jqadm/url/copy/config', []);
575
+				$url = $view->url($target, $cntl, $action, ['id' => $id] + $params, [], $conf);
576 576
 				break;
577 577
 			default:
578
-				$target = $view->config( 'admin/jqadm/url/get/target' );
579
-				$cntl = $view->config( 'admin/jqadm/url/get/controller', 'Jqadm' );
580
-				$action = $view->config( 'admin/jqadm/url/get/action', 'get' );
581
-				$conf = $view->config( 'admin/jqadm/url/get/config', [] );
582
-				$url = $view->url( $target, $cntl, $action, ['id' => $id] + $params, [], $conf );
578
+				$target = $view->config('admin/jqadm/url/get/target');
579
+				$cntl = $view->config('admin/jqadm/url/get/controller', 'Jqadm');
580
+				$action = $view->config('admin/jqadm/url/get/action', 'get');
581
+				$conf = $view->config('admin/jqadm/url/get/config', []);
582
+				$url = $view->url($target, $cntl, $action, ['id' => $id] + $params, [], $conf);
583 583
 		}
584 584
 
585
-		$view->response()->withStatus( 302 );
586
-		$view->response()->withHeader( 'Location', $url );
587
-		$view->response()->withHeader( 'Cache-Control', 'no-store' );
585
+		$view->response()->withStatus(302);
586
+		$view->response()->withHeader('Location', $url);
587
+		$view->response()->withHeader('Cache-Control', 'no-store');
588 588
 
589 589
 		return $view;
590 590
 	}
@@ -596,13 +596,13 @@  discard block
 block discarded – undo
596 596
 	 * @param \Aimeos\MShop\Common\Item\Type\Iface[] Associative list of type IDs as keys and items as values
597 597
 	 * @return \Aimeos\MShop\Common\Item\Type\Iface[] Sorted associative list of type IDs as keys and items as values
598 598
 	 */
599
-	protected function sortType( array $items )
599
+	protected function sortType(array $items)
600 600
 	{
601
-		foreach( $items as $id => $item )
601
+		foreach ($items as $id => $item)
602 602
 		{
603
-			if( $item instanceof \Aimeos\MShop\Common\Item\Type\Iface && $item->getCode() === 'default' )
603
+			if ($item instanceof \Aimeos\MShop\Common\Item\Type\Iface && $item->getCode() === 'default')
604 604
 			{
605
-				unset( $items[$id] );
605
+				unset($items[$id]);
606 606
 				return [$id => $item] + $items;
607 607
 			}
608 608
 		}
@@ -618,32 +618,32 @@  discard block
 block discarded – undo
618 618
 	 * @param string $name Name of the panel/subpanel
619 619
 	 * @return array Associative list of parameters for searching items
620 620
 	 */
621
-	protected function storeSearchParams( array $params, $name )
621
+	protected function storeSearchParams(array $params, $name)
622 622
 	{
623 623
 		$key = 'aimeos/admin/jqadm/' . $name;
624 624
 		$session = $this->getContext()->getSession();
625 625
 
626
-		if( isset( $params['filter'] ) ) {
627
-			$session->set( $key . '/filter', $params['filter'] );
626
+		if (isset($params['filter'])) {
627
+			$session->set($key . '/filter', $params['filter']);
628 628
 		}
629 629
 
630
-		if( isset( $params['sort'] ) ) {
631
-			$session->set( $key . '/sort', $params['sort'] );
630
+		if (isset($params['sort'])) {
631
+			$session->set($key . '/sort', $params['sort']);
632 632
 		}
633 633
 
634
-		if( isset( $params['page'] ) ) {
635
-			$session->set( $key . '/page', $params['page'] );
634
+		if (isset($params['page'])) {
635
+			$session->set($key . '/page', $params['page']);
636 636
 		}
637 637
 
638
-		if( isset( $params['fields'] ) ) {
639
-			$session->set( $key . '/fields', $params['fields'] );
638
+		if (isset($params['fields'])) {
639
+			$session->set($key . '/fields', $params['fields']);
640 640
 		}
641 641
 
642 642
 		return [
643
-			'fields' => $session->get( $key . '/fields' ),
644
-			'filter' => $session->get( $key . '/filter' ),
645
-			'page' => $session->get( $key . '/page' ),
646
-			'sort' => $session->get( $key . '/sort' ),
643
+			'fields' => $session->get($key . '/fields'),
644
+			'filter' => $session->get($key . '/filter'),
645
+			'page' => $session->get($key . '/page'),
646
+			'sort' => $session->get($key . '/sort'),
647 647
 		];
648 648
 	}
649 649
 
@@ -655,14 +655,14 @@  discard block
 block discarded – undo
655 655
 	 * @param array $params List of criteria data with condition, sorting and paging
656 656
 	 * @return \Aimeos\MW\Criteria\Iface Initialized criteria object
657 657
 	 */
658
-	private function initCriteriaConditions( \Aimeos\MW\Criteria\Iface $criteria, array $params )
658
+	private function initCriteriaConditions(\Aimeos\MW\Criteria\Iface $criteria, array $params)
659 659
 	{
660 660
 		$expr = [
661
-			$criteria->toConditions( $this->getCriteriaConditions( $params ) ),
661
+			$criteria->toConditions($this->getCriteriaConditions($params)),
662 662
 			$criteria->getConditions(),
663 663
 		];
664 664
 
665
-		return $criteria->setConditions( $criteria->combine( '&&', $expr ) );
665
+		return $criteria->setConditions($criteria->combine('&&', $expr));
666 666
 	}
667 667
 
668 668
 
@@ -673,12 +673,12 @@  discard block
 block discarded – undo
673 673
 	 * @param array $params List of criteria data with condition, sorting and paging
674 674
 	 * @return \Aimeos\MW\Criteria\Iface Initialized criteria object
675 675
 	 */
676
-	private function initCriteriaSlice( \Aimeos\MW\Criteria\Iface $criteria, array $params )
676
+	private function initCriteriaSlice(\Aimeos\MW\Criteria\Iface $criteria, array $params)
677 677
 	{
678
-		$start = ( isset( $params['offset'] ) ? $params['offset'] : 0 );
679
-		$size = ( isset( $params['limit'] ) ? $params['limit'] : 25 );
678
+		$start = (isset($params['offset']) ? $params['offset'] : 0);
679
+		$size = (isset($params['limit']) ? $params['limit'] : 25);
680 680
 
681
-		return $criteria->setSlice( $start, $size );
681
+		return $criteria->setSlice($start, $size);
682 682
 	}
683 683
 
684 684
 
@@ -689,8 +689,8 @@  discard block
 block discarded – undo
689 689
 	 * @param array $params List of criteria data with condition, sorting and paging
690 690
 	 * @return \Aimeos\MW\Criteria\Iface Initialized criteria object
691 691
 	 */
692
-	private function initCriteriaSortations( \Aimeos\MW\Criteria\Iface $criteria, array $params )
692
+	private function initCriteriaSortations(\Aimeos\MW\Criteria\Iface $criteria, array $params)
693 693
 	{
694
-		return $criteria->setSortations( $criteria->toSortations( $this->getCriteriaSortations( $params ) ) );
694
+		return $criteria->setSortations($criteria->toSortations($this->getCriteriaSortations($params)));
695 695
 	}
696 696
 }
Please login to merge, or discard this patch.