Bundle/CoreBundle/Menu/MenuBuilder.php
public function createDropdownMenuItem(ItemInterface $rootItem, $title, $attributes = [], $caret = true)
    {
        // Add child to dropdown, still normal KnpMenu usage
        $options = array_merge(
            [
                'dropdown'           => true,
                'childrenAttributes' => [
                    'class' => 'vic-dropdown-menu',
                ],
                'attributes' => [
                    'class'       => 'vic-dropdown',
                    'data-toggle' => 'vic-dropdown',
                ],
                'linkAttributes' => [
                    'class'       => 'vic-dropdown-toggle',
                    'data-toggle' => 'vic-dropdown',
                ],
                'uri' => '#',
            ],
            $attributes
        );

        $menu = $rootItem->addChild($title, $options)->setExtra('caret', $caret);

        return $menu;
    }
public function createDropdownMenuItem(ItemInterface $rootItem, $title, $attributes = [], $caret = true)
    {
        // Add child to dropdown, still normal KnpMenu usage
        $options = array_merge(
            [
                'dropdown'           => true,
                'childrenAttributes' => [
                    'class' => 'vic-dropdown-menu',
                ],
                'attributes' => [
                    'class'       => 'vic-dropdown',
                    'data-toggle' => 'vic-dropdown',
                ],
                'linkAttributes' => [
                    'class'       => 'vic-dropdown-toggle',
                    'data-toggle' => 'vic-dropdown',
                ],
                'uri' => '#',
            ],
            $attributes
        );

        $menu = $rootItem->addChild($title, $options)->setExtra('caret', $caret);

        return $menu;
    }
public function createDropdownMenuItem ( ItemInterface $ rootItem , $ title , $ attributes = [ ] , $ caret = true ) { // Add child to dropdown, still normal KnpMenu usage $ options = array_merge ( [ 'dropdown' => true , 'childrenAttributes' => [ 'class' => 'vic-dropdown-menu' , ] , 'attributes' => [ 'class' => 'vic-dropdown' , 'data-toggle' => 'vic-dropdown' , ] , 'linkAttributes' => [ 'class' => 'vic-dropdown-toggle' , 'data-toggle' => 'vic-dropdown' , ] , 'uri' => '#' , ] , $ attributes ) ; $ menu = $ rootItem -> addChild ( $ title , $ options ) -> setExtra ( 'caret' , $ caret ) ; return $ menu ; }
Create the dropdown menu.

@param ItemInterface $rootItem
@param string        $title
@param array         $attributes
@param bool          $caret

@return \Knp\Menu\ItemInterface
Create the dropdown menu .