fixed indentation

parent aa9be414
...@@ -67,11 +67,11 @@ class ButtonDropdown extends Widget ...@@ -67,11 +67,11 @@ class ButtonDropdown extends Widget
* @var boolean whether the label should be HTML-encoded. * @var boolean whether the label should be HTML-encoded.
*/ */
public $encodeLabel = true; public $encodeLabel = true;
/** /**
* @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]]. * @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]].
* @since 2.0.7 * @since 2.0.7
*/ */
public $dropdownClass = 'yii\bootstrap\Dropdown'; public $dropdownClass = 'yii\bootstrap\Dropdown';
/** /**
...@@ -144,8 +144,8 @@ class ButtonDropdown extends Widget ...@@ -144,8 +144,8 @@ class ButtonDropdown extends Widget
$config = $this->dropdown; $config = $this->dropdown;
$config['clientOptions'] = false; $config['clientOptions'] = false;
$config['view'] = $this->getView(); $config['view'] = $this->getView();
/** @var Widget $dropdownClass */ /** @var Widget $dropdownClass */
$dropdownClass = $this->dropdownClass; $dropdownClass = $this->dropdownClass;
return $dropdownClass::widget($config); return $dropdownClass::widget($config);
} }
} }
...@@ -107,9 +107,9 @@ class Nav extends Widget ...@@ -107,9 +107,9 @@ class Nav extends Widget
public $dropDownCaret; public $dropDownCaret;
/** /**
* @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]]. * @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]].
* @since 2.0.7 * @since 2.0.7
*/ */
public $dropdownClass = 'yii\bootstrap\Dropdown'; public $dropdownClass = 'yii\bootstrap\Dropdown';
/** /**
...@@ -214,9 +214,9 @@ class Nav extends Widget ...@@ -214,9 +214,9 @@ class Nav extends Widget
*/ */
protected function renderDropdown($items, $parentItem) protected function renderDropdown($items, $parentItem)
{ {
/** @var Widget $dropdownClass */ /** @var Widget $dropdownClass */
$dropdownClass = $this->dropdownClass; $dropdownClass = $this->dropdownClass;
return $dropdownClass::widget([ return $dropdownClass::widget([
'options' => ArrayHelper::getValue($parentItem, 'dropDownOptions', []), 'options' => ArrayHelper::getValue($parentItem, 'dropDownOptions', []),
'items' => $items, 'items' => $items,
'encodeLabels' => $this->encodeLabels, 'encodeLabels' => $this->encodeLabels,
......
...@@ -124,11 +124,11 @@ class Tabs extends Widget ...@@ -124,11 +124,11 @@ class Tabs extends Widget
* @since 2.0.7 * @since 2.0.7
*/ */
public $tabContentOptions = []; public $tabContentOptions = [];
/** /**
* @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]]. * @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]].
* @since 2.0.7 * @since 2.0.7
*/ */
public $dropdownClass = 'yii\bootstrap\Dropdown'; public $dropdownClass = 'yii\bootstrap\Dropdown';
/** /**
...@@ -188,8 +188,8 @@ class Tabs extends Widget ...@@ -188,8 +188,8 @@ class Tabs extends Widget
if (!isset($linkOptions['data-toggle'])) { if (!isset($linkOptions['data-toggle'])) {
$linkOptions['data-toggle'] = 'dropdown'; $linkOptions['data-toggle'] = 'dropdown';
} }
/** @var Widget $dropdownClass */ /** @var Widget $dropdownClass */
$dropdownClass = $this->dropdownClass; $dropdownClass = $this->dropdownClass;
$header = Html::a($label, "#", $linkOptions) . "\n" $header = Html::a($label, "#", $linkOptions) . "\n"
. $dropdownClass::widget(['items' => $item['items'], 'clientOptions' => false, 'view' => $this->getView()]); . $dropdownClass::widget(['items' => $item['items'], 'clientOptions' => false, 'view' => $this->getView()]);
} else { } else {
......
...@@ -199,7 +199,7 @@ class TabsTest extends TestCase ...@@ -199,7 +199,7 @@ class TabsTest extends TestCase
], ],
[ [
'label' => 'Tab 2', 'label' => 'Tab 2',
'content' => 'some content' 'content' => 'some content'
], ],
[ [
'label' => 'Tab 3', 'label' => 'Tab 3',
...@@ -211,7 +211,7 @@ class TabsTest extends TestCase ...@@ -211,7 +211,7 @@ class TabsTest extends TestCase
'content' => 'some content' 'content' => 'some content'
] ]
] ]
]); ]);
$this->assertContains('<li class="active"><a href="#mytab-tab2" data-toggle="tab">Tab 3</a></li>', $html); $this->assertContains('<li class="active"><a href="#mytab-tab2" data-toggle="tab">Tab 3</a></li>', $html);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment