public function findByParentWithoutReduce($parentPath, Workspace $workspace)
{
$parentPath = strtolower($parentPath);
$workspaces = $this->collectWorkspaceAndAllBaseWorkspaces($workspace);
$queryBuilder = $this->createQueryBuilder($workspaces);
$this->addParentPathConstraintToQueryBuilder($queryBuilder, $parentPath);
$query = $queryBuilder->getQuery();
$foundNodes = $query->getResult();
$childNodeDepth = NodePaths::getPathDepth($parentPath) + 1;
/** @var $addedNode NodeData */
foreach ($this->addedNodes as $addedNode) {
if ($addedNode->getDepth() === $childNodeDepth && NodePaths::getParentPath($addedNode->getPath()) === $parentPath && in_array($addedNode->getWorkspace(), $workspaces)) {
$foundNodes[] = $addedNode;
}
}
/** @var $removedNode NodeData */
foreach ($this->removedNodes as $removedNode) {
if ($removedNode->getDepth() === $childNodeDepth && NodePaths::getParentPath($removedNode->getPath()) === $parentPath && in_array($removedNode->getWorkspace(), $workspaces)) {
$foundNodes = array_filter($foundNodes, function ($nodeData) use($removedNode) {
return $nodeData !== $removedNode;
});
}
}
return $foundNodes;
}