Browse Source

Allow multilevel dropdown.

tags/2.0.0-beta
Thiago Talma 11 years ago
parent
commit
dfd6e56306
  1. 4
      Dropdown.php

4
Dropdown.php

@ -84,6 +84,10 @@ class Dropdown extends Widget
$linkOptions = ArrayHelper::getValue($item, 'linkOptions', []);
$linkOptions['tabindex'] = '-1';
$content = Html::a($label, ArrayHelper::getValue($item, 'url', '#'), $linkOptions);
if (isset($item['items']) && is_array($item['items'])) {
$content .= $this->renderItems($item['items']);
Html::addCssClass($options, 'dropdown-submenu');
}
$lines[] = Html::tag('li', $content, $options);
}

Loading…
Cancel
Save