public function renderAsDropdown($plugin, array $titleOptions = [])
    {
        return array_map(function ($menu) use ($titleOptions) {
            $titleOptions = optionsParser($menu['titleOptions'], $titleOptions);
            $links = $this->buildLinks($menu['links'], ['class' => 'dropdown-item']);

            return $this->Dropdown->menu($menu['title'], $links, $titleOptions->toArray());
        }, $this->generate($plugin));
    }
public function renderAsDropdown($plugin, array $titleOptions = [])
    {
        return array_map(function ($menu) use ($titleOptions) {
            $titleOptions = optionsParser($menu['titleOptions'], $titleOptions);
            $links = $this->buildLinks($menu['links'], ['class' => 'dropdown-item']);

            return $this->Dropdown->menu($menu['title'], $links, $titleOptions->toArray());
        }, $this->generate($plugin));
    }
public function renderAsDropdown ( $ plugin , array $ titleOptions = [ ] ) { return array_map ( function ( $ menu ) use ( $ titleOptions ) { $ titleOptions = optionsParser ( $ menu [ 'titleOptions' ] , $ titleOptions ) ; $ links = $ this -> buildLinks ( $ menu [ 'links' ] , [ 'class' => 'dropdown-item' ] ) ; return $ this -> Dropdown -> menu ( $ menu [ 'title' ] , $ links , $ titleOptions -> toArray ( ) ) ; } , $ this -> generate ( $ plugin ) ) ; }
Renders a menu as "dropdown"
@param string $plugin Plugin name
@param array $titleOptions HTML attributes of the title
@return array
@uses buildLinks()
@uses generate()
Renders a menu as dropdown