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->addPermissionsCriterion($query->filter)) {
            return new SearchResult(array('time' => 0, 'totalCount' => 0));
        }

        return $this->searchHandler->findContent($query, $languageFilter);
    }
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->addPermissionsCriterion($query->filter)) {
            return new SearchResult(array('time' => 0, 'totalCount' => 0));
        }

        return $this->searchHandler->findContent($query, $languageFilter);
    }
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 -> addPermissionsCriterion ( $ query -> filter ) ) { return new SearchResult ( array ( 'time' => 0 , 'totalCount' => 0 ) ) ; } return $ this -> searchHandler -> findContent ( $ query , $ languageFilter ) ; }
Finds SPI content info objects for the given query.

Internal for use by {@link findContent} and {@link findContentInfo}.

@throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if query is not valid

@param \eZ\Publish\API\Repository\Values\Content\Query $query
@param array $languageFilter - a map of filters for the returned fields.
Currently supports: <code>array("languages" => array(<language1>,..), "useAlwaysAvailable" => bool)</code>
useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
@param bool $filterOnUserPermissions 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
Finds SPI content info objects for the given query .