Loading Classes/WE/SpreadsheetImport/SpreadsheetImportService.php +21 −2 Original line number Original line Diff line number Diff line Loading @@ -289,6 +289,24 @@ class SpreadsheetImportService { } } } } /** * @param \TYPO3\Flow\Persistence\QueryInterface $query * @param array $constraints */ private function mergeQueryConstraintsWithArguments(QueryInterface $query, &$constraints) { $contextArguments = $this->settings[$this->spreadsheetImport->getContext()]['arguments']; if (is_array($contextArguments)) { foreach ($contextArguments as $contextArgument) { $name = $contextArgument['name']; $arguments = $this->spreadsheetImport->getArguments(); if (array_key_exists($name, $arguments)) { $value = $arguments[$name]; $constraints[] = $query->equals($name, $value); } } } } /** /** * @param array $identifiers * @param array $identifiers * * Loading @@ -296,8 +314,9 @@ class SpreadsheetImportService { */ */ private function findObjectsByExcludedIds(array $identifiers) { private function findObjectsByExcludedIds(array $identifiers) { $query = $this->getDomainRepository()->createQuery(); $query = $this->getDomainRepository()->createQuery(); $constraint = $query->logicalNot($query->in('Persistence_Object_Identifier', $identifiers)); $constraints[] = $query->logicalNot($query->in('Persistence_Object_Identifier', $identifiers)); return $query->matching($constraint)->execute(); $this->mergeQueryConstraintsWithArguments($query, $constraints); return $query->matching($query->logicalAnd($constraints))->execute(); } } /** /** Loading Loading
Classes/WE/SpreadsheetImport/SpreadsheetImportService.php +21 −2 Original line number Original line Diff line number Diff line Loading @@ -289,6 +289,24 @@ class SpreadsheetImportService { } } } } /** * @param \TYPO3\Flow\Persistence\QueryInterface $query * @param array $constraints */ private function mergeQueryConstraintsWithArguments(QueryInterface $query, &$constraints) { $contextArguments = $this->settings[$this->spreadsheetImport->getContext()]['arguments']; if (is_array($contextArguments)) { foreach ($contextArguments as $contextArgument) { $name = $contextArgument['name']; $arguments = $this->spreadsheetImport->getArguments(); if (array_key_exists($name, $arguments)) { $value = $arguments[$name]; $constraints[] = $query->equals($name, $value); } } } } /** /** * @param array $identifiers * @param array $identifiers * * Loading @@ -296,8 +314,9 @@ class SpreadsheetImportService { */ */ private function findObjectsByExcludedIds(array $identifiers) { private function findObjectsByExcludedIds(array $identifiers) { $query = $this->getDomainRepository()->createQuery(); $query = $this->getDomainRepository()->createQuery(); $constraint = $query->logicalNot($query->in('Persistence_Object_Identifier', $identifiers)); $constraints[] = $query->logicalNot($query->in('Persistence_Object_Identifier', $identifiers)); return $query->matching($constraint)->execute(); $this->mergeQueryConstraintsWithArguments($query, $constraints); return $query->matching($query->logicalAnd($constraints))->execute(); } } /** /** Loading