Bundle/WidgetBundle/Helper/WidgetHelper.php
public function newWidgetInstance($type, $view, $slot, $mode)
    {
        $widgetAlias = 'victoire.widget.'.strtolower($type);
        $widget = $this->container->get($widgetAlias);

        $widget->setMode($mode);

        return $widget;
    }
public function newWidgetInstance($type, $view, $slot, $mode)
    {
        $widgetAlias = 'victoire.widget.'.strtolower($type);
        $widget = $this->container->get($widgetAlias);

        $widget->setMode($mode);

        return $widget;
    }
public function newWidgetInstance ( $ type , $ view , $ slot , $ mode ) { $ widgetAlias = 'victoire.widget.' . strtolower ( $ type ) ; $ widget = $ this -> container -> get ( $ widgetAlias ) ; $ widget -> setMode ( $ mode ) ; return $ widget ; }
create a new WidgetRedactor.

@param string                                  $type
@param \Victoire\Bundle\CoreBundle\Entity\View $view
@param string                                  $slot
@param string                                  $mode

@return Widget $widget
create a new WidgetRedactor .