kernel/private/api/content/criteria.php

Show: inherited
Table of Contents

Content list criteria mechanism.

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
API  
Version
4.6.0  

\ezpContentCriteria

Package: API

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

Propertypublic\ezpContentCriteriaSet  $accept= ''

Accept (positive) criteria list

Details
Type
\ezpContentCriteriaSet
Propertypublic\ezpContentCriteriaSet  $deny= ''

Deny (negative) criteria list

Details
Type
\ezpContentCriteriaSet

Methods

methodpublic__callStatic( string $method, array $arguments ) : void
static

Static method magic method Handles requests for custom criteria

Parameters
Name Type Description
$method string

Custom criteria name

$arguments array

Custom criteria arguments

methodpublic__construct( ) : void

methodpublic__toString( ) : void

Human readable string representation of the criteria, for debugging purpose

methodpubliccontentClass( ) : \ezpContentClassCriteria
static

Creates a content class criteria

Returns
Type Description
\ezpContentClassCriteria
methodpubliccustom( string $method,  $arguments ) : \ezpContentCriteriaInterface
static

Custom criteria factory.

Parameters
Name Type Description
$method string
$arguments
Returns
Type Description
\ezpContentCriteriaInterface
Details
Note
This is a PHP < 5.3 replacement for __callStatic. Use the static call if you use PHP 5.3+  
methodpublicdepth( int $depth = 1 ) : void
static

Creates a depth criteria

Parameters
Name Type Description
$depth int

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

methodpublicfield( mixed $fieldIdentifier ) : \ezpContentFieldCriteria
static

Creates a field criteria

Parameters
Name Type Description
$fieldIdentifier mixed
Returns
Type Description
\ezpContentFieldCriteria
methodpubliclimit( ) : \ezpContentLimitCriteria
static

Creates a limit criteria

Returns
Type Description
\ezpContentLimitCriteria
methodpubliclocation( ) : \ezpContentLocationCriteria
static

Creates a location criteria

Returns
Type Description
\ezpContentLocationCriteria
methodpublicsorting( string $sortKey,  $sortOrder ) : \ezpContentSortingCriteria
static

Creates a sorting criteria

Parameters
Name Type Description
$sortKey string

The sort key. Only non-attribute keys are supported (see {@link http://goo.gl/xvJMM})

$sortOrder
Returns
Type Description
\ezpContentSortingCriteria
Documentation was generated by DocBlox 0.18.1.