Skip to content

Commit

Permalink
Merge branch '3.3' into 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mficzel committed Apr 26, 2019
2 parents f094fd2 + 29f7d3a commit fe4ac1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Classes/Domain/Model/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public function getIndex()
/**
* Returns the parent node of this node
*
* @return NodeInterface The parent node or NULL if this is the root node
* @return NodeInterface|null The parent node or NULL if this is the root node
* @api
*/
public function getParent()
Expand Down
12 changes: 6 additions & 6 deletions Classes/Domain/Repository/NodeDataRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -1132,13 +1132,13 @@ protected function getNodeTypeFilterConstraintsForDql($nodeTypeFilter = '')
} else {
$negate = false;
}
$nodeTypeFilterPartSubTypes = array_merge([$nodeTypeFilterPart], $this->nodeTypeManager->getSubNodeTypes($nodeTypeFilterPart));
$nodeTypeFilterPartSubTypes = array_merge([$this->nodeTypeManager->getNodeType($nodeTypeFilterPart)], $this->nodeTypeManager->getSubNodeTypes($nodeTypeFilterPart));

foreach ($nodeTypeFilterPartSubTypes as $nodeTypeFilterPartSubType) {
if ($negate === true) {
$constraints['excludeNodeTypes'][] = $nodeTypeFilterPartSubType;
$constraints['excludeNodeTypes'][] = $nodeTypeFilterPartSubType->getName();
} else {
$constraints['includeNodeTypes'][] = $nodeTypeFilterPartSubType;
$constraints['includeNodeTypes'][] = $nodeTypeFilterPartSubType->getName();
}
}
}
Expand All @@ -1164,13 +1164,13 @@ protected function getNodeTypeFilterConstraints(QueryInterface $query, $nodeType
} else {
$negate = false;
}
$nodeTypeFilterPartSubTypes = array_merge([$nodeTypeFilterPart], $this->nodeTypeManager->getSubNodeTypes($nodeTypeFilterPart, false));
$nodeTypeFilterPartSubTypes = array_merge([$this->nodeTypeManager->getNodeType($nodeTypeFilterPart)], $this->nodeTypeManager->getSubNodeTypes($nodeTypeFilterPart, false));

foreach ($nodeTypeFilterPartSubTypes as $nodeTypeFilterPartSubType) {
if ($negate === true) {
$excludeNodeTypeConstraints[] = $query->logicalNot($query->equals('nodeType', $nodeTypeFilterPartSubType));
$excludeNodeTypeConstraints[] = $query->logicalNot($query->equals('nodeType', $nodeTypeFilterPartSubType->getName()));
} else {
$includeNodeTypeConstraints[] = $query->equals('nodeType', $nodeTypeFilterPartSubType);
$includeNodeTypeConstraints[] = $query->equals('nodeType', $nodeTypeFilterPartSubType->getName());
}
}
}
Expand Down

0 comments on commit fe4ac1a

Please sign in to comment.