Export/ExportManager.php
private function handleFilters(
            ExportInterface $export, 
            QueryBuilder $qb, 
            $data, 
            array $centers)
    {
        $filters = $this->retrieveUsedFilters($data);
                
        foreach($filters as $alias => $filter) {
            if ($this->isGrantedForElement($filter, $export, $centers) === false) {
                throw new UnauthorizedHttpException("You are not authorized to "
                        . "use the filter ".$filter->getTitle());
            }
            
            $formData = $data[$alias];

            $this->logger->debug('alter query by filter '.$alias, array(
                'class' => self::class, 'function' => __FUNCTION__
            ));
            $filter->alterQuery($qb, $formData['form']);

        }
    }
private function handleFilters(
            ExportInterface $export, 
            QueryBuilder $qb, 
            $data, 
            array $centers)
    {
        $filters = $this->retrieveUsedFilters($data);
                
        foreach($filters as $alias => $filter) {
            if ($this->isGrantedForElement($filter, $export, $centers) === false) {
                throw new UnauthorizedHttpException("You are not authorized to "
                        . "use the filter ".$filter->getTitle());
            }
            
            $formData = $data[$alias];

            $this->logger->debug('alter query by filter '.$alias, array(
                'class' => self::class, 'function' => __FUNCTION__
            ));
            $filter->alterQuery($qb, $formData['form']);

        }
    }
private function handleFilters ( ExportInterface $ export , QueryBuilder $ qb , $ data , array $ centers ) { $ filters = $ this -> retrieveUsedFilters ( $ data ) ; foreach ( $ filters as $ alias => $ filter ) { if ( $ this -> isGrantedForElement ( $ filter , $ export , $ centers ) === false ) { throw new UnauthorizedHttpException ( "You are not authorized to " . "use the filter " . $ filter -> getTitle ( ) ) ; } $ formData = $ data [ $ alias ] ; $ this -> logger -> debug ( 'alter query by filter ' . $ alias , array ( 'class' => self :: class , 'function' => __FUNCTION__ ) ) ; $ filter -> alterQuery ( $ qb , $ formData [ 'form' ] ) ; } }
alter the query with selected filters.

This function check the acl.

@param ExportInterface $export
@param QueryBuilder $qb
@param mixed $data the data under the initial 'filters' data
@param \Chill\MainBundle\Entity\Center[] $centers the picked centers
@throw UnauthorizedHttpException if the user is not authorized
alter the query with selected filters .