src/Kunstmaan/AdminListBundle/Twig/AdminListTwigExtension.php
public function renderWidget(Twig_Environment $env, AdminList $view, $basepath, array $urlparams = [], array $addparams = [])
    {
        $filterBuilder = $view->getFilterBuilder();

        return $env->render(
            'KunstmaanAdminListBundle:AdminListTwigExtension:widget.html.twig',
            [
                'filter' => $filterBuilder,
                'basepath' => $basepath,
                'addparams' => $addparams,
                'extraparams' => $urlparams,
                'adminlist' => $view,
            ]
        );
    }
public function renderWidget(Twig_Environment $env, AdminList $view, $basepath, array $urlparams = [], array $addparams = [])
    {
        $filterBuilder = $view->getFilterBuilder();

        return $env->render(
            'KunstmaanAdminListBundle:AdminListTwigExtension:widget.html.twig',
            [
                'filter' => $filterBuilder,
                'basepath' => $basepath,
                'addparams' => $addparams,
                'extraparams' => $urlparams,
                'adminlist' => $view,
            ]
        );
    }
public function renderWidget ( Twig_Environment $ env , AdminList $ view , $ basepath , array $ urlparams = [ ] , array $ addparams = [ ] ) { $ filterBuilder = $ view -> getFilterBuilder ( ) ; return $ env -> render ( 'KunstmaanAdminListBundle:AdminListTwigExtension:widget.html.twig' , [ 'filter' => $ filterBuilder , 'basepath' => $ basepath , 'addparams' => $ addparams , 'extraparams' => $ urlparams , 'adminlist' => $ view , ] ) ; }
Renders the HTML for a given view

Example usage in Twig:

{{ form_widget(view) }}

You can pass options during the call:

{{ form_widget(view, {'attr': {'class': 'foo'}}) }}

{{ form_widget(view, {'separator': '+++++'}) }}

@param Twig_Environment $env
@param AdminList        $view      The view to render
@param string           $basepath  The base path
@param array            $urlparams Additional url params
@param array            $addparams Add params

@return string The html markup

@throws \Throwable
@throws \Twig_Error_Loader
@throws \Twig_Error_Runtime
@throws \Twig_Error_Syntax
Renders the HTML for a given view