Skip to content

Commit 23d616d

Browse files
committed
Added comments and some descriptions.
1 parent e0b26a7 commit 23d616d

File tree

1 file changed

+11
-2
lines changed
  • app/code/Magento/Backend/Block/Widget

1 file changed

+11
-2
lines changed

app/code/Magento/Backend/Block/Widget/Tabs.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ protected function _beforeToHtml()
238238
$this->_tabs = $this->reorderTabs();
239239

240240
if ($this->_activeTab === null) {
241+
/** @var $tab */
241242
foreach ($this->_tabs as $tab) {
242243
$this->_activeTab = $tab->getId();
243244
break;
@@ -266,8 +267,10 @@ protected function reorderTabs()
266267
$position = 100;
267268

268269
/**
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
271274
*/
272275
foreach ($this->_tabs as $key => $tab) {
273276
$tab->setPosition($position);
@@ -280,6 +283,12 @@ protected function reorderTabs()
280283

281284
$positionFactor = 1;
282285

286+
/**
287+
* Rearrange the positions by using the after tag for each tab.
288+
*
289+
* @var integer $position
290+
* @var TabInterface $tab
291+
*/
283292
foreach ($orderByPosition as $position => $tab) {
284293
if (!$tab->getAfter() || !in_array($tab->getAfter(), array_keys($orderByIdentity))) {
285294
$positionFactor = 1;

0 commit comments

Comments
 (0)