For example, php Please make sure that you provide the trigger with a data-activates attribute and specify the value of this attribute in the [[toggleTarget]] property of the widget.
See also: http://materializecss.com/navbar.html#navbar-dropdown
Author: Christoph Erdmann (yii2-materializecss@pluspunkt-coding.de)
Inheritance: extends macgyer\yii2materializecss\lib\BaseWidget
Example #1
0
 /**
  * Renders the given items as a dropdown.
  * This method is called to create sub-menus.
  * @param array $items the given items. Please refer to [[Dropdown::items]] for the array structure.
  * @param array $parentItem the parent item information. Please refer to [[items]] for the structure of this array.
  * @param string $targetId the dropdown id
  * @return string the rendering result.
  * @throws \Exception
  * @since 2.0.1
  *
  * @see http://materializecss.com/navbar.html#navbar-dropdown
  */
 protected function renderDropdown($items, $parentItem, $targetId)
 {
     return Dropdown::widget(['toggleTarget' => $targetId, 'options' => ArrayHelper::getValue($parentItem, 'dropDownOptions', []), 'items' => $items, 'encodeLabels' => $this->encodeLabels, 'clientOptions' => false, 'view' => $this->getView()]);
 }