-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Closed
Milestone
Description
https://github.com/yiisoft/yii2/blob/master/extensions/bootstrap/Nav.php#L173
can we extract the Dropdown::widget()
into another function
I want to achieve is this
$items = Dropdown::widget([
'options' => ArrayHelper::getValue($item, 'dropdownOptions'),
'items' => $items,
'encodeLabels' => $this->encodeLabels,
'clientOptions' => false,
'view' => $this->getView(),
]);
I want to add a customize class on the dropdown widget, I am subclassing the Nav
class but I need to copy and paste the whole function of renderItem()
, we can create method such as renderSubitem()