findContent() public method

Finds content objects for the given query.
public findContent ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [] ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult
$query eZ\Publish\API\Repository\Values\Content\Query
$languageFilter array - a map of language related filters specifying languages query will be performed on. Also used to define which field languages are loaded for the returned content. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations
return eZ\Publish\API\Repository\Values\Content\Search\SearchResult
 /**
  * Returns all content objects of $contentTypeId
  *
  * @param mixed $contentTypeId
  *
  * @return \eZ\Publish\SPI\Persistence\Content\ContentInfo[]
  */
 protected function loadContentObjects($contentTypeId)
 {
     $result = $this->searchHandler->findContent(new Query(array('filter' => new Criterion\ContentTypeId($contentTypeId))));
     $contentInfo = array();
     foreach ($result->searchHits as $hit) {
         $contentInfo[] = $hit->valueObject;
     }
     return $contentInfo;
 }