protected function createFactory(array $defaultRouteParams, array $routeParams = array(), array $extra = array())
    {
        //@todo How to pass route params ?
        //1. remove factory from service and create new instance here ?
        //2. clone factory and replace route params (faster?)
        //3. add parameters to options array
        //4. remove per item routeParams, use only per menu defaultRouteParams
        $factory = clone $this->factory;

        $this->addVoter();

        $factory
            ->setDefaultRouteParameters($defaultRouteParams)
            ->setRouteParameters($routeParams)
            ->setDefaultExtraParameters($extra)
        ;

        return $factory;
    }
protected function createFactory(array $defaultRouteParams, array $routeParams = array(), array $extra = array())
    {
        //@todo How to pass route params ?
        //1. remove factory from service and create new instance here ?
        //2. clone factory and replace route params (faster?)
        //3. add parameters to options array
        //4. remove per item routeParams, use only per menu defaultRouteParams
        $factory = clone $this->factory;

        $this->addVoter();

        $factory
            ->setDefaultRouteParameters($defaultRouteParams)
            ->setRouteParameters($routeParams)
            ->setDefaultExtraParameters($extra)
        ;

        return $factory;
    }
protected function createFactory ( array $ defaultRouteParams , array $ routeParams = array ( ) , array $ extra = array ( ) ) { //@todo How to pass route params ? //1. remove factory from service and create new instance here ? //2. clone factory and replace route params (faster?) //3. add parameters to options array //4. remove per item routeParams, use only per menu defaultRouteParams $ factory = clone $ this -> factory ; $ this -> addVoter ( ) ; $ factory -> setDefaultRouteParameters ( $ defaultRouteParams ) -> setRouteParameters ( $ routeParams ) -> setDefaultExtraParameters ( $ extra ) ; return $ factory ; }
Create and setup menu item creation factory

@param  array $defaultRouteParams
@param  array|[] $routeParams
@param  array $extra
@return MenuFactoryInterface
Create and setup menu item creation factory