src/widget/Dropdown.php
public function init()
    {
        parent::init();
        if($this->type){
            $class = ($this->type == self::DROPDOWN) ? 'dropdown-menu' : 'treeview-menu';
            Html::addCssClass($this->options,$class);
        }else{
            Html::addCssClass($this->options, 'dropdown-menu');   
        }
    }
public function init()
    {
        parent::init();
        if($this->type){
            $class = ($this->type == self::DROPDOWN) ? 'dropdown-menu' : 'treeview-menu';
            Html::addCssClass($this->options,$class);
        }else{
            Html::addCssClass($this->options, 'dropdown-menu');   
        }
    }
public function init ( ) { parent :: init ( ) ; if ( $ this -> type ) { $ class = ( $ this -> type == self :: DROPDOWN ) ? 'dropdown-menu' : 'treeview-menu' ; Html :: addCssClass ( $ this -> options , $ class ) ; } else { Html :: addCssClass ( $ this -> options , 'dropdown-menu' ) ; } }
Initializes the widget.
If you override this method, make sure you call the parent implementation first.
Initializes the widget . If you override this method make sure you call the parent implementation first .