File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
app/code/Magento/Backend/Block/Widget Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -237,19 +237,16 @@ protected function _beforeToHtml()
237
237
{
238
238
$ this ->_tabs = $ this ->reorderTabs ();
239
239
240
- if ($ this ->_activeTab === null ) {
241
- /** @var TabInterface $tab */
242
- foreach ($ this ->_tabs as $ tab ) {
243
- $ this ->_activeTab = $ tab ->getId ();
244
- break ;
245
- }
246
- }
247
-
248
240
if ($ activeTab = $ this ->getRequest ()->getParam ('active_tab ' )) {
249
241
$ this ->setActiveTab ($ activeTab );
250
242
} elseif ($ activeTabId = $ this ->_authSession ->getActiveTabId ()) {
251
243
$ this ->_setActiveTab ($ activeTabId );
252
244
}
245
+
246
+ if ($ this ->_activeTab === null && !empty ($ this ->_tabs )) {
247
+ /** @var TabInterface $tab */
248
+ $ this ->_activeTab = (reset ($ this ->_tabs ))->getId ();
249
+ }
253
250
254
251
$ this ->assign ('tabs ' , $ this ->_tabs );
255
252
return parent ::_beforeToHtml ();
@@ -259,7 +256,7 @@ protected function _beforeToHtml()
259
256
/**
260
257
* @return array
261
258
*/
262
- protected function reorderTabs ()
259
+ private function reorderTabs ()
263
260
{
264
261
$ orderByIdentity = [];
265
262
$ orderByPosition = [];
You can’t perform that action at this time.
0 commit comments