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 2020 <a href="#"
2121 onclick="tree.collapseTree(); return false;"><?= $ block ->escapeHtml (__ ('Collapse All ' )) ?> </a>
2222 <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>
2424 <?php endif ; ?>
2525 </div>
2626 <?php if ($ block ->getRoot ()) :?>
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ $formName = $block->getFormName();
175175 <label class="admin__field-label">
176176 <span><?= $ block ->escapeHtml (__ ('Image Size ' )) ?> </span>
177177 </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>
179179 </div>
180180
181181 <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 99use Magento \Framework \View \Element \UiComponent \ContextInterface ;
1010
1111/**
12+ * Base abstract form element.
13+ *
14+ * phpcs:disable Magento2.Classes.AbstractApi
1215 * @api
1316 * @since 100.1.0
1417 */
@@ -59,7 +62,7 @@ public function prepare()
5962 if (empty ($ config ['rawOptions ' ])) {
6063 $ options = $ this ->convertOptionsValueToString ($ options );
6164 }
62- $ config ['options ' ] = array_values (array_merge_recursive ($ config ['options ' ], $ options ));
65+ $ config ['options ' ] = array_values (array_replace_recursive ($ config ['options ' ], $ options ));
6366 }
6467 $ this ->setData ('config ' , (array )$ config );
6568 parent ::prepare ();
@@ -84,11 +87,14 @@ abstract public function getIsSelected($optionValue);
8487 */
8588 protected function convertOptionsValueToString (array $ options )
8689 {
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+ }
9096 }
91- } );
97+ );
9298 return $ options ;
9399 }
94100}
You can’t perform that action at this time.
0 commit comments