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 @@ -235,6 +235,7 @@ protected function _beforeToHtml()
235
235
$ this ->_tabs = $ this ->reorderTabs ();
236
236
237
237
if ($ this ->_activeTab === null ) {
238
+ /** @var $tab */
238
239
foreach ($ this ->_tabs as $ tab ) {
239
240
$ this ->_activeTab = $ tab ->getId ();
240
241
break ;
@@ -263,8 +264,10 @@ protected function reorderTabs()
263
264
$ position = 100 ;
264
265
265
266
/**
266
- * @var string $key
267
- * @var \Magento\Backend\Block\Widget\Tab\TabInterface $tab
267
+ * Set the initial positions for each tab.
268
+ *
269
+ * @var string $key
270
+ * @var TabInterface $tab
268
271
*/
269
272
foreach ($ this ->_tabs as $ key => $ tab ) {
270
273
$ tab ->setPosition ($ position );
@@ -277,6 +280,12 @@ protected function reorderTabs()
277
280
278
281
$ positionFactor = 1 ;
279
282
283
+ /**
284
+ * Rearrange the positions by using the after tag for each tab.
285
+ *
286
+ * @var integer $position
287
+ * @var TabInterface $tab
288
+ */
280
289
foreach ($ orderByPosition as $ position => $ tab ) {
281
290
if (!$ tab ->getAfter () || !in_array ($ tab ->getAfter (), array_keys ($ orderByIdentity ))) {
282
291
$ positionFactor = 1 ;
You can’t perform that action at this time.
0 commit comments