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);
    }