original_string: 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']);
  
          }
      }
code: 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']);
  
          }
      }
code_tokens: 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' ] ) ; } }
docstring: 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
docstring_tokens: alter the query with selected filters .