public function renderAjaxBlock(
        \Twig_Environment $environment,
        $controllerName,
        array $controllerParams = array(),
        array $options = array())
    {
        $routeParams = array('_ajaxController' => $controllerName) + $controllerParams;
        $controllerParams[AjaxBlockControllerEventListener::JGP_AJAX_BLOCK_TAG] = true;
        $options = array_merge($this->defaultOptions, $options);

        $variables = array(
            'controllerName' => $controllerName,
            'controllerParams' => $controllerParams,
            'routeName' => 'jgp_ajax_block',
            'routeParams' => $routeParams,
            'autoload' => isset($options['autoload']) && $options['autoload'],
        );

        $template = 'AjaxBlocksBundle::ajax_block.html.twig';
        return $environment->render($template, $variables);
    }
public function renderAjaxBlock(
        \Twig_Environment $environment,
        $controllerName,
        array $controllerParams = array(),
        array $options = array())
    {
        $routeParams = array('_ajaxController' => $controllerName) + $controllerParams;
        $controllerParams[AjaxBlockControllerEventListener::JGP_AJAX_BLOCK_TAG] = true;
        $options = array_merge($this->defaultOptions, $options);

        $variables = array(
            'controllerName' => $controllerName,
            'controllerParams' => $controllerParams,
            'routeName' => 'jgp_ajax_block',
            'routeParams' => $routeParams,
            'autoload' => isset($options['autoload']) && $options['autoload'],
        );

        $template = 'AjaxBlocksBundle::ajax_block.html.twig';
        return $environment->render($template, $variables);
    }
public function renderAjaxBlock ( \ Twig_Environment $ environment , $ controllerName , array $ controllerParams = array ( ) , array $ options = array ( ) ) { $ routeParams = array ( '_ajaxController' => $ controllerName ) + $ controllerParams ; $ controllerParams [ AjaxBlockControllerEventListener :: JGP_AJAX_BLOCK_TAG ] = true ; $ options = array_merge ( $ this -> defaultOptions , $ options ) ; $ variables = array ( 'controllerName' => $ controllerName , 'controllerParams' => $ controllerParams , 'routeName' => 'jgp_ajax_block' , 'routeParams' => $ routeParams , 'autoload' => isset ( $ options [ 'autoload' ] ) && $ options [ 'autoload' ] , ) ; $ template = 'AjaxBlocksBundle::ajax_block.html.twig' ; return $ environment -> render ( $ template , $ variables ) ; }
Renders the ajax block

@param \Twig_Environment $environment
@param string $controllerName
@param array $controllerParams
@param array $options

@return string
Renders the ajax block