/** * @param ContextInterface $context * @throws InvalidConfigurationException */ public function setImportExportContext(ContextInterface $context) { $this->context = $context; $queryBuilder = $context->getOption('queryBuilder'); if (isset($queryBuilder) && $this->dataConverter instanceof QueryBuilderAwareInterface) { if (!$queryBuilder instanceof QueryBuilder) { throw new InvalidConfigurationException(sprintf('Configuration of processor contains invalid "queryBuilder" option. ' . '"Doctrine\\ORM\\QueryBuilder" type is expected, but "%s" is given', is_object($queryBuilder) ? get_class($queryBuilder) : gettype($queryBuilder))); } $this->dataConverter->setQueryBuilder($queryBuilder); } if ($this->dataConverter && $this->dataConverter instanceof ContextAwareInterface) { $this->dataConverter->setImportExportContext($context); } }