File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
app/code/Magento/Backend/Block/Widget Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ protected function _beforeToHtml()
238
238
$ this ->_tabs = $ this ->reorderTabs ();
239
239
240
240
if ($ this ->_activeTab === null ) {
241
+ /** @var $tab */
241
242
foreach ($ this ->_tabs as $ tab ) {
242
243
$ this ->_activeTab = $ tab ->getId ();
243
244
break ;
@@ -266,8 +267,10 @@ protected function reorderTabs()
266
267
$ position = 100 ;
267
268
268
269
/**
269
- * @var string $key
270
- * @var \Magento\Backend\Block\Widget\Tab\TabInterface $tab
270
+ * Set the initial positions for each tab.
271
+ *
272
+ * @var string $key
273
+ * @var TabInterface $tab
271
274
*/
272
275
foreach ($ this ->_tabs as $ key => $ tab ) {
273
276
$ tab ->setPosition ($ position );
@@ -280,6 +283,12 @@ protected function reorderTabs()
280
283
281
284
$ positionFactor = 1 ;
282
285
286
+ /**
287
+ * Rearrange the positions by using the after tag for each tab.
288
+ *
289
+ * @var integer $position
290
+ * @var TabInterface $tab
291
+ */
283
292
foreach ($ orderByPosition as $ position => $ tab ) {
284
293
if (!$ tab ->getAfter () || !in_array ($ tab ->getAfter (), array_keys ($ orderByIdentity ))) {
285
294
$ positionFactor = 1 ;
You can’t perform that action at this time.
0 commit comments