@@ -118,14 +118,12 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | return; |
121 | - } |
|
122 | - catch( \Aimeos\MShop\Exception $e ) |
|
121 | + } catch( \Aimeos\MShop\Exception $e ) |
|
123 | 122 | { |
124 | 123 | $error = array( 'supplier-item-address' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
125 | 124 | $view->errors = $view->get( 'errors', [] ) + $error; |
126 | 125 | $this->logException( $e ); |
127 | - } |
|
128 | - catch( \Exception $e ) |
|
126 | + } catch( \Exception $e ) |
|
129 | 127 | { |
130 | 128 | $error = array( 'supplier-item-address' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
131 | 129 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -284,8 +282,7 @@ discard block |
||
284 | 282 | { |
285 | 283 | $addrItem = $addrItems[$entry['supplier.address.id']]; |
286 | 284 | unset( $addrItems[$entry['supplier.address.id']] ); |
287 | - } |
|
288 | - else |
|
285 | + } else |
|
289 | 286 | { |
290 | 287 | $addrItem = $manager->createItem(); |
291 | 288 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Supplier\Address; |
12 | 12 | |
13 | -sprintf( 'address' ); // for translation |
|
13 | +sprintf('address'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | { |
45 | 45 | $view = $this->getView(); |
46 | 46 | |
47 | - $view->addressData = $this->toArray( $view->item, true ); |
|
47 | + $view->addressData = $this->toArray($view->item, true); |
|
48 | 48 | $view->addressBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->addressBody .= $client->copy(); |
52 | 52 | } |
53 | 53 | |
54 | - return $this->render( $view ); |
|
54 | + return $this->render($view); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | { |
65 | 65 | $view = $this->getView(); |
66 | 66 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
67 | - $data = $view->param( 'address', [] ); |
|
67 | + $data = $view->param('address', []); |
|
68 | 68 | |
69 | - foreach( $data as $idx => $entry ) { |
|
69 | + foreach ($data as $idx => $entry) { |
|
70 | 70 | $data[$idx]['supplier.address.siteid'] = $siteid; |
71 | 71 | } |
72 | 72 | |
73 | 73 | $view->addressData = $data; |
74 | 74 | $view->addressBody = ''; |
75 | 75 | |
76 | - foreach( $this->getSubClients() as $client ) { |
|
76 | + foreach ($this->getSubClients() as $client) { |
|
77 | 77 | $view->addressBody .= $client->create(); |
78 | 78 | } |
79 | 79 | |
80 | - return $this->render( $view ); |
|
80 | + return $this->render($view); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | { |
91 | 91 | $view = $this->getView(); |
92 | 92 | |
93 | - $view->addressData = $this->toArray( $view->item ); |
|
93 | + $view->addressData = $this->toArray($view->item); |
|
94 | 94 | $view->addressBody = ''; |
95 | 95 | |
96 | - foreach( $this->getSubClients() as $client ) { |
|
96 | + foreach ($this->getSubClients() as $client) { |
|
97 | 97 | $view->addressBody .= $client->get(); |
98 | 98 | } |
99 | 99 | |
100 | - return $this->render( $view ); |
|
100 | + return $this->render($view); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | |
@@ -110,26 +110,26 @@ discard block |
||
110 | 110 | |
111 | 111 | try |
112 | 112 | { |
113 | - $this->fromArray( $view->item, $view->param( 'address', [] ) ); |
|
113 | + $this->fromArray($view->item, $view->param('address', [])); |
|
114 | 114 | $view->addressBody = ''; |
115 | 115 | |
116 | - foreach( $this->getSubClients() as $client ) { |
|
116 | + foreach ($this->getSubClients() as $client) { |
|
117 | 117 | $view->addressBody .= $client->save(); |
118 | 118 | } |
119 | 119 | |
120 | 120 | return; |
121 | 121 | } |
122 | - catch( \Aimeos\MShop\Exception $e ) |
|
122 | + catch (\Aimeos\MShop\Exception $e) |
|
123 | 123 | { |
124 | - $error = array( 'supplier-item-address' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
125 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
126 | - $this->logException( $e ); |
|
124 | + $error = array('supplier-item-address' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage())); |
|
125 | + $view->errors = $view->get('errors', []) + $error; |
|
126 | + $this->logException($e); |
|
127 | 127 | } |
128 | - catch( \Exception $e ) |
|
128 | + catch (\Exception $e) |
|
129 | 129 | { |
130 | - $error = array( 'supplier-item-address' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
131 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
132 | - $this->logException( $e ); |
|
130 | + $error = array('supplier-item-address' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
131 | + $view->errors = $view->get('errors', []) + $error; |
|
132 | + $this->logException($e); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | throw new \Aimeos\Admin\JQAdm\Exception(); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @param string|null $name Name of the sub-client (Default if null) |
144 | 144 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
145 | 145 | */ |
146 | - public function getSubClient( $type, $name = null ) |
|
146 | + public function getSubClient($type, $name = null) |
|
147 | 147 | { |
148 | 148 | /** admin/jqadm/supplier/address/decorators/excludes |
149 | 149 | * Excludes decorators added by the "common" option from the supplier JQAdm client |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * @see admin/jqadm/supplier/address/decorators/excludes |
219 | 219 | * @see admin/jqadm/supplier/address/decorators/global |
220 | 220 | */ |
221 | - return $this->createSubClient( 'supplier/address/' . $type, $name ); |
|
221 | + return $this->createSubClient('supplier/address/' . $type, $name); |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | * @since 2017.10 |
263 | 263 | * @category Developer |
264 | 264 | */ |
265 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/supplier/address/standard/subparts', [] ); |
|
265 | + return $this->getContext()->getConfig()->get('admin/jqadm/supplier/address/standard/subparts', []); |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | |
@@ -272,29 +272,29 @@ discard block |
||
272 | 272 | * @param \Aimeos\MShop\Supplier\Item\Iface $item Supplier item object without referenced domain items |
273 | 273 | * @param string[] $data Data array |
274 | 274 | */ |
275 | - protected function fromArray( \Aimeos\MShop\Supplier\Item\Iface $item, array $data ) |
|
275 | + protected function fromArray(\Aimeos\MShop\Supplier\Item\Iface $item, array $data) |
|
276 | 276 | { |
277 | - $manager = \Aimeos\MShop::create( $this->getContext(), 'supplier/address' ); |
|
277 | + $manager = \Aimeos\MShop::create($this->getContext(), 'supplier/address'); |
|
278 | 278 | |
279 | 279 | $addrItems = $item->getAddressItems(); |
280 | 280 | |
281 | - foreach( $data as $entry ) |
|
281 | + foreach ($data as $entry) |
|
282 | 282 | { |
283 | - if( isset( $addrItems[$entry['supplier.address.id']] ) ) |
|
283 | + if (isset($addrItems[$entry['supplier.address.id']])) |
|
284 | 284 | { |
285 | 285 | $addrItem = $addrItems[$entry['supplier.address.id']]; |
286 | - unset( $addrItems[$entry['supplier.address.id']] ); |
|
286 | + unset($addrItems[$entry['supplier.address.id']]); |
|
287 | 287 | } |
288 | 288 | else |
289 | 289 | { |
290 | 290 | $addrItem = $manager->createItem(); |
291 | 291 | } |
292 | 292 | |
293 | - $addrItem->fromArray( $entry ); |
|
294 | - $item->addAddressItem( $addrItem ); |
|
293 | + $addrItem->fromArray($entry); |
|
294 | + $item->addAddressItem($addrItem); |
|
295 | 295 | } |
296 | 296 | |
297 | - $item->deleteAddressItems( $addrItems ); |
|
297 | + $item->deleteAddressItems($addrItems); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | |
@@ -305,16 +305,16 @@ discard block |
||
305 | 305 | * @param boolean $copy True if items should be copied, false if not |
306 | 306 | * @return string[] Multi-dimensional associative list of item data |
307 | 307 | */ |
308 | - protected function toArray( \Aimeos\MShop\Supplier\Item\Iface $item, $copy = false ) |
|
308 | + protected function toArray(\Aimeos\MShop\Supplier\Item\Iface $item, $copy = false) |
|
309 | 309 | { |
310 | 310 | $siteId = $this->getContext()->getLocale()->getSiteId(); |
311 | 311 | $data = []; |
312 | 312 | |
313 | - foreach( $item->getAddressItems() as $addrItem ) |
|
313 | + foreach ($item->getAddressItems() as $addrItem) |
|
314 | 314 | { |
315 | - $list = $addrItem->toArray( true ); |
|
315 | + $list = $addrItem->toArray(true); |
|
316 | 316 | |
317 | - if( $copy === true ) |
|
317 | + if ($copy === true) |
|
318 | 318 | { |
319 | 319 | $list['supplier.address.siteid'] = $siteId; |
320 | 320 | $list['supplier.address.id'] = ''; |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | * @param \Aimeos\MW\View\Iface $view View object with data assigned |
334 | 334 | * @return string HTML output |
335 | 335 | */ |
336 | - protected function render( \Aimeos\MW\View\Iface $view ) |
|
336 | + protected function render(\Aimeos\MW\View\Iface $view) |
|
337 | 337 | { |
338 | 338 | /** admin/jqadm/supplier/address/template-item |
339 | 339 | * Relative path to the HTML body template of the address subpart for suppliers. |
@@ -357,6 +357,6 @@ discard block |
||
357 | 357 | $tplconf = 'admin/jqadm/supplier/address/template-item'; |
358 | 358 | $default = 'supplier/item-address-standard'; |
359 | 359 | |
360 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
360 | + return $view->render($view->config($tplconf, $default)); |
|
361 | 361 | } |
362 | 362 | } |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | ?> |
21 | 21 | <div id="address" class="item-address content-block tab-pane fade" role="tabpanel" aria-labelledby="address"> |
22 | 22 | <div id="item-address-group" role="tablist" aria-multiselectable="true" |
23 | - data-items="<?= $enc->attr( json_encode( $this->get( 'addressData', [] ) ) ); ?>" |
|
24 | - data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>" |
|
23 | + data-items="<?= $enc->attr(json_encode($this->get('addressData', []))); ?>" |
|
24 | + data-keys="<?= $enc->attr(json_encode($keys)) ?>" |
|
25 | 25 | data-siteid="<?= $this->site()->siteid() ?>" > |
26 | 26 | |
27 | 27 | <div v-for="(entry, idx) in items" v-bind:key="idx" class="group-item card"> |
@@ -30,20 +30,20 @@ discard block |
||
30 | 30 | v-bind:data-target="'#item-address-group-data-' + idx" data-toggle="collapse" role="tab" class="card-header header" |
31 | 31 | v-bind:aria-controls="'item-address-group-data-' + idx" aria-expanded="false"> |
32 | 32 | <div class="card-tools-left"> |
33 | - <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
34 | - title="<?= $enc->attr( $this->translate( 'admin', 'Show/hide this entry') ); ?>"> |
|
33 | + <div class="btn btn-card-header act-show fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
34 | + title="<?= $enc->attr($this->translate('admin', 'Show/hide this entry')); ?>"> |
|
35 | 35 | </div> |
36 | 36 | </div> |
37 | 37 | <span class="item-label header-label">{{ getLabel(idx, 'supplier.address.') }}</span> |
38 | 38 | |
39 | 39 | <div class="card-tools-right"> |
40 | - <div class="btn btn-card-header act-copy fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
41 | - title="<?= $enc->attr( $this->translate( 'admin', 'Duplicate entry (Ctrl+D)') ); ?>" |
|
40 | + <div class="btn btn-card-header act-copy fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
41 | + title="<?= $enc->attr($this->translate('admin', 'Duplicate entry (Ctrl+D)')); ?>" |
|
42 | 42 | v-on:click.stop="duplicateItem(idx)"> |
43 | 43 | </div> |
44 | 44 | <div v-if="!checkSite('supplier.address.siteid', idx)" |
45 | - class="btn btn-card-header act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
46 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>" |
|
45 | + class="btn btn-card-header act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
46 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>" |
|
47 | 47 | v-on:click="removeItem(idx)"> |
48 | 48 | </div> |
49 | 49 | </div> |
@@ -53,29 +53,29 @@ discard block |
||
53 | 53 | v-bind:aria-labelledby="'item-address-group-item-' + idx" role="tabpanel" class="card-block collapse row"> |
54 | 54 | |
55 | 55 | <div class="col-xl-6 content-block"> |
56 | - <h2 class="col-sm-12 item-header"><?= $enc->html( $this->translate( 'admin', 'Personal data' ) ); ?></h2> |
|
56 | + <h2 class="col-sm-12 item-header"><?= $enc->html($this->translate('admin', 'Personal data')); ?></h2> |
|
57 | 57 | |
58 | 58 | <input class="item-id" type="hidden" |
59 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.id' ) ) ); ?>'.replace('idx', idx)" |
|
59 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.id'))); ?>'.replace('idx', idx)" |
|
60 | 60 | v-bind:value="items[idx]['supplier.address.id']" /> |
61 | 61 | |
62 | - <?php $languages = $this->get( 'pageLangItems', [] ) ?> |
|
63 | - <?php if( count( $languages ) > 1 ) : ?> |
|
62 | + <?php $languages = $this->get('pageLangItems', []) ?> |
|
63 | + <?php if (count($languages) > 1) : ?> |
|
64 | 64 | <div class="form-group row mandatory"> |
65 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Language' ) ); ?></label> |
|
65 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Language')); ?></label> |
|
66 | 66 | <div class="col-sm-8"> |
67 | - <select class="form-control custom-select item-languageid" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
68 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.languageid' ) ) ); ?>'.replace('idx', idx)" |
|
67 | + <select class="form-control custom-select item-languageid" tabindex="<?= $this->get('tabindex'); ?>" |
|
68 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.languageid'))); ?>'.replace('idx', idx)" |
|
69 | 69 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
70 | 70 | v-model="items[idx]['supplier.address.languageid']" > |
71 | 71 | |
72 | 72 | <option value="" disable > |
73 | - <?= $enc->attr( $this->translate( 'admin', 'Please select' ) ); ?> |
|
73 | + <?= $enc->attr($this->translate('admin', 'Please select')); ?> |
|
74 | 74 | </option> |
75 | 75 | |
76 | - <?php foreach( $languages as $langId => $langItem ) : ?> |
|
77 | - <option value="<?= $enc->attr( $langId ); ?>" v-bind:selected="entry['supplier.address.languageid'] == '<?= $enc->attr( $langId ) ?>'" > |
|
78 | - <?= $enc->html( $langItem->getLabel() ); ?> |
|
76 | + <?php foreach ($languages as $langId => $langItem) : ?> |
|
77 | + <option value="<?= $enc->attr($langId); ?>" v-bind:selected="entry['supplier.address.languageid'] == '<?= $enc->attr($langId) ?>'" > |
|
78 | + <?= $enc->html($langItem->getLabel()); ?> |
|
79 | 79 | </option> |
80 | 80 | <?php endforeach; ?> |
81 | 81 | </select> |
@@ -83,261 +83,261 @@ discard block |
||
83 | 83 | </div> |
84 | 84 | <?php else : ?> |
85 | 85 | <input class="item-languageid" type="hidden" |
86 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.languageid' ) ) ); ?>'.replace('idx', idx)" |
|
87 | - value="<?= $enc->attr( key( $languages ) ); ?>" /> |
|
86 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.languageid'))); ?>'.replace('idx', idx)" |
|
87 | + value="<?= $enc->attr(key($languages)); ?>" /> |
|
88 | 88 | <?php endif; ?> |
89 | 89 | <div class="form-group row optional"> |
90 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Salutation' ) ); ?></label> |
|
90 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Salutation')); ?></label> |
|
91 | 91 | <div class="col-sm-8"> |
92 | - <select class="form-control custom-select item-salutation" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
93 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.salutation' ) ) ); ?>'.replace('idx', idx)" |
|
92 | + <select class="form-control custom-select item-salutation" tabindex="<?= $this->get('tabindex'); ?>" |
|
93 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.salutation'))); ?>'.replace('idx', idx)" |
|
94 | 94 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
95 | 95 | v-model="items[idx]['supplier.address.salutation']" > |
96 | 96 | <option value="company" v-bind:selected="items[idx]['supplier.address.salutation'] == 'company'" > |
97 | - <?= $enc->html( $this->translate( 'mshop/code', 'company' ) ); ?> |
|
97 | + <?= $enc->html($this->translate('mshop/code', 'company')); ?> |
|
98 | 98 | </option> |
99 | 99 | <option value="mr" v-bind:selected="items[idx]['supplier.address.salutation'] == 'mr'" > |
100 | - <?= $enc->html( $this->translate( 'mshop/code', 'mr' ) ); ?> |
|
100 | + <?= $enc->html($this->translate('mshop/code', 'mr')); ?> |
|
101 | 101 | </option> |
102 | 102 | <option value="mrs" v-bind:selected="items[idx]['supplier.address.salutation'] == 'mrs'" > |
103 | - <?= $enc->html( $this->translate( 'mshop/code', 'mrs' ) ); ?> |
|
103 | + <?= $enc->html($this->translate('mshop/code', 'mrs')); ?> |
|
104 | 104 | </option> |
105 | 105 | <option value="miss" v-bind:selected="items[idx]['supplier.address.salutation'] == 'miss'" > |
106 | - <?= $enc->html( $this->translate( 'mshop/code', 'miss' ) ); ?> |
|
106 | + <?= $enc->html($this->translate('mshop/code', 'miss')); ?> |
|
107 | 107 | </option> |
108 | 108 | </select> |
109 | 109 | </div> |
110 | 110 | <div class="col-sm-12 form-text text-muted help-text"> |
111 | - <?= $enc->html( $this->translate( 'admin', 'How the supplier is addressed in e-mails' ) ); ?> |
|
111 | + <?= $enc->html($this->translate('admin', 'How the supplier is addressed in e-mails')); ?> |
|
112 | 112 | </div> |
113 | 113 | </div> |
114 | 114 | <div class="form-group row optional"> |
115 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Title' ) ); ?></label> |
|
115 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Title')); ?></label> |
|
116 | 116 | <div class="col-sm-8"> |
117 | - <input class="form-control item-title" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
118 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.title' ) ) ); ?>'.replace('idx', idx)" |
|
119 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Honorary title (optional)' ) ); ?>" |
|
117 | + <input class="form-control item-title" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
118 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.title'))); ?>'.replace('idx', idx)" |
|
119 | + placeholder="<?= $enc->attr($this->translate('admin', 'Honorary title (optional)')); ?>" |
|
120 | 120 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
121 | 121 | v-model="items[idx]['supplier.address.title']" /> |
122 | 122 | </div> |
123 | 123 | <div class="col-sm-12 form-text text-muted help-text"> |
124 | - <?= $enc->html( $this->translate( 'admin', 'Honorary titles like Dr., Ph.D, etc.' ) ); ?> |
|
124 | + <?= $enc->html($this->translate('admin', 'Honorary titles like Dr., Ph.D, etc.')); ?> |
|
125 | 125 | </div> |
126 | 126 | </div> |
127 | 127 | <div class="form-group row mandatory"> |
128 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Last name' ) ); ?></label> |
|
128 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Last name')); ?></label> |
|
129 | 129 | <div class="col-sm-8"> |
130 | - <input class="form-control item-lastname" type="text" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
131 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.lastname' ) ) ); ?>'.replace('idx', idx)" |
|
132 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Last name (required)' ) ); ?>" |
|
130 | + <input class="form-control item-lastname" type="text" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
131 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.lastname'))); ?>'.replace('idx', idx)" |
|
132 | + placeholder="<?= $enc->attr($this->translate('admin', 'Last name (required)')); ?>" |
|
133 | 133 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
134 | 134 | v-model="items[idx]['supplier.address.lastname']" /> |
135 | 135 | </div> |
136 | 136 | <div class="col-sm-12 form-text text-muted help-text"> |
137 | - <?= $enc->html( $this->translate( 'admin', 'Last name of the person or full name in cultures where no first names are used' ) ); ?> |
|
137 | + <?= $enc->html($this->translate('admin', 'Last name of the person or full name in cultures where no first names are used')); ?> |
|
138 | 138 | </div> |
139 | 139 | </div> |
140 | 140 | <div class="form-group row optional"> |
141 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'First name' ) ); ?></label> |
|
141 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'First name')); ?></label> |
|
142 | 142 | <div class="col-sm-8"> |
143 | - <input class="form-control item-firstname" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
144 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.firstname' ) ) ); ?>'.replace('idx', idx)" |
|
145 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'First name (optional)' ) ); ?>" |
|
143 | + <input class="form-control item-firstname" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
144 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.firstname'))); ?>'.replace('idx', idx)" |
|
145 | + placeholder="<?= $enc->attr($this->translate('admin', 'First name (optional)')); ?>" |
|
146 | 146 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
147 | 147 | v-model="items[idx]['supplier.address.firstname']" /> |
148 | 148 | </div> |
149 | 149 | <div class="col-sm-12 form-text text-muted help-text"> |
150 | - <?= $enc->html( $this->translate( 'admin', 'First name of the person if used in cultures where they are used' ) ); ?> |
|
150 | + <?= $enc->html($this->translate('admin', 'First name of the person if used in cultures where they are used')); ?> |
|
151 | 151 | </div> |
152 | 152 | </div> |
153 | 153 | </div><!-- |
154 | 154 | |
155 | 155 | --><div class="col-xl-6 content-block"> |
156 | - <h2 class="col-sm-12 item-header"><?= $enc->html( $this->translate( 'admin', 'Delivery address' ) ); ?></h2> |
|
156 | + <h2 class="col-sm-12 item-header"><?= $enc->html($this->translate('admin', 'Delivery address')); ?></h2> |
|
157 | 157 | <div class="form-group row optional"> |
158 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Street' ) ); ?></label> |
|
158 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Street')); ?></label> |
|
159 | 159 | <div class="col-sm-8"> |
160 | - <input class="form-control item-address1" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
161 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.address1' ) ) ); ?>'.replace('idx', idx)" |
|
162 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Street name (optional)' ) ); ?>" |
|
160 | + <input class="form-control item-address1" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
161 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.address1'))); ?>'.replace('idx', idx)" |
|
162 | + placeholder="<?= $enc->attr($this->translate('admin', 'Street name (optional)')); ?>" |
|
163 | 163 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
164 | 164 | v-model="items[idx]['supplier.address.address1']" /> |
165 | 165 | </div> |
166 | 166 | <div class="col-sm-12 form-text text-muted help-text"> |
167 | - <?= $enc->html( $this->translate( 'admin', 'First name of the person if used in cultures where they are used' ) ); ?> |
|
167 | + <?= $enc->html($this->translate('admin', 'First name of the person if used in cultures where they are used')); ?> |
|
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', 'House number' ) ); ?></label> |
|
171 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'House number')); ?></label> |
|
172 | 172 | <div class="col-sm-8"> |
173 | - <input class="form-control item-address2" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
174 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.address2' ) ) ); ?>'.replace('idx', idx)" |
|
175 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'House number (optional)' ) ); ?>" |
|
173 | + <input class="form-control item-address2" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
174 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.address2'))); ?>'.replace('idx', idx)" |
|
175 | + placeholder="<?= $enc->attr($this->translate('admin', 'House number (optional)')); ?>" |
|
176 | 176 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
177 | 177 | v-model="items[idx]['supplier.address.address2']" /> |
178 | 178 | </div> |
179 | 179 | <div class="col-sm-12 form-text text-muted help-text"> |
180 | - <?= $enc->html( $this->translate( 'admin', 'Address identifier of the supplier\'s house for delivery' ) ); ?> |
|
180 | + <?= $enc->html($this->translate('admin', 'Address identifier of the supplier\'s house for delivery')); ?> |
|
181 | 181 | </div> |
182 | 182 | </div> |
183 | 183 | <div class="form-group row optional"> |
184 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Floor / Appartment' ) ); ?></label> |
|
184 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Floor / Appartment')); ?></label> |
|
185 | 185 | <div class="col-sm-8"> |
186 | - <input class="form-control item-address3" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
187 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.address3' ) ) ); ?>'.replace('idx', idx)" |
|
188 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Floor and/or apartment (optional)' ) ); ?>" |
|
186 | + <input class="form-control item-address3" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
187 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.address3'))); ?>'.replace('idx', idx)" |
|
188 | + placeholder="<?= $enc->attr($this->translate('admin', 'Floor and/or apartment (optional)')); ?>" |
|
189 | 189 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
190 | 190 | v-model="items[idx]['supplier.address.address3']" /> |
191 | 191 | </div> |
192 | 192 | <div class="col-sm-12 form-text text-muted help-text"> |
193 | - <?= $enc->html( $this->translate( 'admin', 'Additional information where the supplier\'s apartment can be found' ) ); ?> |
|
193 | + <?= $enc->html($this->translate('admin', 'Additional information where the supplier\'s apartment can be found')); ?> |
|
194 | 194 | </div> |
195 | 195 | </div> |
196 | 196 | <div class="form-group row optional"> |
197 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Zip code' ) ); ?></label> |
|
197 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Zip code')); ?></label> |
|
198 | 198 | <div class="col-sm-8"> |
199 | - <input class="form-control item-postal" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
200 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.postal' ) ) ); ?>'.replace('idx', idx)" |
|
201 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Zip code (optional)' ) ); ?>" |
|
199 | + <input class="form-control item-postal" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
200 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.postal'))); ?>'.replace('idx', idx)" |
|
201 | + placeholder="<?= $enc->attr($this->translate('admin', 'Zip code (optional)')); ?>" |
|
202 | 202 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
203 | 203 | v-model="items[idx]['supplier.address.postal']" /> |
204 | 204 | </div> |
205 | 205 | <div class="col-sm-12 form-text text-muted help-text"> |
206 | - <?= $enc->html( $this->translate( 'admin', 'Postal code for delivery if used in the area the supplier is living' ) ); ?> |
|
206 | + <?= $enc->html($this->translate('admin', 'Postal code for delivery if used in the area the supplier is living')); ?> |
|
207 | 207 | </div> |
208 | 208 | </div> |
209 | 209 | <div class="form-group row mandatory"> |
210 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'City' ) ); ?></label> |
|
210 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'City')); ?></label> |
|
211 | 211 | <div class="col-sm-8"> |
212 | - <input class="form-control item-city" type="text" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
213 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.city' ) ) ); ?>'.replace('idx', idx)" |
|
214 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'City or town name (required)' ) ); ?>" |
|
212 | + <input class="form-control item-city" type="text" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
213 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.city'))); ?>'.replace('idx', idx)" |
|
214 | + placeholder="<?= $enc->attr($this->translate('admin', 'City or town name (required)')); ?>" |
|
215 | 215 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
216 | 216 | v-model="items[idx]['supplier.address.city']" /> |
217 | 217 | </div> |
218 | 218 | </div> |
219 | 219 | <div class="form-group row mandatory"> |
220 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Country' ) ); ?></label> |
|
220 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Country')); ?></label> |
|
221 | 221 | <div class="col-sm-8"> |
222 | 222 | <select is="combo-box" class="form-control c-select item-countryid" required="required" |
223 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.countryid' ) ) ); ?>'.replace('idx', idx)" |
|
223 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.countryid'))); ?>'.replace('idx', idx)" |
|
224 | 224 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
225 | - v-bind:tabindex="'<?= $this->get( 'tabindex' ); ?>'" |
|
225 | + v-bind:tabindex="'<?= $this->get('tabindex'); ?>'" |
|
226 | 226 | v-bind:getfcn="getCountries" |
227 | 227 | v-model="items[idx]['supplier.address.countryid']" > |
228 | 228 | <option value=""></option> |
229 | 229 | </select> |
230 | 230 | </div> |
231 | 231 | <div class="col-sm-12 form-text text-muted help-text"> |
232 | - <?= $enc->html( $this->translate( 'admin', 'Two letter ISO country code' ) ); ?> |
|
232 | + <?= $enc->html($this->translate('admin', 'Two letter ISO country code')); ?> |
|
233 | 233 | </div> |
234 | 234 | </div> |
235 | 235 | <div class="form-group row optional"> |
236 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'State' ) ); ?></label> |
|
236 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'State')); ?></label> |
|
237 | 237 | <div class="col-sm-8"> |
238 | - <input class="form-control item-state" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
239 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.state' ) ) ); ?>'.replace('idx', idx)" |
|
240 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Country state code (optional)' ) ); ?>" |
|
238 | + <input class="form-control item-state" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
239 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.state'))); ?>'.replace('idx', idx)" |
|
240 | + placeholder="<?= $enc->attr($this->translate('admin', 'Country state code (optional)')); ?>" |
|
241 | 241 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
242 | 242 | v-model="items[idx]['supplier.address.state']" /> |
243 | 243 | </div> |
244 | 244 | <div class="col-sm-12 form-text text-muted help-text"> |
245 | - <?= $enc->html( $this->translate( 'admin', 'Short state code (e.g. NY) if used in the country the supplier is living' ) ); ?> |
|
245 | + <?= $enc->html($this->translate('admin', 'Short state code (e.g. NY) if used in the country the supplier is living')); ?> |
|
246 | 246 | </div> |
247 | 247 | </div> |
248 | 248 | </div><!-- |
249 | 249 | |
250 | 250 | --><div class="col-xl-6 content-block"> |
251 | - <h2 class="col-sm-12 item-header"><?= $enc->html( $this->translate( 'admin', 'Communication' ) ); ?></h2> |
|
251 | + <h2 class="col-sm-12 item-header"><?= $enc->html($this->translate('admin', 'Communication')); ?></h2> |
|
252 | 252 | <div class="form-group row optional"> |
253 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Telephone' ) ); ?></label> |
|
253 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Telephone')); ?></label> |
|
254 | 254 | <div class="col-sm-8"> |
255 | - <input class="form-control item-telephone" type="tel" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
256 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.telephone' ) ) ); ?>'.replace('idx', idx)" |
|
257 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Telephone number (optional)' ) ); ?>" |
|
255 | + <input class="form-control item-telephone" type="tel" tabindex="<?= $this->get('tabindex'); ?>" |
|
256 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.telephone'))); ?>'.replace('idx', idx)" |
|
257 | + placeholder="<?= $enc->attr($this->translate('admin', 'Telephone number (optional)')); ?>" |
|
258 | 258 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
259 | 259 | v-model="items[idx]['supplier.address.telephone']" /> |
260 | 260 | </div> |
261 | 261 | <div class="col-sm-12 form-text text-muted help-text"> |
262 | - <?= $enc->html( $this->translate( 'admin', '(International) telephone number without separation characters, can start with a "+"' ) ); ?> |
|
262 | + <?= $enc->html($this->translate('admin', '(International) telephone number without separation characters, can start with a "+"')); ?> |
|
263 | 263 | </div> |
264 | 264 | </div> |
265 | 265 | <div class="form-group row optional"> |
266 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Facsimile' ) ); ?></label> |
|
266 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Facsimile')); ?></label> |
|
267 | 267 | <div class="col-sm-8"> |
268 | - <input class="form-control item-telefax" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
269 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.telefax' ) ) ); ?>'.replace('idx', idx)" |
|
270 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Facsimile number (optional)' ) ); ?>" |
|
268 | + <input class="form-control item-telefax" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
269 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.telefax'))); ?>'.replace('idx', idx)" |
|
270 | + placeholder="<?= $enc->attr($this->translate('admin', 'Facsimile number (optional)')); ?>" |
|
271 | 271 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
272 | 272 | v-model="items[idx]['supplier.address.telefax']" /> |
273 | 273 | </div> |
274 | 274 | <div class="col-sm-12 form-text text-muted help-text"> |
275 | - <?= $enc->html( $this->translate( 'admin', '(International) facsimilie number without separation characters, can start with a "+"' ) ); ?> |
|
275 | + <?= $enc->html($this->translate('admin', '(International) facsimilie number without separation characters, can start with a "+"')); ?> |
|
276 | 276 | </div> |
277 | 277 | </div> |
278 | 278 | <div class="form-group row optional"> |
279 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'E-mail' ) ); ?></label> |
|
279 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'E-mail')); ?></label> |
|
280 | 280 | <div class="col-sm-8"> |
281 | - <input class="form-control item-email" type="email" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
282 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.email' ) ) ); ?>'.replace('idx', idx)" |
|
283 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'E-mail address (optional)' ) ); ?>" |
|
281 | + <input class="form-control item-email" type="email" tabindex="<?= $this->get('tabindex'); ?>" |
|
282 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.email'))); ?>'.replace('idx', idx)" |
|
283 | + placeholder="<?= $enc->attr($this->translate('admin', 'E-mail address (optional)')); ?>" |
|
284 | 284 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
285 | 285 | v-model="items[idx]['supplier.address.email']" /> |
286 | 286 | </div> |
287 | 287 | <div class="col-sm-12 form-text text-muted help-text"> |
288 | - <?= $enc->html( $this->translate( 'admin', 'E-mail address that belongs to the address' ) ); ?> |
|
288 | + <?= $enc->html($this->translate('admin', 'E-mail address that belongs to the address')); ?> |
|
289 | 289 | </div> |
290 | 290 | </div> |
291 | 291 | <div class="form-group row optional"> |
292 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'Web site' ) ); ?></label> |
|
292 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'Web site')); ?></label> |
|
293 | 293 | <div class="col-sm-8"> |
294 | - <input class="form-control item-website" type="url" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
295 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.website' ) ) ); ?>'.replace('idx', idx)" |
|
296 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Web site URL (optional)' ) ); ?>" |
|
294 | + <input class="form-control item-website" type="url" tabindex="<?= $this->get('tabindex'); ?>" |
|
295 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.website'))); ?>'.replace('idx', idx)" |
|
296 | + placeholder="<?= $enc->attr($this->translate('admin', 'Web site URL (optional)')); ?>" |
|
297 | 297 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
298 | 298 | v-model="items[idx]['supplier.address.website']" /> |
299 | 299 | </div> |
300 | 300 | <div class="col-sm-12 form-text text-muted help-text"> |
301 | - <?= $enc->html( $this->translate( 'admin', 'URL of the supplier web site' ) ); ?> |
|
301 | + <?= $enc->html($this->translate('admin', 'URL of the supplier web site')); ?> |
|
302 | 302 | </div> |
303 | 303 | </div> |
304 | 304 | </div><!-- |
305 | 305 | |
306 | 306 | --><div class="col-xl-6 content-block"> |
307 | - <h2 class="col-sm-12 item-header"><?= $enc->html( $this->translate( 'admin', 'Company details' ) ); ?></h2> |
|
307 | + <h2 class="col-sm-12 item-header"><?= $enc->html($this->translate('admin', 'Company details')); ?></h2> |
|
308 | 308 | <div class="form-group row optional"> |
309 | - <label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Company' ) ); ?></label> |
|
309 | + <label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Company')); ?></label> |
|
310 | 310 | <div class="col-sm-8"> |
311 | - <input class="form-control item-company" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
312 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.company' ) ) ); ?>'.replace('idx', idx)" |
|
313 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Company name (optional)' ) ); ?>" |
|
311 | + <input class="form-control item-company" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
312 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.company'))); ?>'.replace('idx', idx)" |
|
313 | + placeholder="<?= $enc->attr($this->translate('admin', 'Company name (optional)')); ?>" |
|
314 | 314 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
315 | 315 | v-model="items[idx]['supplier.address.company']" /> |
316 | 316 | </div> |
317 | 317 | </div> |
318 | 318 | <div class="form-group row optional"> |
319 | - <label class="col-sm-4 form-control-label help"><?= $enc->html( $this->translate( 'admin', 'VAT ID' ) ); ?></label> |
|
319 | + <label class="col-sm-4 form-control-label help"><?= $enc->html($this->translate('admin', 'VAT ID')); ?></label> |
|
320 | 320 | <div class="col-sm-8"> |
321 | - <input class="form-control item-vatid" type="text" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
322 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.vatid' ) ) ); ?>'.replace('idx', idx)" |
|
323 | - placeholder="<?= $enc->attr( $this->translate( 'admin', 'Value added tax identifier (optional)' ) ); ?>" |
|
321 | + <input class="form-control item-vatid" type="text" tabindex="<?= $this->get('tabindex'); ?>" |
|
322 | + v-bind:name="'<?= $enc->attr($this->formparam(array('address', 'idx', 'supplier.address.vatid'))); ?>'.replace('idx', idx)" |
|
323 | + placeholder="<?= $enc->attr($this->translate('admin', 'Value added tax identifier (optional)')); ?>" |
|
324 | 324 | v-bind:readonly="checkSite('supplier.address.siteid', idx)" |
325 | 325 | v-model="items[idx]['supplier.address.vatid']" /> |
326 | 326 | </div> |
327 | 327 | <div class="col-sm-12 form-text text-muted help-text"> |
328 | - <?= $enc->html( $this->translate( 'admin', 'Official VAT ID to determine if the tax needs to be billed in invoices' ) ); ?> |
|
328 | + <?= $enc->html($this->translate('admin', 'Official VAT ID to determine if the tax needs to be billed in invoices')); ?> |
|
329 | 329 | </div> |
330 | 330 | </div> |
331 | 331 | </div> |
332 | 332 | |
333 | - <?= $this->get( 'addressBody' ); ?> |
|
333 | + <?= $this->get('addressBody'); ?> |
|
334 | 334 | |
335 | 335 | </div> |
336 | 336 | </div> |
337 | 337 | |
338 | 338 | <div class="card-tools-more"> |
339 | - <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
340 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
339 | + <div class="btn btn-primary btn-card-more act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
340 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
341 | 341 | v-on:click="addItem('supplier.address.')" > |
342 | 342 | </div> |
343 | 343 | </div> |
@@ -81,9 +81,12 @@ |
||
81 | 81 | </select> |
82 | 82 | </div> |
83 | 83 | </div> |
84 | - <?php else : ?> |
|
84 | + <?php else { |
|
85 | + : ?> |
|
85 | 86 | <input class="item-languageid" type="hidden" |
86 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.languageid' ) ) ); ?>'.replace('idx', idx)" |
|
87 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'address', 'idx', 'supplier.address.languageid' ) ) ); |
|
88 | +} |
|
89 | +?>'.replace('idx', idx)" |
|
87 | 90 | value="<?= $enc->attr( key( $languages ) ); ?>" /> |
88 | 91 | <?php endif; ?> |
89 | 92 | <div class="form-group row optional"> |
@@ -135,14 +135,12 @@ |
||
135 | 135 | } |
136 | 136 | |
137 | 137 | return; |
138 | - } |
|
139 | - catch( \Aimeos\MShop\Exception $e ) |
|
138 | + } catch( \Aimeos\MShop\Exception $e ) |
|
140 | 139 | { |
141 | 140 | $error = array( 'product-item-selection' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
142 | 141 | $view->errors = $view->get( 'errors', [] ) + $error; |
143 | 142 | $this->logException( $e ); |
144 | - } |
|
145 | - catch( \Exception $e ) |
|
143 | + } catch( \Exception $e ) |
|
146 | 144 | { |
147 | 145 | $error = array( 'product-item-selection' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
148 | 146 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Product\Selection; |
12 | 12 | |
13 | -sprintf( 'selection' ); // for translation |
|
13 | +sprintf('selection'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | { |
45 | 45 | $view = $this->getView(); |
46 | 46 | |
47 | - $view->selectionData = $this->toArray( $view->item, true ); |
|
47 | + $view->selectionData = $this->toArray($view->item, true); |
|
48 | 48 | $view->selectionBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->selectionBody .= $client->copy(); |
52 | 52 | } |
53 | 53 | |
54 | - return $this->render( $view ); |
|
54 | + return $this->render($view); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | { |
65 | 65 | $view = $this->getView(); |
66 | 66 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
67 | - $data = $view->param( 'selection', [] ); |
|
67 | + $data = $view->param('selection', []); |
|
68 | 68 | |
69 | - foreach( $data as $idx => $entry ) |
|
69 | + foreach ($data as $idx => $entry) |
|
70 | 70 | { |
71 | 71 | $data[$idx]['product.lists.siteid'] = $siteid; |
72 | 72 | $data[$idx]['product.siteid'] = $siteid; |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | $view->selectionData = $data; |
76 | 76 | $view->selectionBody = ''; |
77 | 77 | |
78 | - foreach( $this->getSubClients() as $client ) { |
|
78 | + foreach ($this->getSubClients() as $client) { |
|
79 | 79 | $view->selectionBody .= $client->create(); |
80 | 80 | } |
81 | 81 | |
82 | - return $this->render( $view ); |
|
82 | + return $this->render($view); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | parent::delete(); |
92 | 92 | |
93 | 93 | $item = $this->getView()->item; |
94 | - $item->deleteListItems( $item->getListItems( 'product', 'default', null, false ) ); |
|
94 | + $item->deleteListItems($item->getListItems('product', 'default', null, false)); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | |
@@ -104,14 +104,14 @@ discard block |
||
104 | 104 | { |
105 | 105 | $view = $this->getView(); |
106 | 106 | |
107 | - $view->selectionData = $this->toArray( $view->item ); |
|
107 | + $view->selectionData = $this->toArray($view->item); |
|
108 | 108 | $view->selectionBody = ''; |
109 | 109 | |
110 | - foreach( $this->getSubClients() as $client ) { |
|
110 | + foreach ($this->getSubClients() as $client) { |
|
111 | 111 | $view->selectionBody .= $client->get(); |
112 | 112 | } |
113 | 113 | |
114 | - return $this->render( $view ); |
|
114 | + return $this->render($view); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | |
@@ -124,29 +124,29 @@ discard block |
||
124 | 124 | |
125 | 125 | try |
126 | 126 | { |
127 | - if( $view->item->getType() === 'select' ) |
|
127 | + if ($view->item->getType() === 'select') |
|
128 | 128 | { |
129 | - $this->fromArray( $view->item, $view->param( 'selection', [] ) ); |
|
129 | + $this->fromArray($view->item, $view->param('selection', [])); |
|
130 | 130 | $view->selectionBody = ''; |
131 | 131 | |
132 | - foreach( $this->getSubClients() as $client ) { |
|
132 | + foreach ($this->getSubClients() as $client) { |
|
133 | 133 | $view->selectionBody .= $client->save(); |
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
137 | 137 | return; |
138 | 138 | } |
139 | - catch( \Aimeos\MShop\Exception $e ) |
|
139 | + catch (\Aimeos\MShop\Exception $e) |
|
140 | 140 | { |
141 | - $error = array( 'product-item-selection' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
142 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
143 | - $this->logException( $e ); |
|
141 | + $error = array('product-item-selection' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage())); |
|
142 | + $view->errors = $view->get('errors', []) + $error; |
|
143 | + $this->logException($e); |
|
144 | 144 | } |
145 | - catch( \Exception $e ) |
|
145 | + catch (\Exception $e) |
|
146 | 146 | { |
147 | - $error = array( 'product-item-selection' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
148 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
149 | - $this->logException( $e ); |
|
147 | + $error = array('product-item-selection' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
148 | + $view->errors = $view->get('errors', []) + $error; |
|
149 | + $this->logException($e); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | throw new \Aimeos\Admin\JQAdm\Exception(); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * @param string|null $name Name of the sub-client (Default if null) |
161 | 161 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
162 | 162 | */ |
163 | - public function getSubClient( $type, $name = null ) |
|
163 | + public function getSubClient($type, $name = null) |
|
164 | 164 | { |
165 | 165 | /** admin/jqadm/product/selection/decorators/excludes |
166 | 166 | * Excludes decorators added by the "common" option from the product JQAdm client |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | * @see admin/jqadm/product/selection/decorators/excludes |
236 | 236 | * @see admin/jqadm/product/selection/decorators/global |
237 | 237 | */ |
238 | - return $this->createSubClient( 'product/selection/' . $type, $name ); |
|
238 | + return $this->createSubClient('product/selection/' . $type, $name); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | * @since 2016.01 |
280 | 280 | * @category Developer |
281 | 281 | */ |
282 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/product/selection/standard/subparts', [] ); |
|
282 | + return $this->getContext()->getConfig()->get('admin/jqadm/product/selection/standard/subparts', []); |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | |
@@ -289,43 +289,43 @@ discard block |
||
289 | 289 | * @param \Aimeos\MShop\Product\Item\Iface $item Product item object without referenced domain items |
290 | 290 | * @param array $data Data array |
291 | 291 | */ |
292 | - protected function fromArray( \Aimeos\MShop\Product\Item\Iface $item, array $data ) |
|
292 | + protected function fromArray(\Aimeos\MShop\Product\Item\Iface $item, array $data) |
|
293 | 293 | { |
294 | 294 | $context = $this->getContext(); |
295 | - $manager = \Aimeos\MShop::create( $context, 'product' ); |
|
296 | - $listManager = \Aimeos\MShop::create( $context, 'product/lists' ); |
|
295 | + $manager = \Aimeos\MShop::create($context, 'product'); |
|
296 | + $listManager = \Aimeos\MShop::create($context, 'product/lists'); |
|
297 | 297 | |
298 | - $prodItem = $manager->createItem()->setType( 'default' ); |
|
299 | - $listItem = $listManager->createItem()->setType( 'default' ); |
|
300 | - $articles = $item->getRefItems( 'product', null, 'default', false ); |
|
301 | - $listItems = $item->getListItems( 'product', 'default', null, false ); |
|
298 | + $prodItem = $manager->createItem()->setType('default'); |
|
299 | + $listItem = $listManager->createItem()->setType('default'); |
|
300 | + $articles = $item->getRefItems('product', null, 'default', false); |
|
301 | + $listItems = $item->getListItems('product', 'default', null, false); |
|
302 | 302 | |
303 | - foreach( $data as $idx => $entry ) |
|
303 | + foreach ($data as $idx => $entry) |
|
304 | 304 | { |
305 | - if( ( $litem = $item->getListItem( 'product', 'default', $entry['product.id'], false ) ) === null ) { |
|
305 | + if (($litem = $item->getListItem('product', 'default', $entry['product.id'], false)) === null) { |
|
306 | 306 | $litem = clone $listItem; |
307 | 307 | } |
308 | 308 | |
309 | - if( isset( $articles[$litem->getRefId()] ) ) { |
|
309 | + if (isset($articles[$litem->getRefId()])) { |
|
310 | 310 | $refItem = $articles[$litem->getRefId()]; |
311 | 311 | } else { |
312 | 312 | $refItem = clone $prodItem; |
313 | 313 | } |
314 | 314 | |
315 | - $litem->fromArray( $entry ); |
|
316 | - $litem->setPosition( $idx ); |
|
315 | + $litem->fromArray($entry); |
|
316 | + $litem->setPosition($idx); |
|
317 | 317 | |
318 | - $refItem->fromArray( $entry ); |
|
318 | + $refItem->fromArray($entry); |
|
319 | 319 | |
320 | - if( isset( $entry['attr'] ) ) { |
|
321 | - $refItem = $this->fromArrayAttributes( $refItem, $entry['attr'] ); |
|
320 | + if (isset($entry['attr'])) { |
|
321 | + $refItem = $this->fromArrayAttributes($refItem, $entry['attr']); |
|
322 | 322 | } |
323 | 323 | |
324 | - $item->addListItem( 'product', $litem, $refItem ); |
|
325 | - unset( $listItems[$litem->getId()] ); |
|
324 | + $item->addListItem('product', $litem, $refItem); |
|
325 | + unset($listItems[$litem->getId()]); |
|
326 | 326 | } |
327 | 327 | |
328 | - return $item->deleteListItems( $listItems ); |
|
328 | + return $item->deleteListItems($listItems); |
|
329 | 329 | } |
330 | 330 | |
331 | 331 | |
@@ -336,31 +336,31 @@ discard block |
||
336 | 336 | * @param array $entry Associative list of key/values for product attribute references |
337 | 337 | * @return \Aimeos\MShop\Product\Item\Iface Updated artice item object |
338 | 338 | */ |
339 | - protected function fromArrayAttributes( \Aimeos\MShop\Product\Item\Iface $refItem, array $entry ) |
|
339 | + protected function fromArrayAttributes(\Aimeos\MShop\Product\Item\Iface $refItem, array $entry) |
|
340 | 340 | { |
341 | - $listManager = \Aimeos\MShop::create( $this->getContext(), 'product/lists' ); |
|
341 | + $listManager = \Aimeos\MShop::create($this->getContext(), 'product/lists'); |
|
342 | 342 | |
343 | - $listItem = $listManager->createItem()->setType( 'variant' ); |
|
344 | - $litems = $refItem->getListItems( 'attribute', 'variant', null, false ); |
|
343 | + $listItem = $listManager->createItem()->setType('variant'); |
|
344 | + $litems = $refItem->getListItems('attribute', 'variant', null, false); |
|
345 | 345 | |
346 | - foreach( $entry as $pos => $attr ) |
|
346 | + foreach ($entry as $pos => $attr) |
|
347 | 347 | { |
348 | - if( !isset( $attr['product.lists.refid'] ) || $attr['product.lists.refid'] == '' ) { |
|
348 | + if (!isset($attr['product.lists.refid']) || $attr['product.lists.refid'] == '') { |
|
349 | 349 | continue; |
350 | 350 | } |
351 | 351 | |
352 | - if( ( $litem = $refItem->getListItem( 'attribute', 'variant', $attr['product.lists.refid'], false ) ) === null ) { |
|
352 | + if (($litem = $refItem->getListItem('attribute', 'variant', $attr['product.lists.refid'], false)) === null) { |
|
353 | 353 | $litem = clone $listItem; |
354 | 354 | } |
355 | 355 | |
356 | - $litem->fromArray( $attr ); |
|
357 | - $litem->setPosition( $pos ); |
|
356 | + $litem->fromArray($attr); |
|
357 | + $litem->setPosition($pos); |
|
358 | 358 | |
359 | - $refItem->addListItem( 'attribute', $litem, $litem->getRefItem() ); |
|
360 | - unset( $litems[$litem->getId()] ); |
|
359 | + $refItem->addListItem('attribute', $litem, $litem->getRefItem()); |
|
360 | + unset($litems[$litem->getId()]); |
|
361 | 361 | } |
362 | 362 | |
363 | - return $refItem->deleteListItems( $litems ); |
|
363 | + return $refItem->deleteListItems($litems); |
|
364 | 364 | } |
365 | 365 | |
366 | 366 | |
@@ -371,27 +371,27 @@ discard block |
||
371 | 371 | * @param boolean $copy True if items should be copied |
372 | 372 | * @return string[] Multi-dimensional associative list of item data |
373 | 373 | */ |
374 | - protected function toArray( \Aimeos\MShop\Product\Item\Iface $item, $copy = false ) |
|
374 | + protected function toArray(\Aimeos\MShop\Product\Item\Iface $item, $copy = false) |
|
375 | 375 | { |
376 | - if( $item->getType() !== 'select' ) { |
|
376 | + if ($item->getType() !== 'select') { |
|
377 | 377 | return []; |
378 | 378 | } |
379 | 379 | |
380 | 380 | $data = []; |
381 | 381 | $context = $this->getContext(); |
382 | 382 | $siteId = $context->getLocale()->getSiteId(); |
383 | - $articles = $item->getRefItems( 'product', null, 'default', false ); |
|
383 | + $articles = $item->getRefItems('product', null, 'default', false); |
|
384 | 384 | |
385 | 385 | |
386 | - foreach( $item->getListItems( 'product', 'default', null, false ) as $id => $listItem ) |
|
386 | + foreach ($item->getListItems('product', 'default', null, false) as $id => $listItem) |
|
387 | 387 | { |
388 | - if( ( $refItem = $listItem->getRefItem() ) === null ) { |
|
388 | + if (($refItem = $listItem->getRefItem()) === null) { |
|
389 | 389 | continue; |
390 | 390 | } |
391 | 391 | |
392 | - $list = $listItem->toArray( true ) + $refItem->toArray( true ); |
|
392 | + $list = $listItem->toArray(true) + $refItem->toArray(true); |
|
393 | 393 | |
394 | - if( $copy === true ) |
|
394 | + if ($copy === true) |
|
395 | 395 | { |
396 | 396 | $list['product.lists.siteid'] = $siteId; |
397 | 397 | $list['product.lists.id'] = ''; |
@@ -399,14 +399,14 @@ discard block |
||
399 | 399 | $list['product.id'] = null; |
400 | 400 | } |
401 | 401 | |
402 | - if( isset( $articles[$refItem->getId()] ) ) |
|
402 | + if (isset($articles[$refItem->getId()])) |
|
403 | 403 | { |
404 | 404 | $idx = 0; |
405 | 405 | |
406 | - foreach( $articles[$refItem->getId()]->getListItems( 'attribute', 'variant', null, false ) as $litem ) |
|
406 | + foreach ($articles[$refItem->getId()]->getListItems('attribute', 'variant', null, false) as $litem) |
|
407 | 407 | { |
408 | - if( ( $attrItem = $litem->getRefItem() ) !== null ) { |
|
409 | - $list['attr'][$idx++] = $litem->toArray( true ) + $attrItem->toArray( true ); |
|
408 | + if (($attrItem = $litem->getRefItem()) !== null) { |
|
409 | + $list['attr'][$idx++] = $litem->toArray(true) + $attrItem->toArray(true); |
|
410 | 410 | } |
411 | 411 | } |
412 | 412 | } |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | * @param \Aimeos\MW\View\Iface $view View object with data assigned |
425 | 425 | * @return string HTML output |
426 | 426 | */ |
427 | - protected function render( \Aimeos\MW\View\Iface $view ) |
|
427 | + protected function render(\Aimeos\MW\View\Iface $view) |
|
428 | 428 | { |
429 | 429 | /** admin/jqadm/product/selection/template-item |
430 | 430 | * Relative path to the HTML body template of the selection subpart for products. |
@@ -448,6 +448,6 @@ discard block |
||
448 | 448 | $tplconf = 'admin/jqadm/product/selection/template-item'; |
449 | 449 | $default = 'product/item-selection-standard'; |
450 | 450 | |
451 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
451 | + return $view->render($view->config($tplconf, $default)); |
|
452 | 452 | } |
453 | 453 | } |
454 | 454 | \ No newline at end of file |
@@ -121,14 +121,12 @@ |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | return; |
124 | - } |
|
125 | - catch( \Aimeos\MShop\Exception $e ) |
|
124 | + } catch( \Aimeos\MShop\Exception $e ) |
|
126 | 125 | { |
127 | 126 | $error = array( 'product-item-bundle' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
128 | 127 | $view->errors = $view->get( 'errors', [] ) + $error; |
129 | 128 | $this->logException( $e ); |
130 | - } |
|
131 | - catch( \Exception $e ) |
|
129 | + } catch( \Exception $e ) |
|
132 | 130 | { |
133 | 131 | $error = array( 'product-item-bundle' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
134 | 132 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Product\Bundle; |
12 | 12 | |
13 | -sprintf( 'bundle' ); // for translation |
|
13 | +sprintf('bundle'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | { |
45 | 45 | $view = $this->getView(); |
46 | 46 | |
47 | - $view->bundleData = $this->toArray( $view->item, true ); |
|
47 | + $view->bundleData = $this->toArray($view->item, true); |
|
48 | 48 | $view->bundleBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->bundleBody .= $client->copy(); |
52 | 52 | } |
53 | 53 | |
54 | - return $this->render( $view ); |
|
54 | + return $this->render($view); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -63,21 +63,21 @@ discard block |
||
63 | 63 | public function create() |
64 | 64 | { |
65 | 65 | $view = $this->getView(); |
66 | - $data = $view->param( 'bundle', [] ); |
|
66 | + $data = $view->param('bundle', []); |
|
67 | 67 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
68 | 68 | |
69 | - foreach( $view->value( $data, 'product.lists.id', [] ) as $idx => $value ) { |
|
69 | + foreach ($view->value($data, 'product.lists.id', []) as $idx => $value) { |
|
70 | 70 | $data['product.lists.siteid'][$idx] = $siteid; |
71 | 71 | } |
72 | 72 | |
73 | 73 | $view->bundleData = $data; |
74 | 74 | $view->bundleBody = ''; |
75 | 75 | |
76 | - foreach( $this->getSubClients() as $client ) { |
|
76 | + foreach ($this->getSubClients() as $client) { |
|
77 | 77 | $view->bundleBody .= $client->create(); |
78 | 78 | } |
79 | 79 | |
80 | - return $this->render( $view ); |
|
80 | + return $this->render($view); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | { |
91 | 91 | $view = $this->getView(); |
92 | 92 | |
93 | - $view->bundleData = $this->toArray( $view->item ); |
|
93 | + $view->bundleData = $this->toArray($view->item); |
|
94 | 94 | $view->bundleBody = ''; |
95 | 95 | |
96 | - foreach( $this->getSubClients() as $client ) { |
|
96 | + foreach ($this->getSubClients() as $client) { |
|
97 | 97 | $view->bundleBody .= $client->get(); |
98 | 98 | } |
99 | 99 | |
100 | - return $this->render( $view ); |
|
100 | + return $this->render($view); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | |
@@ -110,29 +110,29 @@ discard block |
||
110 | 110 | |
111 | 111 | try |
112 | 112 | { |
113 | - if( $view->item->getType() === 'bundle' ) |
|
113 | + if ($view->item->getType() === 'bundle') |
|
114 | 114 | { |
115 | - $this->fromArray( $view->item, $view->param( 'bundle', [] ) ); |
|
115 | + $this->fromArray($view->item, $view->param('bundle', [])); |
|
116 | 116 | $view->bundleBody = ''; |
117 | 117 | |
118 | - foreach( $this->getSubClients() as $client ) { |
|
118 | + foreach ($this->getSubClients() as $client) { |
|
119 | 119 | $view->bundleBody .= $client->save(); |
120 | 120 | } |
121 | 121 | } |
122 | 122 | |
123 | 123 | return; |
124 | 124 | } |
125 | - catch( \Aimeos\MShop\Exception $e ) |
|
125 | + catch (\Aimeos\MShop\Exception $e) |
|
126 | 126 | { |
127 | - $error = array( 'product-item-bundle' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
128 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
129 | - $this->logException( $e ); |
|
127 | + $error = array('product-item-bundle' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage())); |
|
128 | + $view->errors = $view->get('errors', []) + $error; |
|
129 | + $this->logException($e); |
|
130 | 130 | } |
131 | - catch( \Exception $e ) |
|
131 | + catch (\Exception $e) |
|
132 | 132 | { |
133 | - $error = array( 'product-item-bundle' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
134 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
135 | - $this->logException( $e ); |
|
133 | + $error = array('product-item-bundle' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
134 | + $view->errors = $view->get('errors', []) + $error; |
|
135 | + $this->logException($e); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | throw new \Aimeos\Admin\JQAdm\Exception(); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @param string|null $name Name of the sub-client (Default if null) |
147 | 147 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
148 | 148 | */ |
149 | - public function getSubClient( $type, $name = null ) |
|
149 | + public function getSubClient($type, $name = null) |
|
150 | 150 | { |
151 | 151 | /** admin/jqadm/product/bundle/decorators/excludes |
152 | 152 | * Excludes decorators added by the "common" option from the product JQAdm client |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | * @see admin/jqadm/product/bundle/decorators/excludes |
222 | 222 | * @see admin/jqadm/product/bundle/decorators/global |
223 | 223 | */ |
224 | - return $this->createSubClient( 'product/bundle/' . $type, $name ); |
|
224 | + return $this->createSubClient('product/bundle/' . $type, $name); |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | * @since 2016.01 |
266 | 266 | * @category Developer |
267 | 267 | */ |
268 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/product/bundle/standard/subparts', [] ); |
|
268 | + return $this->getContext()->getConfig()->get('admin/jqadm/product/bundle/standard/subparts', []); |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | |
@@ -275,31 +275,31 @@ discard block |
||
275 | 275 | * @param \Aimeos\MShop\Product\Item\Iface $item Product item object without referenced domain items |
276 | 276 | * @param string[] $data Data array |
277 | 277 | */ |
278 | - protected function fromArray( \Aimeos\MShop\Product\Item\Iface $item, array $data ) |
|
278 | + protected function fromArray(\Aimeos\MShop\Product\Item\Iface $item, array $data) |
|
279 | 279 | { |
280 | - $listManager = \Aimeos\MShop::create( $this->getContext(), 'product/lists' ); |
|
280 | + $listManager = \Aimeos\MShop::create($this->getContext(), 'product/lists'); |
|
281 | 281 | |
282 | - $listItem = $listManager->createItem()->setType( 'default' ); |
|
283 | - $listItems = $item->getListItems( 'product', 'default', null, false ); |
|
282 | + $listItem = $listManager->createItem()->setType('default'); |
|
283 | + $listItems = $item->getListItems('product', 'default', null, false); |
|
284 | 284 | |
285 | - foreach( $this->getValue( $data, 'product.lists.id', [] ) as $idx => $id ) |
|
285 | + foreach ($this->getValue($data, 'product.lists.id', []) as $idx => $id) |
|
286 | 286 | { |
287 | - if( isset( $listItems[$id] ) ) { |
|
287 | + if (isset($listItems[$id])) { |
|
288 | 288 | $litem = $listItems[$id]; |
289 | 289 | } else { |
290 | 290 | $litem = clone $listItem; |
291 | 291 | } |
292 | 292 | |
293 | - $litem->setId( $id ); |
|
294 | - $litem->setPosition( $idx ); |
|
295 | - $litem->setRefId( $this->getValue( $data, 'product.lists.refid/' . $idx ) ); |
|
293 | + $litem->setId($id); |
|
294 | + $litem->setPosition($idx); |
|
295 | + $litem->setRefId($this->getValue($data, 'product.lists.refid/' . $idx)); |
|
296 | 296 | |
297 | - $item->addListItem( 'product', $litem, $litem->getRefItem() ); |
|
297 | + $item->addListItem('product', $litem, $litem->getRefItem()); |
|
298 | 298 | |
299 | - unset( $listItems[$litem->getId()] ); |
|
299 | + unset($listItems[$litem->getId()]); |
|
300 | 300 | } |
301 | 301 | |
302 | - return $item->deleteListItems( $listItems ); |
|
302 | + return $item->deleteListItems($listItems); |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | |
@@ -310,30 +310,30 @@ discard block |
||
310 | 310 | * @param boolean $copy True if items should be copied, false if not |
311 | 311 | * @return string[] Multi-dimensional associative list of item data |
312 | 312 | */ |
313 | - protected function toArray( \Aimeos\MShop\Product\Item\Iface $item, $copy = false ) |
|
313 | + protected function toArray(\Aimeos\MShop\Product\Item\Iface $item, $copy = false) |
|
314 | 314 | { |
315 | - if( $item->getType() !== 'bundle' ) { |
|
315 | + if ($item->getType() !== 'bundle') { |
|
316 | 316 | return []; |
317 | 317 | } |
318 | 318 | |
319 | 319 | $data = []; |
320 | 320 | $siteId = $this->getContext()->getLocale()->getSiteId(); |
321 | 321 | |
322 | - foreach( $item->getListItems( 'product', 'default', null, false ) as $listItem ) |
|
322 | + foreach ($item->getListItems('product', 'default', null, false) as $listItem) |
|
323 | 323 | { |
324 | - if( ( $refItem = $listItem->getRefItem() ) === null ) { |
|
324 | + if (($refItem = $listItem->getRefItem()) === null) { |
|
325 | 325 | continue; |
326 | 326 | } |
327 | 327 | |
328 | - $list = $listItem->toArray( true ) + $refItem->toArray( true ); |
|
328 | + $list = $listItem->toArray(true) + $refItem->toArray(true); |
|
329 | 329 | |
330 | - if( $copy === true ) |
|
330 | + if ($copy === true) |
|
331 | 331 | { |
332 | 332 | $list['product.lists.siteid'] = $siteId; |
333 | 333 | $list['product.lists.id'] = ''; |
334 | 334 | } |
335 | 335 | |
336 | - foreach( $list as $key => $value ) { |
|
336 | + foreach ($list as $key => $value) { |
|
337 | 337 | $data[$key][] = $value; |
338 | 338 | } |
339 | 339 | } |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | * @param \Aimeos\MW\View\Iface $view View object with data assigned |
349 | 349 | * @return string HTML output |
350 | 350 | */ |
351 | - protected function render( \Aimeos\MW\View\Iface $view ) |
|
351 | + protected function render(\Aimeos\MW\View\Iface $view) |
|
352 | 352 | { |
353 | 353 | /** admin/jqadm/product/bundle/template-item |
354 | 354 | * Relative path to the HTML body template of the bundle subpart for products. |
@@ -372,6 +372,6 @@ discard block |
||
372 | 372 | $tplconf = 'admin/jqadm/product/bundle/template-item'; |
373 | 373 | $default = 'product/item-bundle-standard'; |
374 | 374 | |
375 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
375 | + return $view->render($view->config($tplconf, $default)); |
|
376 | 376 | } |
377 | 377 | } |
378 | 378 | \ No newline at end of file |
@@ -118,14 +118,12 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | return; |
121 | - } |
|
122 | - catch( \Aimeos\MShop\Exception $e ) |
|
121 | + } catch( \Aimeos\MShop\Exception $e ) |
|
123 | 122 | { |
124 | 123 | $error = array( 'product-item-physical' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
125 | 124 | $view->errors = $view->get( 'errors', [] ) + $error; |
126 | 125 | $this->logException( $e ); |
127 | - } |
|
128 | - catch( \Exception $e ) |
|
126 | + } catch( \Exception $e ) |
|
129 | 127 | { |
130 | 128 | $error = array( 'product-item-physical' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
131 | 129 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -293,8 +291,7 @@ discard block |
||
293 | 291 | |
294 | 292 | $item->addPropertyItem( $propItem ); |
295 | 293 | |
296 | - } |
|
297 | - else |
|
294 | + } else |
|
298 | 295 | { |
299 | 296 | $item->deletePropertyItems( $propItems ); |
300 | 297 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Product\Physical; |
12 | 12 | |
13 | -sprintf( 'physical' ); // for translation |
|
13 | +sprintf('physical'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | { |
45 | 45 | $view = $this->getView(); |
46 | 46 | |
47 | - $view->physicalData = $this->toArray( $view->item, true ); |
|
47 | + $view->physicalData = $this->toArray($view->item, true); |
|
48 | 48 | $view->physicalBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->physicalBody .= $client->copy(); |
52 | 52 | } |
53 | 53 | |
54 | - return $this->render( $view ); |
|
54 | + return $this->render($view); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | { |
65 | 65 | $view = $this->getView(); |
66 | 66 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
67 | - $data = $view->param( 'physical', [] ); |
|
67 | + $data = $view->param('physical', []); |
|
68 | 68 | |
69 | - foreach( $view->value( $data, 'product.property.id', [] ) as $idx => $value ) { |
|
69 | + foreach ($view->value($data, 'product.property.id', []) as $idx => $value) { |
|
70 | 70 | $data['product.property.siteid'][$idx] = $siteid; |
71 | 71 | } |
72 | 72 | |
73 | 73 | $view->physicalData = $data; |
74 | 74 | $view->physicalBody = ''; |
75 | 75 | |
76 | - foreach( $this->getSubClients() as $client ) { |
|
76 | + foreach ($this->getSubClients() as $client) { |
|
77 | 77 | $view->physicalBody .= $client->create(); |
78 | 78 | } |
79 | 79 | |
80 | - return $this->render( $view ); |
|
80 | + return $this->render($view); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | { |
91 | 91 | $view = $this->getView(); |
92 | 92 | |
93 | - $view->physicalData = $this->toArray( $view->item ); |
|
93 | + $view->physicalData = $this->toArray($view->item); |
|
94 | 94 | $view->physicalBody = ''; |
95 | 95 | |
96 | - foreach( $this->getSubClients() as $client ) { |
|
96 | + foreach ($this->getSubClients() as $client) { |
|
97 | 97 | $view->physicalBody .= $client->get(); |
98 | 98 | } |
99 | 99 | |
100 | - return $this->render( $view ); |
|
100 | + return $this->render($view); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | |
@@ -110,26 +110,26 @@ discard block |
||
110 | 110 | |
111 | 111 | try |
112 | 112 | { |
113 | - $this->fromArray( $view->item, $view->param( 'physical', [] ) ); |
|
113 | + $this->fromArray($view->item, $view->param('physical', [])); |
|
114 | 114 | $view->physicalBody = ''; |
115 | 115 | |
116 | - foreach( $this->getSubClients() as $client ) { |
|
116 | + foreach ($this->getSubClients() as $client) { |
|
117 | 117 | $view->physicalBody .= $client->save(); |
118 | 118 | } |
119 | 119 | |
120 | 120 | return; |
121 | 121 | } |
122 | - catch( \Aimeos\MShop\Exception $e ) |
|
122 | + catch (\Aimeos\MShop\Exception $e) |
|
123 | 123 | { |
124 | - $error = array( 'product-item-physical' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
125 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
126 | - $this->logException( $e ); |
|
124 | + $error = array('product-item-physical' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage())); |
|
125 | + $view->errors = $view->get('errors', []) + $error; |
|
126 | + $this->logException($e); |
|
127 | 127 | } |
128 | - catch( \Exception $e ) |
|
128 | + catch (\Exception $e) |
|
129 | 129 | { |
130 | - $error = array( 'product-item-physical' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
131 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
132 | - $this->logException( $e ); |
|
130 | + $error = array('product-item-physical' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
131 | + $view->errors = $view->get('errors', []) + $error; |
|
132 | + $this->logException($e); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | throw new \Aimeos\Admin\JQAdm\Exception(); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @param string|null $name Name of the sub-client (Default if null) |
144 | 144 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
145 | 145 | */ |
146 | - public function getSubClient( $type, $name = null ) |
|
146 | + public function getSubClient($type, $name = null) |
|
147 | 147 | { |
148 | 148 | /** admin/jqadm/product/physical/decorators/excludes |
149 | 149 | * Excludes decorators added by the "common" option from the product JQAdm client |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * @see admin/jqadm/product/physical/decorators/excludes |
219 | 219 | * @see admin/jqadm/product/physical/decorators/global |
220 | 220 | */ |
221 | - return $this->createSubClient( 'product/physical/' . $type, $name ); |
|
221 | + return $this->createSubClient('product/physical/' . $type, $name); |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | * @since 2016.01 |
263 | 263 | * @category Developer |
264 | 264 | */ |
265 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/product/physical/standard/subparts', [] ); |
|
265 | + return $this->getContext()->getConfig()->get('admin/jqadm/product/physical/standard/subparts', []); |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | |
@@ -272,30 +272,30 @@ discard block |
||
272 | 272 | * @param \Aimeos\MShop\Product\Item\Iface $item Product item object without referenced domain items |
273 | 273 | * @param string[] $data Data array |
274 | 274 | */ |
275 | - protected function fromArray( \Aimeos\MShop\Product\Item\Iface $item, array $data ) |
|
275 | + protected function fromArray(\Aimeos\MShop\Product\Item\Iface $item, array $data) |
|
276 | 276 | { |
277 | - $manager = \Aimeos\MShop::create( $this->getContext(), 'product/property' ); |
|
278 | - $typeManager = \Aimeos\MShop::create( $this->getContext(), 'product/property/type' ); |
|
277 | + $manager = \Aimeos\MShop::create($this->getContext(), 'product/property'); |
|
278 | + $typeManager = \Aimeos\MShop::create($this->getContext(), 'product/property/type'); |
|
279 | 279 | |
280 | - foreach( $data as $type => $value ) |
|
280 | + foreach ($data as $type => $value) |
|
281 | 281 | { |
282 | - $propItems = $item->getPropertyItems( $type, false ); |
|
282 | + $propItems = $item->getPropertyItems($type, false); |
|
283 | 283 | |
284 | - if( ( $value = trim( $value ) ) != '' ) |
|
284 | + if (($value = trim($value)) != '') |
|
285 | 285 | { |
286 | - if( ( $propItem = reset( $propItems ) ) === false ) { |
|
287 | - $propItem = $manager->createItem()->setType( $type ); |
|
286 | + if (($propItem = reset($propItems)) === false) { |
|
287 | + $propItem = $manager->createItem()->setType($type); |
|
288 | 288 | } |
289 | 289 | |
290 | - $propItem->setLanguageId( null ); |
|
291 | - $propItem->setValue( $value ); |
|
290 | + $propItem->setLanguageId(null); |
|
291 | + $propItem->setValue($value); |
|
292 | 292 | |
293 | - $item->addPropertyItem( $propItem ); |
|
293 | + $item->addPropertyItem($propItem); |
|
294 | 294 | |
295 | 295 | } |
296 | 296 | else |
297 | 297 | { |
298 | - $item->deletePropertyItems( $propItems ); |
|
298 | + $item->deletePropertyItems($propItems); |
|
299 | 299 | } |
300 | 300 | } |
301 | 301 | } |
@@ -308,12 +308,12 @@ discard block |
||
308 | 308 | * @param boolean $copy True if items should be copied, false if not |
309 | 309 | * @return string[] Multi-dimensional associative list of item data |
310 | 310 | */ |
311 | - protected function toArray( \Aimeos\MShop\Product\Item\Iface $item, $copy = false ) |
|
311 | + protected function toArray(\Aimeos\MShop\Product\Item\Iface $item, $copy = false) |
|
312 | 312 | { |
313 | 313 | $data = []; |
314 | 314 | $types = ['package-length', 'package-height', 'package-width', 'package-weight']; |
315 | 315 | |
316 | - foreach( $item->getPropertyItems( $types, false ) as $item ) { |
|
316 | + foreach ($item->getPropertyItems($types, false) as $item) { |
|
317 | 317 | $data[$item->getType()] = $item->getValue(); |
318 | 318 | } |
319 | 319 | |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | * @param \Aimeos\MW\View\Iface $view View object with data assigned |
328 | 328 | * @return string HTML output |
329 | 329 | */ |
330 | - protected function render( \Aimeos\MW\View\Iface $view ) |
|
330 | + protected function render(\Aimeos\MW\View\Iface $view) |
|
331 | 331 | { |
332 | 332 | /** admin/jqadm/product/physical/template-item |
333 | 333 | * Relative path to the HTML body template of the physical subpart for products. |
@@ -351,6 +351,6 @@ discard block |
||
351 | 351 | $tplconf = 'admin/jqadm/product/physical/template-item'; |
352 | 352 | $default = 'product/item-physical-standard'; |
353 | 353 | |
354 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
354 | + return $view->render($view->config($tplconf, $default)); |
|
355 | 355 | } |
356 | 356 | } |
@@ -137,14 +137,12 @@ discard block |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | return; |
140 | - } |
|
141 | - catch( \Aimeos\MShop\Exception $e ) |
|
140 | + } catch( \Aimeos\MShop\Exception $e ) |
|
142 | 141 | { |
143 | 142 | $error = array( 'product-item-download' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
144 | 143 | $view->errors = $view->get( 'errors', [] ) + $error; |
145 | 144 | $this->logException( $e ); |
146 | - } |
|
147 | - catch( \Exception $e ) |
|
145 | + } catch( \Exception $e ) |
|
148 | 146 | { |
149 | 147 | $error = array( 'product-item-download' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
150 | 148 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -402,8 +400,7 @@ discard block |
||
402 | 400 | |
403 | 401 | $data['time'] = $fs->time( $data['attribute.code'] ); |
404 | 402 | $data['size'] = $fs->size( $data['attribute.code'] ); |
405 | - } |
|
406 | - catch( \Exception $e ) { ; } // Show product even if file isn't available any more |
|
403 | + } catch( \Exception $e ) { ; } // Show product even if file isn't available any more |
|
407 | 404 | } |
408 | 405 | |
409 | 406 | return $data; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Product\Download; |
12 | 12 | |
13 | -sprintf( 'download' ); // for translation |
|
13 | +sprintf('download'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | { |
45 | 45 | $view = $this->getView(); |
46 | 46 | |
47 | - $view->downloadData = $this->toArray( $view->item, true ); |
|
47 | + $view->downloadData = $this->toArray($view->item, true); |
|
48 | 48 | $view->downloadBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->downloadBody .= $client->copy(); |
52 | 52 | } |
53 | 53 | |
54 | - return $this->render( $view ); |
|
54 | + return $this->render($view); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -64,16 +64,16 @@ discard block |
||
64 | 64 | { |
65 | 65 | $view = $this->getView(); |
66 | 66 | $data['product.lists.siteid'] = $this->getContext()->getLocale()->getSiteId(); |
67 | - $data = array_replace_recursive( $this->toArray( $view->item ), $view->param( 'download', [] ) ); |
|
67 | + $data = array_replace_recursive($this->toArray($view->item), $view->param('download', [])); |
|
68 | 68 | |
69 | 69 | $view->downloadData = $data; |
70 | 70 | $view->downloadBody = ''; |
71 | 71 | |
72 | - foreach( $this->getSubClients() as $client ) { |
|
72 | + foreach ($this->getSubClients() as $client) { |
|
73 | 73 | $view->downloadBody .= $client->create(); |
74 | 74 | } |
75 | 75 | |
76 | - return $this->render( $view ); |
|
76 | + return $this->render($view); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | |
@@ -85,17 +85,17 @@ discard block |
||
85 | 85 | parent::delete(); |
86 | 86 | |
87 | 87 | $item = $this->getView()->item; |
88 | - $fs = $this->getContext()->getFilesystemManager()->get( 'fs-secure' ); |
|
88 | + $fs = $this->getContext()->getFilesystemManager()->get('fs-secure'); |
|
89 | 89 | |
90 | - foreach( $item->getListItems( 'attribute', 'hidden', 'download', false ) as $listItem ) |
|
90 | + foreach ($item->getListItems('attribute', 'hidden', 'download', false) as $listItem) |
|
91 | 91 | { |
92 | 92 | $refItem = $listItem->getRefItem(); |
93 | 93 | |
94 | - if( $refItem !== null && $refItem->getCode() != '' && $fs->has( $refItem->getCode() ) ) { |
|
95 | - $fs->rm( $refItem->getCode() ); |
|
94 | + if ($refItem !== null && $refItem->getCode() != '' && $fs->has($refItem->getCode())) { |
|
95 | + $fs->rm($refItem->getCode()); |
|
96 | 96 | } |
97 | 97 | |
98 | - $item->deleteListItem( 'attribute', $listItem, $refItem ); |
|
98 | + $item->deleteListItem('attribute', $listItem, $refItem); |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
@@ -109,14 +109,14 @@ discard block |
||
109 | 109 | { |
110 | 110 | $view = $this->getView(); |
111 | 111 | |
112 | - $view->downloadData = $this->toArray( $view->item ); |
|
112 | + $view->downloadData = $this->toArray($view->item); |
|
113 | 113 | $view->downloadBody = ''; |
114 | 114 | |
115 | - foreach( $this->getSubClients() as $client ) { |
|
115 | + foreach ($this->getSubClients() as $client) { |
|
116 | 116 | $view->downloadBody .= $client->get(); |
117 | 117 | } |
118 | 118 | |
119 | - return $this->render( $view ); |
|
119 | + return $this->render($view); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | |
@@ -129,26 +129,26 @@ discard block |
||
129 | 129 | |
130 | 130 | try |
131 | 131 | { |
132 | - $this->fromArray( $view->item, $view->param( 'download', [] ) ); |
|
132 | + $this->fromArray($view->item, $view->param('download', [])); |
|
133 | 133 | $view->downloadBody = ''; |
134 | 134 | |
135 | - foreach( $this->getSubClients() as $client ) { |
|
135 | + foreach ($this->getSubClients() as $client) { |
|
136 | 136 | $view->downloadBody .= $client->save(); |
137 | 137 | } |
138 | 138 | |
139 | 139 | return; |
140 | 140 | } |
141 | - catch( \Aimeos\MShop\Exception $e ) |
|
141 | + catch (\Aimeos\MShop\Exception $e) |
|
142 | 142 | { |
143 | - $error = array( 'product-item-download' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
144 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
145 | - $this->logException( $e ); |
|
143 | + $error = array('product-item-download' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage())); |
|
144 | + $view->errors = $view->get('errors', []) + $error; |
|
145 | + $this->logException($e); |
|
146 | 146 | } |
147 | - catch( \Exception $e ) |
|
147 | + catch (\Exception $e) |
|
148 | 148 | { |
149 | - $error = array( 'product-item-download' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
150 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
151 | - $this->logException( $e ); |
|
149 | + $error = array('product-item-download' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
150 | + $view->errors = $view->get('errors', []) + $error; |
|
151 | + $this->logException($e); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | throw new \Aimeos\Admin\JQAdm\Exception(); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * @param string|null $name Name of the sub-client (Default if null) |
163 | 163 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
164 | 164 | */ |
165 | - public function getSubClient( $type, $name = null ) |
|
165 | + public function getSubClient($type, $name = null) |
|
166 | 166 | { |
167 | 167 | /** admin/jqadm/product/download/decorators/excludes |
168 | 168 | * Excludes decorators added by the "common" option from the product JQAdm client |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | * @see admin/jqadm/product/download/decorators/excludes |
238 | 238 | * @see admin/jqadm/product/download/decorators/global |
239 | 239 | */ |
240 | - return $this->createSubClient( 'product/download/' . $type, $name ); |
|
240 | + return $this->createSubClient('product/download/' . $type, $name); |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | * @since 2016.03 |
282 | 282 | * @category Developer |
283 | 283 | */ |
284 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/product/download/standard/subparts', [] ); |
|
284 | + return $this->getContext()->getConfig()->get('admin/jqadm/product/download/standard/subparts', []); |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | |
@@ -292,22 +292,22 @@ discard block |
||
292 | 292 | * @param string $path Path the file should be stored at |
293 | 293 | * @return string Path to the uploaded file |
294 | 294 | */ |
295 | - protected function storeFile( \Psr\Http\Message\UploadedFileInterface $file, $path ) |
|
295 | + protected function storeFile(\Psr\Http\Message\UploadedFileInterface $file, $path) |
|
296 | 296 | { |
297 | - $fs = $this->getContext()->getFilesystemManager()->get( 'fs-secure' ); |
|
297 | + $fs = $this->getContext()->getFilesystemManager()->get('fs-secure'); |
|
298 | 298 | |
299 | - if( $path == null ) |
|
299 | + if ($path == null) |
|
300 | 300 | { |
301 | - $ext = pathinfo( $file->getClientFilename(), PATHINFO_EXTENSION ); |
|
302 | - $hash = md5( $file->getClientFilename() . microtime( true ) ); |
|
303 | - $path = sprintf( '%s/%s/%s.%s', $hash[0], $hash[1], $hash, $ext ); |
|
301 | + $ext = pathinfo($file->getClientFilename(), PATHINFO_EXTENSION); |
|
302 | + $hash = md5($file->getClientFilename() . microtime(true)); |
|
303 | + $path = sprintf('%s/%s/%s.%s', $hash[0], $hash[1], $hash, $ext); |
|
304 | 304 | |
305 | - if( !$fs->isdir( $hash[0] . '/' . $hash[1] ) ) { |
|
306 | - $fs->mkdir( $hash[0] . '/' . $hash[1] ); |
|
305 | + if (!$fs->isdir($hash[0] . '/' . $hash[1])) { |
|
306 | + $fs->mkdir($hash[0] . '/' . $hash[1]); |
|
307 | 307 | } |
308 | 308 | } |
309 | 309 | |
310 | - $fs->writes( $path, $file->getStream()->detach() ); |
|
310 | + $fs->writes($path, $file->getStream()->detach()); |
|
311 | 311 | |
312 | 312 | return $path; |
313 | 313 | } |
@@ -319,55 +319,55 @@ discard block |
||
319 | 319 | * @param \Aimeos\MShop\Product\Item\Iface $item Product item object without referenced domain items |
320 | 320 | * @param string[] $data Data array |
321 | 321 | */ |
322 | - protected function fromArray( \Aimeos\MShop\Product\Item\Iface $item, array $data ) |
|
322 | + protected function fromArray(\Aimeos\MShop\Product\Item\Iface $item, array $data) |
|
323 | 323 | { |
324 | 324 | $context = $this->getContext(); |
325 | - $fs = $context->getFilesystemManager()->get( 'fs-secure' ); |
|
325 | + $fs = $context->getFilesystemManager()->get('fs-secure'); |
|
326 | 326 | |
327 | - $attrManager = \Aimeos\MShop::create( $context, 'attribute' ); |
|
328 | - $typeManager = \Aimeos\MShop::create( $context, 'attribute/type' ); |
|
329 | - $listManager = \Aimeos\MShop::create( $context, 'product/lists' ); |
|
327 | + $attrManager = \Aimeos\MShop::create($context, 'attribute'); |
|
328 | + $typeManager = \Aimeos\MShop::create($context, 'attribute/type'); |
|
329 | + $listManager = \Aimeos\MShop::create($context, 'product/lists'); |
|
330 | 330 | |
331 | - $attrItem = $attrManager->createItem()->setType( 'download' ); |
|
332 | - $listItem = $listManager->createItem()->setType( 'hidden' ); |
|
333 | - $listItems = $item->getListItems( 'attribute', 'hidden', 'download', false ); |
|
331 | + $attrItem = $attrManager->createItem()->setType('download'); |
|
332 | + $listItem = $listManager->createItem()->setType('hidden'); |
|
333 | + $listItems = $item->getListItems('attribute', 'hidden', 'download', false); |
|
334 | 334 | |
335 | - if( $this->getValue( $data, 'attribute.label' ) != '' ) |
|
335 | + if ($this->getValue($data, 'attribute.label') != '') |
|
336 | 336 | { |
337 | - $listId = $this->getValue( $data, 'product.lists.id' ); |
|
337 | + $listId = $this->getValue($data, 'product.lists.id'); |
|
338 | 338 | |
339 | - if( isset( $listItems[$listId] ) ) { |
|
340 | - $litem = $listItems[$listId]; unset( $listItems[$listId] ); |
|
339 | + if (isset($listItems[$listId])) { |
|
340 | + $litem = $listItems[$listId]; unset($listItems[$listId]); |
|
341 | 341 | } else { |
342 | 342 | $litem = clone $listItem; |
343 | 343 | } |
344 | 344 | |
345 | - if( ( $refItem = $litem->getRefItem() ) === null ) { |
|
345 | + if (($refItem = $litem->getRefItem()) === null) { |
|
346 | 346 | $refItem = clone $attrItem; |
347 | 347 | } |
348 | 348 | |
349 | - $litem->fromArray( $data ); |
|
350 | - $refItem->fromArray( $data ); |
|
349 | + $litem->fromArray($data); |
|
350 | + $refItem->fromArray($data); |
|
351 | 351 | |
352 | - if( ( $file = $this->getValue( (array) $this->getView()->request()->getUploadedFiles(), 'download/file' ) ) !== null |
|
352 | + if (($file = $this->getValue((array) $this->getView()->request()->getUploadedFiles(), 'download/file')) !== null |
|
353 | 353 | && $file->getError() === UPLOAD_ERR_OK |
354 | 354 | ) { |
355 | - $path = ( $this->getValue( $data, 'overwrite' ) == 1 ? $refItem->getCode() : null ); |
|
356 | - $refItem->setCode( $this->storeFile( $file, $path ) ); |
|
355 | + $path = ($this->getValue($data, 'overwrite') == 1 ? $refItem->getCode() : null); |
|
356 | + $refItem->setCode($this->storeFile($file, $path)); |
|
357 | 357 | } |
358 | 358 | |
359 | - $item->addListItem( 'attribute', $litem, $refItem ); |
|
359 | + $item->addListItem('attribute', $litem, $refItem); |
|
360 | 360 | } |
361 | 361 | |
362 | - foreach( $listItems as $listItem ) |
|
362 | + foreach ($listItems as $listItem) |
|
363 | 363 | { |
364 | 364 | $refItem = $listItem->getRefItem(); |
365 | 365 | |
366 | - if( $refItem !== null && ( $path = $refItem->getCode() ) != '' && $fs->has( $path ) ) { |
|
367 | - $fs->rm( $path ); |
|
366 | + if ($refItem !== null && ($path = $refItem->getCode()) != '' && $fs->has($path)) { |
|
367 | + $fs->rm($path); |
|
368 | 368 | } |
369 | 369 | |
370 | - $item->deleteListItem( 'attribute', $listItem, $refItem ); |
|
370 | + $item->deleteListItem('attribute', $listItem, $refItem); |
|
371 | 371 | } |
372 | 372 | } |
373 | 373 | |
@@ -379,35 +379,35 @@ discard block |
||
379 | 379 | * @param boolean $copy True if items should be copied, false if not |
380 | 380 | * @return string[] Multi-dimensional associative list of item data |
381 | 381 | */ |
382 | - protected function toArray( \Aimeos\MShop\Product\Item\Iface $item, $copy = false ) |
|
382 | + protected function toArray(\Aimeos\MShop\Product\Item\Iface $item, $copy = false) |
|
383 | 383 | { |
384 | 384 | $siteId = $this->getContext()->getLocale()->getSiteId(); |
385 | 385 | $data = ['product.lists.siteid' => $siteId]; |
386 | 386 | |
387 | - foreach( $item->getListItems( 'attribute', 'hidden', 'download', false ) as $listItem ) |
|
387 | + foreach ($item->getListItems('attribute', 'hidden', 'download', false) as $listItem) |
|
388 | 388 | { |
389 | - if( ( $refItem = $listItem->getRefItem() ) === null ) { |
|
389 | + if (($refItem = $listItem->getRefItem()) === null) { |
|
390 | 390 | continue; |
391 | 391 | } |
392 | 392 | |
393 | - $list = $listItem->toArray( true ) + $refItem->toArray( true ); |
|
393 | + $list = $listItem->toArray(true) + $refItem->toArray(true); |
|
394 | 394 | |
395 | - if( $copy === true ) { |
|
395 | + if ($copy === true) { |
|
396 | 396 | $list['product.lists.id'] = ''; |
397 | 397 | } |
398 | 398 | |
399 | - foreach( $list as $key => $value ) { |
|
399 | + foreach ($list as $key => $value) { |
|
400 | 400 | $data[$key] = $value; |
401 | 401 | } |
402 | 402 | |
403 | 403 | try |
404 | 404 | { |
405 | - $fs = $this->getContext()->getFilesystemManager()->get( 'fs-secure' ); |
|
405 | + $fs = $this->getContext()->getFilesystemManager()->get('fs-secure'); |
|
406 | 406 | |
407 | - $data['time'] = $fs->time( $data['attribute.code'] ); |
|
408 | - $data['size'] = $fs->size( $data['attribute.code'] ); |
|
407 | + $data['time'] = $fs->time($data['attribute.code']); |
|
408 | + $data['size'] = $fs->size($data['attribute.code']); |
|
409 | 409 | } |
410 | - catch( \Exception $e ) { ; } // Show product even if file isn't available any more |
|
410 | + catch (\Exception $e) {; } // Show product even if file isn't available any more |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | return $data; |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | * @param \Aimeos\MW\View\Iface $view View object with data assigned |
421 | 421 | * @return string HTML output |
422 | 422 | */ |
423 | - protected function render( \Aimeos\MW\View\Iface $view ) |
|
423 | + protected function render(\Aimeos\MW\View\Iface $view) |
|
424 | 424 | { |
425 | 425 | /** admin/jqadm/product/download/template-item |
426 | 426 | * Relative path to the HTML body template of the download subpart for products. |
@@ -444,6 +444,6 @@ discard block |
||
444 | 444 | $tplconf = 'admin/jqadm/product/download/template-item'; |
445 | 445 | $default = 'product/item-download-standard'; |
446 | 446 | |
447 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
447 | + return $view->render($view->config($tplconf, $default)); |
|
448 | 448 | } |
449 | 449 | } |
450 | 450 | \ No newline at end of file |
@@ -118,14 +118,12 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | return; |
121 | - } |
|
122 | - catch( \Aimeos\MShop\Exception $e ) |
|
121 | + } catch( \Aimeos\MShop\Exception $e ) |
|
123 | 122 | { |
124 | 123 | $error = array( 'product-item-subscription' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
125 | 124 | $view->errors = $view->get( 'errors', [] ) + $error; |
126 | 125 | $this->logException( $e ); |
127 | - } |
|
128 | - catch( \Exception $e ) |
|
126 | + } catch( \Exception $e ) |
|
129 | 127 | { |
130 | 128 | $error = array( 'product-item-subscription' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
131 | 129 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -361,8 +359,7 @@ discard block |
||
361 | 359 | { |
362 | 360 | $list['product.lists.siteid'] = (string) $map[$attrId]->getSiteId(); |
363 | 361 | $list['product.lists.id'] = (string) $map[$attrId]->getId(); |
364 | - } |
|
365 | - else |
|
362 | + } else |
|
366 | 363 | { |
367 | 364 | $list['product.lists.siteid'] = $siteId; |
368 | 365 | $list['product.lists.id'] = ''; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Product\Subscription; |
12 | 12 | |
13 | -sprintf( 'subscription' ); // for translation |
|
13 | +sprintf('subscription'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | { |
45 | 45 | $view = $this->getView(); |
46 | 46 | |
47 | - $view->subscriptionData = $this->toArray( $view->item, true ); |
|
47 | + $view->subscriptionData = $this->toArray($view->item, true); |
|
48 | 48 | $view->subscriptionBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->subscriptionBody .= $client->copy(); |
52 | 52 | } |
53 | 53 | |
54 | - return $this->render( $view ); |
|
54 | + return $this->render($view); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | { |
65 | 65 | $view = $this->getView(); |
66 | 66 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
67 | - $data = $view->param( 'subscription', [] ); |
|
67 | + $data = $view->param('subscription', []); |
|
68 | 68 | |
69 | - foreach( $view->value( $data, 'product.lists.id', [] ) as $idx => $value ) { |
|
69 | + foreach ($view->value($data, 'product.lists.id', []) as $idx => $value) { |
|
70 | 70 | $data['product.lists.siteid'][$idx] = $siteid; |
71 | 71 | } |
72 | 72 | |
73 | 73 | $view->subscriptionData = $data; |
74 | 74 | $view->subscriptionBody = ''; |
75 | 75 | |
76 | - foreach( $this->getSubClients() as $client ) { |
|
76 | + foreach ($this->getSubClients() as $client) { |
|
77 | 77 | $view->subscriptionBody .= $client->create(); |
78 | 78 | } |
79 | 79 | |
80 | - return $this->render( $view ); |
|
80 | + return $this->render($view); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | { |
91 | 91 | $view = $this->getView(); |
92 | 92 | |
93 | - $view->subscriptionData = $this->toArray( $view->item ); |
|
93 | + $view->subscriptionData = $this->toArray($view->item); |
|
94 | 94 | $view->subscriptionBody = ''; |
95 | 95 | |
96 | - foreach( $this->getSubClients() as $client ) { |
|
96 | + foreach ($this->getSubClients() as $client) { |
|
97 | 97 | $view->subscriptionBody .= $client->get(); |
98 | 98 | } |
99 | 99 | |
100 | - return $this->render( $view ); |
|
100 | + return $this->render($view); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | |
@@ -110,26 +110,26 @@ discard block |
||
110 | 110 | |
111 | 111 | try |
112 | 112 | { |
113 | - $this->fromArray( $view->item, $view->param( 'subscription', [] ) ); |
|
113 | + $this->fromArray($view->item, $view->param('subscription', [])); |
|
114 | 114 | $view->subscriptionBody = ''; |
115 | 115 | |
116 | - foreach( $this->getSubClients() as $client ) { |
|
116 | + foreach ($this->getSubClients() as $client) { |
|
117 | 117 | $view->subscriptionBody .= $client->save(); |
118 | 118 | } |
119 | 119 | |
120 | 120 | return; |
121 | 121 | } |
122 | - catch( \Aimeos\MShop\Exception $e ) |
|
122 | + catch (\Aimeos\MShop\Exception $e) |
|
123 | 123 | { |
124 | - $error = array( 'product-item-subscription' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
125 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
126 | - $this->logException( $e ); |
|
124 | + $error = array('product-item-subscription' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage())); |
|
125 | + $view->errors = $view->get('errors', []) + $error; |
|
126 | + $this->logException($e); |
|
127 | 127 | } |
128 | - catch( \Exception $e ) |
|
128 | + catch (\Exception $e) |
|
129 | 129 | { |
130 | - $error = array( 'product-item-subscription' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
131 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
132 | - $this->logException( $e ); |
|
130 | + $error = array('product-item-subscription' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
131 | + $view->errors = $view->get('errors', []) + $error; |
|
132 | + $this->logException($e); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | throw new \Aimeos\Admin\JQAdm\Exception(); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @param string|null $name Name of the sub-client (Default if null) |
144 | 144 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
145 | 145 | */ |
146 | - public function getSubClient( $type, $name = null ) |
|
146 | + public function getSubClient($type, $name = null) |
|
147 | 147 | { |
148 | 148 | /** admin/jqadm/product/subscription/decorators/excludes |
149 | 149 | * Excludes decorators added by the "common" subscription from the product JQAdm client |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * @see admin/jqadm/product/subscription/decorators/excludes |
219 | 219 | * @see admin/jqadm/product/subscription/decorators/global |
220 | 220 | */ |
221 | - return $this->createSubClient( 'product/subscription/' . $type, $name ); |
|
221 | + return $this->createSubClient('product/subscription/' . $type, $name); |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | |
@@ -229,17 +229,17 @@ discard block |
||
229 | 229 | */ |
230 | 230 | protected function getIntervalItems() |
231 | 231 | { |
232 | - $manager = \Aimeos\MShop::create( $this->getContext(), 'attribute' ); |
|
232 | + $manager = \Aimeos\MShop::create($this->getContext(), 'attribute'); |
|
233 | 233 | |
234 | 234 | $search = $manager->createSearch(); |
235 | 235 | $expr = [ |
236 | - $search->compare( '==', 'attribute.type', 'interval' ), |
|
237 | - $search->compare( '==', 'attribute.domain', 'product' ), |
|
236 | + $search->compare('==', 'attribute.type', 'interval'), |
|
237 | + $search->compare('==', 'attribute.domain', 'product'), |
|
238 | 238 | ]; |
239 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
240 | - $search->setSortations( [$search->sort( '+', 'attribute.code' )] ); |
|
239 | + $search->setConditions($search->combine('&&', $expr)); |
|
240 | + $search->setSortations([$search->sort('+', 'attribute.code')]); |
|
241 | 241 | |
242 | - return $manager->searchItems( $search ); |
|
242 | + return $manager->searchItems($search); |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * @since 2018.04 |
284 | 284 | * @category Developer |
285 | 285 | */ |
286 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/product/subscription/standard/subparts', [] ); |
|
286 | + return $this->getContext()->getConfig()->get('admin/jqadm/product/subscription/standard/subparts', []); |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | |
@@ -293,37 +293,37 @@ discard block |
||
293 | 293 | * @param \Aimeos\MShop\Product\Item\Iface $item Product item object without referenced domain items |
294 | 294 | * @param string[] $data Data array |
295 | 295 | */ |
296 | - protected function fromArray( \Aimeos\MShop\Product\Item\Iface $item, array $data ) |
|
296 | + protected function fromArray(\Aimeos\MShop\Product\Item\Iface $item, array $data) |
|
297 | 297 | { |
298 | 298 | $context = $this->getContext(); |
299 | 299 | |
300 | - $attrManager = \Aimeos\MShop::create( $context, 'attribute' ); |
|
301 | - $listManager = \Aimeos\MShop::create( $context, 'product/lists' ); |
|
300 | + $attrManager = \Aimeos\MShop::create($context, 'attribute'); |
|
301 | + $listManager = \Aimeos\MShop::create($context, 'product/lists'); |
|
302 | 302 | |
303 | - $listItems = $item->getListItems( 'attribute', 'config', 'interval', false ); |
|
303 | + $listItems = $item->getListItems('attribute', 'config', 'interval', false); |
|
304 | 304 | |
305 | - foreach( $data as $idx => $entry ) |
|
305 | + foreach ($data as $idx => $entry) |
|
306 | 306 | { |
307 | - if( !array_key_exists( 'attribute.id', $entry ) ) { |
|
307 | + if (!array_key_exists('attribute.id', $entry)) { |
|
308 | 308 | continue; |
309 | 309 | } |
310 | 310 | |
311 | - if( $entry['attribute.id'] == '' || ( $listItem = $item->getListItem( 'attribute', 'config', $entry['attribute.id'], false ) ) === null ) { |
|
312 | - $listItem = $listManager->createItem()->setType( 'config' ); |
|
311 | + if ($entry['attribute.id'] == '' || ($listItem = $item->getListItem('attribute', 'config', $entry['attribute.id'], false)) === null) { |
|
312 | + $listItem = $listManager->createItem()->setType('config'); |
|
313 | 313 | } |
314 | 314 | |
315 | - if( $entry['attribute.id'] == '' || ( $refItem = $listItem->getRefItem() ) === null ) |
|
315 | + if ($entry['attribute.id'] == '' || ($refItem = $listItem->getRefItem()) === null) |
|
316 | 316 | { |
317 | - $refItem = $attrManager->createItem()->setType( 'interval' ); |
|
318 | - $refItem->fromArray( $entry ); |
|
317 | + $refItem = $attrManager->createItem()->setType('interval'); |
|
318 | + $refItem->fromArray($entry); |
|
319 | 319 | } |
320 | 320 | |
321 | - unset( $listItems[$listItem->getId()] ); |
|
321 | + unset($listItems[$listItem->getId()]); |
|
322 | 322 | |
323 | - $item->addListItem( 'attribute', $listItem->setPosition( $idx ), $refItem ); |
|
323 | + $item->addListItem('attribute', $listItem->setPosition($idx), $refItem); |
|
324 | 324 | } |
325 | 325 | |
326 | - $item->deleteListItems( $listItems ); |
|
326 | + $item->deleteListItems($listItems); |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | |
@@ -334,20 +334,20 @@ discard block |
||
334 | 334 | * @param boolean $copy True if items should be copied, false if not |
335 | 335 | * @return string[] Multi-dimensional associative list of item data |
336 | 336 | */ |
337 | - protected function toArray( \Aimeos\MShop\Product\Item\Iface $item, $copy = false ) |
|
337 | + protected function toArray(\Aimeos\MShop\Product\Item\Iface $item, $copy = false) |
|
338 | 338 | { |
339 | 339 | $data = $map = []; |
340 | 340 | $siteId = $this->getContext()->getLocale()->getSiteId(); |
341 | 341 | |
342 | - foreach( $item->getListItems( 'attribute', 'config', 'interval', false ) as $listItem ) { |
|
342 | + foreach ($item->getListItems('attribute', 'config', 'interval', false) as $listItem) { |
|
343 | 343 | $map[$listItem->getRefId()] = $listItem; |
344 | 344 | } |
345 | 345 | |
346 | - foreach( $this->getIntervalItems() as $attrId => $attrItem ) |
|
346 | + foreach ($this->getIntervalItems() as $attrId => $attrItem) |
|
347 | 347 | { |
348 | - $list = $attrItem->toArray( true ); |
|
348 | + $list = $attrItem->toArray(true); |
|
349 | 349 | |
350 | - if( isset( $map[$attrId] ) && $copy !== true ) |
|
350 | + if (isset($map[$attrId]) && $copy !== true) |
|
351 | 351 | { |
352 | 352 | $list['product.lists.siteid'] = (string) $map[$attrId]->getSiteId(); |
353 | 353 | $list['product.lists.id'] = (string) $map[$attrId]->getId(); |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | $matches = []; |
362 | 362 | $list['Y'] = $list['M'] = $list['W'] = $list['D'] = 0; |
363 | 363 | |
364 | - if( preg_match( '/^P([0-9]+)Y([0-9]+)M([0-9]+)W([0-9]+)D$/', $list['attribute.code'], $matches ) === 1 ) |
|
364 | + if (preg_match('/^P([0-9]+)Y([0-9]+)M([0-9]+)W([0-9]+)D$/', $list['attribute.code'], $matches) === 1) |
|
365 | 365 | { |
366 | 366 | $list['Y'] = $matches[1]; |
367 | 367 | $list['M'] = $matches[2]; |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | * @param \Aimeos\MW\View\Iface $view View object with data assigned |
383 | 383 | * @return string HTML output |
384 | 384 | */ |
385 | - protected function render( \Aimeos\MW\View\Iface $view ) |
|
385 | + protected function render(\Aimeos\MW\View\Iface $view) |
|
386 | 386 | { |
387 | 387 | /** admin/jqadm/product/subscription/template-item |
388 | 388 | * Relative path to the HTML body template of the subscription subpart for products. |
@@ -406,6 +406,6 @@ discard block |
||
406 | 406 | $tplconf = 'admin/jqadm/product/subscription/template-item'; |
407 | 407 | $default = 'product/item-subscription-standard'; |
408 | 408 | |
409 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
409 | + return $view->render($view->config($tplconf, $default)); |
|
410 | 410 | } |
411 | 411 | } |
412 | 412 | \ No newline at end of file |
@@ -17,39 +17,39 @@ discard block |
||
17 | 17 | <div id="subscription" class="item-subscription tab-pane fade" role="tablist" aria-labelledby="subscription"> |
18 | 18 | |
19 | 19 | <table class="subscription-list table table-default col-xl-12 content-block" |
20 | - data-items="<?= $enc->attr( json_encode( $this->get( 'subscriptionData', [] ) ) ); ?>" |
|
21 | - data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>" |
|
20 | + data-items="<?= $enc->attr(json_encode($this->get('subscriptionData', []))); ?>" |
|
21 | + data-keys="<?= $enc->attr(json_encode($keys)) ?>" |
|
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', 'Active' ) ); ?></span> |
|
27 | + <span class="help"><?= $enc->html($this->translate('admin', 'Active')); ?></span> |
|
28 | 28 | <div class="form-text text-muted help-text"> |
29 | - <?= $enc->html( $this->translate( 'admin', 'Available intervals in the front-end' ) ); ?> |
|
29 | + <?= $enc->html($this->translate('admin', 'Available intervals in the front-end')); ?> |
|
30 | 30 | </div> |
31 | 31 | </th> |
32 | 32 | <th> |
33 | - <span class="help"><?= $enc->html( $this->translate( 'admin', 'Label' ) ); ?></span> |
|
33 | + <span class="help"><?= $enc->html($this->translate('admin', 'Label')); ?></span> |
|
34 | 34 | <div class="form-text text-muted help-text"> |
35 | - <?= $enc->html( $this->translate( 'admin', 'Label describing the interval, will be used if no name is available' ) ); ?> |
|
35 | + <?= $enc->html($this->translate('admin', 'Label describing the interval, will be used if no name is available')); ?> |
|
36 | 36 | </div> |
37 | 37 | </th> |
38 | 38 | <th> |
39 | - <?= $enc->html( $this->translate( 'admin', 'Years' ) ); ?> |
|
39 | + <?= $enc->html($this->translate('admin', 'Years')); ?> |
|
40 | 40 | </th> |
41 | 41 | <th> |
42 | - <?= $enc->html( $this->translate( 'admin', 'Months' ) ); ?> |
|
42 | + <?= $enc->html($this->translate('admin', 'Months')); ?> |
|
43 | 43 | </th> |
44 | 44 | <th> |
45 | - <?= $enc->html( $this->translate( 'admin', 'Weeks' ) ); ?> |
|
45 | + <?= $enc->html($this->translate('admin', 'Weeks')); ?> |
|
46 | 46 | </th> |
47 | 47 | <th> |
48 | - <?= $enc->html( $this->translate( 'admin', 'Days' ) ); ?> |
|
48 | + <?= $enc->html($this->translate('admin', 'Days')); ?> |
|
49 | 49 | </th> |
50 | 50 | <th class="actions"> |
51 | - <div class="btn act-add fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
52 | - title="<?= $enc->attr( $this->translate( 'admin', 'Insert new entry (Ctrl+I)') ); ?>" |
|
51 | + <div class="btn act-add fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
52 | + title="<?= $enc->attr($this->translate('admin', 'Insert new entry (Ctrl+I)')); ?>" |
|
53 | 53 | v-on:click="addItem()"> |
54 | 54 | </div> |
55 | 55 | </th> |
@@ -60,57 +60,57 @@ discard block |
||
60 | 60 | v-bind:class="entry['product.lists.siteid'] != '<?= $this->site()->siteid() ?>' ? 'readonly' : ''"> |
61 | 61 | |
62 | 62 | <td class="interval-check"> |
63 | - <input class="form-control item-id" type="checkbox" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
64 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'subscription', 'idx', 'attribute.id' ) ) ); ?>'.replace( 'idx', idx )" |
|
63 | + <input class="form-control item-id" type="checkbox" tabindex="<?= $this->get('tabindex'); ?>" |
|
64 | + v-bind:name="'<?= $enc->attr($this->formparam(array('subscription', 'idx', 'attribute.id'))); ?>'.replace( 'idx', idx )" |
|
65 | 65 | v-bind:checked="entry['product.lists.id'] || !entry['attribute.id'] ? 'checked' : ''" |
66 | 66 | v-bind:value="entry['attribute.id']" /> |
67 | 67 | </td> |
68 | 68 | <td class="interval-label mandatory"> |
69 | - <input class="form-control item-label" type="text" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
70 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'subscription', 'idx', 'attribute.label' ) ) ); ?>'.replace( 'idx', idx )" |
|
69 | + <input class="form-control item-label" type="text" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
70 | + v-bind:name="'<?= $enc->attr($this->formparam(array('subscription', 'idx', 'attribute.label'))); ?>'.replace( 'idx', idx )" |
|
71 | 71 | v-bind:readonly="getReadOnly(idx)" |
72 | 72 | v-model="items[idx]['attribute.label']" /> |
73 | 73 | </td> |
74 | 74 | <td class="interval-field mandatory"> |
75 | - <input class="form-control field-year" type="number" step="1" min="0" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
76 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'subscription', 'idx', 'Y' ) ) ); ?>'.replace( 'idx', idx )" |
|
75 | + <input class="form-control field-year" type="number" step="1" min="0" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
76 | + v-bind:name="'<?= $enc->attr($this->formparam(array('subscription', 'idx', 'Y'))); ?>'.replace( 'idx', idx )" |
|
77 | 77 | v-bind:readonly="getReadOnly(idx)" |
78 | 78 | v-model="items[idx]['Y']" /> |
79 | 79 | </td> |
80 | 80 | <td class="interval-field mandatory"> |
81 | - <input class="form-control field-month" type="number" step="1" min="0" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
82 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'subscription', 'idx', 'M' ) ) ); ?>'.replace( 'idx', idx )" |
|
81 | + <input class="form-control field-month" type="number" step="1" min="0" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
82 | + v-bind:name="'<?= $enc->attr($this->formparam(array('subscription', 'idx', 'M'))); ?>'.replace( 'idx', idx )" |
|
83 | 83 | v-bind:readonly="getReadOnly(idx)" |
84 | 84 | v-model="items[idx]['M']" /> |
85 | 85 | </td> |
86 | 86 | <td class="interval-field mandatory"> |
87 | - <input class="form-control field-week" type="number" step="1" min="0" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
88 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'subscription', 'idx', 'W' ) ) ); ?>'.replace( 'idx', idx )" |
|
87 | + <input class="form-control field-week" type="number" step="1" min="0" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
88 | + v-bind:name="'<?= $enc->attr($this->formparam(array('subscription', 'idx', 'W'))); ?>'.replace( 'idx', idx )" |
|
89 | 89 | v-bind:readonly="getReadOnly(idx)" |
90 | 90 | v-model="items[idx]['W']" /> |
91 | 91 | </td> |
92 | 92 | <td class="interval-field mandatory"> |
93 | - <input class="form-control field-day" type="number" step="1" min="0" required="required" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
94 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'subscription', 'idx', 'D' ) ) ); ?>'.replace( 'idx', idx )" |
|
93 | + <input class="form-control field-day" type="number" step="1" min="0" required="required" tabindex="<?= $this->get('tabindex'); ?>" |
|
94 | + v-bind:name="'<?= $enc->attr($this->formparam(array('subscription', 'idx', 'D'))); ?>'.replace( 'idx', idx )" |
|
95 | 95 | v-bind:readonly="getReadOnly(idx)" |
96 | 96 | v-model="items[idx]['D']" /> |
97 | 97 | </td> |
98 | 98 | <td class="actions"> |
99 | 99 | <input class="item-code" type="hidden" |
100 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'subscription', 'idx', 'attribute.code' ) ) ); ?>'.replace( 'idx', idx )" |
|
100 | + v-bind:name="'<?= $enc->attr($this->formparam(array('subscription', 'idx', 'attribute.code'))); ?>'.replace( 'idx', idx )" |
|
101 | 101 | v-bind:value="getAttributeValue(idx)" /> |
102 | 102 | |
103 | 103 | <input class="item-listid" type="hidden" |
104 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'subscription', 'idx', 'product.lists.id' ) ) ); ?>'.replace( 'idx', idx )" |
|
104 | + v-bind:name="'<?= $enc->attr($this->formparam(array('subscription', 'idx', 'product.lists.id'))); ?>'.replace( 'idx', idx )" |
|
105 | 105 | v-bind:value="entry['product.lists.id']" /> |
106 | 106 | |
107 | 107 | <input class="item-siteid" type="hidden" |
108 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'subscription', 'idx', 'product.lists.siteid' ) ) ); ?>'.replace( 'idx', idx )" |
|
108 | + v-bind:name="'<?= $enc->attr($this->formparam(array('subscription', 'idx', 'product.lists.siteid'))); ?>'.replace( 'idx', idx )" |
|
109 | 109 | v-bind:value="entry['product.lists.siteid']" /> |
110 | 110 | |
111 | 111 | <div v-if="entry['attribute.id'] == ''" v-on:click="removeItem(idx)" |
112 | - class="btn act-delete fa" tabindex="<?= $this->get( 'tabindex' ); ?>" |
|
113 | - title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry') ); ?>"> |
|
112 | + class="btn act-delete fa" tabindex="<?= $this->get('tabindex'); ?>" |
|
113 | + title="<?= $enc->attr($this->translate('admin', 'Delete this entry')); ?>"> |
|
114 | 114 | </div> |
115 | 115 | </td> |
116 | 116 | |
@@ -118,6 +118,6 @@ discard block |
||
118 | 118 | </tbody> |
119 | 119 | </table> |
120 | 120 | |
121 | - <?= $this->get( 'subscriptionBody' ); ?> |
|
121 | + <?= $this->get('subscriptionBody'); ?> |
|
122 | 122 | |
123 | 123 | </div> |
@@ -18,22 +18,22 @@ discard block |
||
18 | 18 | <div class="col-xl-6 content-block item-characteristic-attribute"> |
19 | 19 | |
20 | 20 | <table class="attribute-list table table-default" |
21 | - data-items="<?= $enc->attr( json_encode( $this->get( 'attributeData', [] ) ) ); ?>" |
|
22 | - data-keys="<?= $enc->attr( json_encode( $keys ) ) ?>" |
|
21 | + data-items="<?= $enc->attr(json_encode($this->get('attributeData', []))); ?>" |
|
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', 'Attributes' ) ); ?></span> |
|
29 | + <span class="help"><?= $enc->html($this->translate('admin', 'Attributes')); ?></span> |
|
30 | 30 | <div class="form-text text-muted help-text"> |
31 | - <?= $enc->html( $this->translate( 'admin', 'Product attributes that are used by other products too' ) ); ?> |
|
31 | + <?= $enc->html($this->translate('admin', 'Product attributes that are used by other products too')); ?> |
|
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> |
@@ -46,18 +46,18 @@ discard block |
||
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( 'characteristic', 'attribute', 'product.lists.id', '' ) ) ); ?>" /> |
|
49 | + name="<?= $enc->attr($this->formparam(array('characteristic', 'attribute', '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( 'characteristic', 'attribute', 'attribute.label', '' ) ) ); ?>" /> |
|
52 | + name="<?= $enc->attr($this->formparam(array('characteristic', 'attribute', '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( 'characteristic', 'attribute', 'attribute.type', '' ) ) ); ?>" /> |
|
55 | + name="<?= $enc->attr($this->formparam(array('characteristic', 'attribute', '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( 'characteristic', 'attribute', 'product.lists.refid', '' ) ) ); ?>'" |
|
58 | + v-bind:name="'<?= $enc->attr($this->formparam(array('characteristic', 'attribute', '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 |
||
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 |
||
77 | 77 | |
78 | 78 | </table> |
79 | 79 | |
80 | - <?= $this->get( 'attributeBody' ); ?> |
|
80 | + <?= $this->get('attributeBody'); ?> |
|
81 | 81 | |
82 | 82 | </div> |