Ejemplo n.º 1
0
 /**
  * Returns node by the specified node type
  *
  * @param string $nodeType Type of node to be searched.
  * @param array  $ignoreNodes Array of node paths which need to be ignored.
  * @return \TYPO3\Flow\Persistence\QueryResultInterface
  */
 public function findByNodeTypeAndCurrentSite($nodeType, $ignoreNodes = NULL)
 {
     if ($ignoreNodes === NULL) {
         $ignoreNodes[] = '';
     }
     $query = $this->nodeDataRepository->createQuery();
     $constraints = array($query->equals('nodeType', $nodeType), $query->logicalNot($query->in('path', $ignoreNodes)));
     return $query->matching($query->logicalAnd($constraints))->execute();
 }