Class

ezpContentCriteria

class ezpContentCriteria

This class is used to instantiate and manipulate content listing criterias.

Each returned criteria will have its own particular filtering methods, as seen in the example below

Example: $criteria = new ezpContentCriteria(); $criteria->accept[] = ezpContentCriteria::location->subtree( ezpContentLocation::fromUrl( ‘/articles’ ) ); $criteria->accept[] = ezpContentCriteria::field( 'title' )->like( 'foo' ); $criteria->accept[] = ezpContentCriteria::field( 'summary' )->startsWith( 'abc' ); $criteria->deny[] = ezpContentCriteria::field( 'title' )->startsWith( 'excludedString' ); $articles = ezpRepository::query( $criteria )

Properties

ezpContentCriteriaSet $accept Accept (positive) criteria list
ezpContentCriteriaSet $deny Deny (negative) criteria list

Methods

__construct()

static ezpContentLocationCriteria location()

Creates a location criteria

static ezpContentFieldCriteria field(mixed $fieldIdentifier)

Creates a field criteria

static ezpContentClassCriteria contentClass()

Creates a content class criteria

static ezpContentLimitCriteria limit()

Creates a limit criteria

static ezpContentSortingCriteria sorting($sortKey, $sortOrder)

Creates a sorting criteria

static  depth(int $depth = 1)

Creates a depth criteria

static  __callStatic(string $method, array $arguments)

Static method magic method Handles requests for custom criteria

static ezpContentCriteriaInterface custom($method, $arguments)

Custom criteria factory.

__toString()

Human readable string representation of the criteria, for debugging purpose

Details

at line 29
public __construct()

at line 39
static public ezpContentLocationCriteria location()

Creates a location criteria

at line 49
static public ezpContentFieldCriteria field(mixed $fieldIdentifier)

Creates a field criteria

Parameters

mixed $fieldIdentifier

Return Value

ezpContentFieldCriteria

at line 58
static public ezpContentClassCriteria contentClass()

Creates a content class criteria

at line 67
static public ezpContentLimitCriteria limit()

Creates a limit criteria

at line 77
static public ezpContentSortingCriteria sorting($sortKey, $sortOrder)

Creates a sorting criteria

Parameters

$sortKey
$sortOrder

Return Value

ezpContentSortingCriteria

at line 86
static public depth(int $depth = 1)

Creates a depth criteria

Parameters

int $depth The maximum level of depth that should be explored (1 by default)

at line 98
static public __callStatic(string $method, array $arguments)

Static method magic method Handles requests for custom criteria

Parameters

string $method Custom criteria name
array $arguments Custom criteria arguments

at line 110
static public ezpContentCriteriaInterface custom($method, $arguments)

Custom criteria factory.

Parameters

$method
$arguments

Return Value

ezpContentCriteriaInterface

at line 117
public __toString()

Human readable string representation of the criteria, for debugging purpose