コード例 #1
0
 /**
  * Search all properties for given $term
  * @param string $term
  * @param array $searchContentTypes
  * @return \TYPO3\FLOW3\Persistence\QueryResultInterface
  */
 public function findByProperties($term, array $searchContentTypes)
 {
     // TODO: Implement a better search when FLOW3 offer the possibility
     $query = $this->nodeRepository->createQuery();
     $constraints = array($query->like('properties', '%' . $term . '%'), $query->in('contentType', $searchContentTypes));
     return $query->matching($query->logicalAnd($constraints))->execute();
 }