public function dropDownList($items, $options = [])
    {
        $view = $this->form->view;
        MaterializePluginAsset::register($view);
        $id = $this->getInputId();

        $js = "M.FormSelect.init(document.querySelector('#$id'))";
        $view->registerJs($js);

        return parent::dropDownList($items, $options);
    }
public function dropDownList($items, $options = [])
    {
        $view = $this->form->view;
        MaterializePluginAsset::register($view);
        $id = $this->getInputId();

        $js = "M.FormSelect.init(document.querySelector('#$id'))";
        $view->registerJs($js);

        return parent::dropDownList($items, $options);
    }
public function dropDownList ( $ items , $ options = [ ] ) { $ view = $ this -> form -> view ; MaterializePluginAsset :: register ( $ view ) ; $ id = $ this -> getInputId ( ) ; $ js = "M.FormSelect.init(document.querySelector('#$id'))" ; $ view -> registerJs ( $ js ) ; return parent :: dropDownList ( $ items , $ options ) ; }
Renders a drop-down list.

@param array $items the option data items
@param array $options the tag options in terms of name-value pairs.

@return $this the field object itself.

@see http://www.yiiframework.com/doc-2.0/yii-widgets-activefield.html#dropDownList()-detail
Renders a drop - down list .