eZ\Publish\Core\Search\Legacy\Content\Location\Gateway::find PHP Method

find() abstract public method

Returns total count and data for all Locations satisfying the parameters.
abstract public find ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion, integer $offset, integer $limit, array $sortClauses = null, array $languageFilter = [], boolean $doCount = true ) : mixed[][]
$criterion eZ\Publish\API\Repository\Values\Content\Query\Criterion
$offset integer
$limit integer
$sortClauses array
$languageFilter array
$doCount boolean
return mixed[][]
    public abstract function find(Criterion $criterion, $offset, $limit, array $sortClauses = null, array $languageFilter = array(), $doCount = true);

Usage Example

 /**
  * Returns total count and data for all Locations satisfying the parameters.
  *
  * @param \eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion
  * @param int $offset
  * @param int|null $limit
  * @param \eZ\Publish\API\Repository\Values\Content\Query\SortClause[] $sortClauses
  * @param array $languageFilter
  * @param bool $doCount
  *
  * @throws \RuntimeException
  *
  * @return mixed[][]
  */
 public function find(Criterion $criterion, $offset = 0, $limit = null, array $sortClauses = null, array $languageFilter = array(), $doCount = true)
 {
     try {
         return $this->innerGateway->find($criterion, $offset, $limit, $sortClauses, $languageFilter, $doCount);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
All Usage Examples Of eZ\Publish\Core\Search\Legacy\Content\Location\Gateway::find
Gateway