eZ\Publish\Core\Repository\SearchService::internalFindContentInfo PHP Method

internalFindContentInfo() protected method

Internal for use by {@link findContent} and {@link findContentInfo}.
protected internalFindContentInfo ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult
$query eZ\Publish\API\Repository\Values\Content\Query
$languageFilter array - a map of filters for the returned fields. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
$filterOnUserPermissions boolean if true only the objects which is the user allowed to read are returned.
return eZ\Publish\API\Repository\Values\Content\Search\SearchResult With "raw" SPI contentInfo objects in result
    protected function internalFindContentInfo(Query $query, array $languageFilter = array(), $filterOnUserPermissions = true)
    {
        if (!is_int($query->offset)) {
            throw new InvalidArgumentType('$query->offset', 'integer', $query->offset);
        }
        if (!is_int($query->limit)) {
            throw new InvalidArgumentType('$query->limit', 'integer', $query->limit);
        }
        $query = clone $query;
        $query->filter = $query->filter ?: new Criterion\MatchAll();
        $this->validateContentCriteria(array($query->query), '$query');
        $this->validateContentCriteria(array($query->filter), '$query');
        $this->validateContentSortClauses($query);
        if ($filterOnUserPermissions && !$this->permissionsCriterionHandler->addPermissionsCriterion($query->filter)) {
            return new SearchResult(array('time' => 0, 'totalCount' => 0));
        }
        return $this->searchHandler->findContent($query, $languageFilter);
    }