Browse Source

fixed indentation

tags/2.0.7
Carsten Brandt 8 years ago
parent
commit
a58a4f7138
No known key found for this signature in database
GPG Key ID: BE4F41DE1DEEEED0
  1. 16
      ButtonDropdown.php
  2. 10
      Nav.php
  3. 14
      Tabs.php
  4. 4
      tests/TabsTest.php

16
ButtonDropdown.php

@ -67,11 +67,11 @@ class ButtonDropdown extends Widget
* @var boolean whether the label should be HTML-encoded.
*/
public $encodeLabel = true;
/**
* @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]].
* @since 2.0.7
*/
public $dropdownClass = 'yii\bootstrap\Dropdown';
/**
* @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]].
* @since 2.0.7
*/
public $dropdownClass = 'yii\bootstrap\Dropdown';
/**
@ -144,8 +144,8 @@ class ButtonDropdown extends Widget
$config = $this->dropdown;
$config['clientOptions'] = false;
$config['view'] = $this->getView();
/** @var Widget $dropdownClass */
$dropdownClass = $this->dropdownClass;
return $dropdownClass::widget($config);
/** @var Widget $dropdownClass */
$dropdownClass = $this->dropdownClass;
return $dropdownClass::widget($config);
}
}

10
Nav.php

@ -107,9 +107,9 @@ class Nav extends Widget
public $dropDownCaret;
/**
* @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
*/
protected function renderDropdown($items, $parentItem)
{
/** @var Widget $dropdownClass */
$dropdownClass = $this->dropdownClass;
return $dropdownClass::widget([
/** @var Widget $dropdownClass */
$dropdownClass = $this->dropdownClass;
return $dropdownClass::widget([
'options' => ArrayHelper::getValue($parentItem, 'dropDownOptions', []),
'items' => $items,
'encodeLabels' => $this->encodeLabels,

14
Tabs.php

@ -124,11 +124,11 @@ class Tabs extends Widget
* @since 2.0.7
*/
public $tabContentOptions = [];
/**
* @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]].
* @since 2.0.7
*/
public $dropdownClass = 'yii\bootstrap\Dropdown';
/**
* @var string name of a class to use for rendering dropdowns withing this widget. Defaults to [[Dropdown]].
* @since 2.0.7
*/
public $dropdownClass = 'yii\bootstrap\Dropdown';
/**
@ -188,8 +188,8 @@ class Tabs extends Widget
if (!isset($linkOptions['data-toggle'])) {
$linkOptions['data-toggle'] = 'dropdown';
}
/** @var Widget $dropdownClass */
$dropdownClass = $this->dropdownClass;
/** @var Widget $dropdownClass */
$dropdownClass = $this->dropdownClass;
$header = Html::a($label, "#", $linkOptions) . "\n"
. $dropdownClass::widget(['items' => $item['items'], 'clientOptions' => false, 'view' => $this->getView()]);
} else {

4
tests/TabsTest.php

@ -199,7 +199,7 @@ class TabsTest extends TestCase
],
[
'label' => 'Tab 2',
'content' => 'some content'
'content' => 'some content'
],
[
'label' => 'Tab 3',
@ -211,7 +211,7 @@ class TabsTest extends TestCase
'content' => 'some content'
]
]
]);
]);
$this->assertContains('<li class="active"><a href="#mytab-tab2" data-toggle="tab">Tab 3</a></li>', $html);
}
}

Loading…
Cancel
Save