/**
     * render a filter element
     *
     * @param \Sonata\AdminBundle\Filter\FilterInterface $filter
     * @param array $params
     * @return string
     */
    public function renderFilterElement(FilterInterface $filter, array $params = array())
    {
        $fieldDescription = $filter->getFieldDescription();

        $template = $this->getTemplate($fieldDescription, 'SonataAdminBundle:CRUD:base_filter_field.html.twig');

        return $this->output($fieldDescription, $template, array_merge($params, array(
            'filter'        => $filter,
            'filter_form'   => $filter->getField()->createView()
        )));
    }
 /**
  * render a filter element
  *
  * @param \Sonata\AdminBundle\Filter\FilterInterface $filter
  * @param array $params
  * @return
  */
 public function renderFilterElement(FilterInterface $filter, array $params = array())
 {
     $description = $filter->getFieldDescription();
     $template = $this->environment->loadTemplate($description->getTemplate());
     return $template->render(array_merge($params, array('filter' => $filter, 'filter_form' => $filter->getField()->createView())));
 }