/**
  * @param ParameterBag $query
  * @param QueryConfigurationBuilder $builder
  * @param ColumnConfiguration[] $columnConfiguration
  */
 private function getOrder(ParameterBag $query, QueryConfigurationBuilder $builder, array $columnConfiguration)
 {
     //loop over the order
     if ($query->has('order')) {
         $order = $query->get('order');
         foreach ($order as $i => $config) {
             if (array_key_exists($config['column'], $columnConfiguration)) {
                 $column = $columnConfiguration[$config['column']];
                 if ($column->getOrder()->isOrderable()) {
                     $builder->columnOrder($column->getName(), $config['dir']);
                 }
             }
         }
     }
 }
 /**
  * @param ParameterBag $query
  * @param QueryConfigurationBuilder $builder
  */
 public function getSearchColumns($query, $builder, array $columnConfiguration)
 {
     // for each column we need to see if there is a search value
     foreach ($columnConfiguration as $i => $c) {
         // check if there is something search related
         if ($c->getSearch()->isSearchable() && $query->has("sSearch_" . $i) && !$this->isEmpty($query->get("sSearch_" . $i))) {
             // search for this column is available
             $builder->columnSearch($c->getName(), $query->get("sSearch_" . $i));
         }
         // check if there is something order related
         if ($c->getOrder()->isOrderable() && $query->has("iSortCol_" . $i) && !$this->isEmpty($query->get("iSortCol_" . $i))) {
             // order for this column is available
             $builder->columnOrder($c->getName(), $query->get("sSortDir_" . $i));
         }
     }
 }