Skip to content

Commit ff94075

Browse files
tiagosampaiomage2pratik
authored andcommitted
Added comments and some descriptions.
1 parent fb93d25 commit ff94075

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
@@ -235,6 +235,7 @@ protected function _beforeToHtml()
235235
$this->_tabs = $this->reorderTabs();
236236

237237
if ($this->_activeTab === null) {
238+
/** @var $tab */
238239
foreach ($this->_tabs as $tab) {
239240
$this->_activeTab = $tab->getId();
240241
break;
@@ -263,8 +264,10 @@ protected function reorderTabs()
263264
$position = 100;
264265

265266
/**
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
268271
*/
269272
foreach ($this->_tabs as $key => $tab) {
270273
$tab->setPosition($position);
@@ -277,6 +280,12 @@ protected function reorderTabs()
277280

278281
$positionFactor = 1;
279282

283+
/**
284+
* Rearrange the positions by using the after tag for each tab.
285+
*
286+
* @var integer $position
287+
* @var TabInterface $tab
288+
*/
280289
foreach ($orderByPosition as $position => $tab) {
281290
if (!$tab->getAfter() || !in_array($tab->getAfter(), array_keys($orderByIdentity))) {
282291
$positionFactor = 1;

0 commit comments

Comments
 (0)