コード例 #1
0
 protected function buildOperation(Fetcher $fetcher)
 {
     $rootOperation = $fetcher->getRootOperation();
     $operations = $rootOperation->getOperations();
     //We replace the operator by the groupName value from the fetcher
     foreach ($operations as $operation) {
         if ($operation instanceof ListOperation) {
             $realFilterOperator = $fetcher->getRealFilterOperator($operation->getGroupName());
             if ($realFilterOperator != null) {
                 $operation->setOperator($realFilterOperator);
             }
         }
     }
     //We replace the operator by the main operator value from the fetcher
     $rootOperation->setOperator($fetcher->getMainOperator());
     return $this->getOperationAsArray($rootOperation);
 }