File tree Expand file tree Collapse file tree 4 files changed +13
-26
lines changed
Catalog/view/adminhtml/templates/catalog
Ui/Component/Form/Element Expand file tree Collapse file tree 4 files changed +13
-26
lines changed Original file line number Diff line number Diff line change 20
20
<a href="#"
21
21
onclick="tree.collapseTree(); return false;"><?= $ block ->escapeHtml (__ ('Collapse All ' )) ?> </a>
22
22
<span class="separator">|</span> <a href="#"
23
- onclick="tree.expandTree(); return false;"><?= $ block ->escapeHtml (_ ('Expand All ' )) ?> </a>
23
+ onclick="tree.expandTree(); return false;"><?= $ block ->escapeHtml (__ ('Expand All ' )) ?> </a>
24
24
<?php endif ; ?>
25
25
</div>
26
26
<?php if ($ block ->getRoot ()) :?>
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ $formName = $block->getFormName();
175
175
<label class="admin__field-label">
176
176
<span><?= $ block ->escapeHtml (__ ('Image Size ' )) ?> </span>
177
177
</label>
178
- <div class="admin__field-value" data-message="<?= $ block ->escapeHtmlAttr (_ ('{size} ' )) ?> "></div>
178
+ <div class="admin__field-value" data-message="<?= $ block ->escapeHtmlAttr (__ ('{size} ' )) ?> "></div>
179
179
</div>
180
180
181
181
<div class="admin__field admin__field-inline field-image-resolution" data-role="resolution">
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 9
9
use Magento \Framework \View \Element \UiComponent \ContextInterface ;
10
10
11
11
/**
12
+ * Base abstract form element.
13
+ *
14
+ * phpcs:disable Magento2.Classes.AbstractApi
12
15
* @api
13
16
* @since 100.1.0
14
17
*/
@@ -59,7 +62,7 @@ public function prepare()
59
62
if (empty ($ config ['rawOptions ' ])) {
60
63
$ options = $ this ->convertOptionsValueToString ($ options );
61
64
}
62
- $ config ['options ' ] = array_values (array_merge_recursive ($ config ['options ' ], $ options ));
65
+ $ config ['options ' ] = array_values (array_replace_recursive ($ config ['options ' ], $ options ));
63
66
}
64
67
$ this ->setData ('config ' , (array )$ config );
65
68
parent ::prepare ();
@@ -84,11 +87,14 @@ abstract public function getIsSelected($optionValue);
84
87
*/
85
88
protected function convertOptionsValueToString (array $ options )
86
89
{
87
- array_walk ($ options , function (&$ value ) {
88
- if (isset ($ value ['value ' ]) && is_scalar ($ value ['value ' ])) {
89
- $ value ['value ' ] = (string )$ value ['value ' ];
90
+ array_walk (
91
+ $ options ,
92
+ static function (&$ value ) {
93
+ if (isset ($ value ['value ' ]) && is_scalar ($ value ['value ' ])) {
94
+ $ value ['value ' ] = (string )$ value ['value ' ];
95
+ }
90
96
}
91
- } );
97
+ );
92
98
return $ options ;
93
99
}
94
100
}
You can’t perform that action at this time.
0 commit comments