PHP 클래스 Craft\Neo_CriteriaModel

상속: extends craft\ElementCriteriaModel
파일 보기 프로젝트 열기: benjamminf/craft-neo

보호된 프로퍼티들

프로퍼티 타입 설명
$filterOrder array This is important as changing the order can affect the results of certain filters, such as limit and offset. It also allows increased performance by allowing filters with high filtering potential to be run earlier.

공개 메소드들

메소드 설명
__construct ( array | null $attributes = null ) Initialises the criteria model, forcing the element type to be a Neo block.
copy ( ) : Neo_CriteriaModel Returns a clone of the criteria model.
count ( ) : integer Returns the total number of elements matched by this criteria.
setAllElements ( array $elements ) Sets all the elements (blocks) to be filtered against in Live Preview mode.
setAttribute ( string $name, mixed $value ) : boolean Sets a filter value for the criteria model, then reruns Live Preview filtering.

보호된 메소드들

메소드 설명
__ancestorDist ( array $elements, integer $value ) : array
__ancestorOf ( array $elements, Neo_BlockModel $value ) : array
__collapsed ( array $elements, Neo_BlockModel $value ) : array
__descendantDist ( array $elements, integer $value ) : array
__descendantOf ( array $elements, Neo_BlockModel $value ) : array
__fieldId ( array $elements, integer $value ) : array
__id ( array $elements, integer $value ) : array
__level ( array $elements, integer $value ) : array
__limit ( array $elements, integer $value ) : array
__nextSiblingOf ( array $elements, int\Neo_BlockModel $value ) : array
__offset ( array $elements, integer $value ) : array
__positionedAfter ( array $elements, int\Neo_BlockModel $value ) : array
__positionedBefore ( array $elements, int\Neo_BlockModel $value ) : array
__prevSiblingOf ( array $elements, int\Neo_BlockModel $value ) : array
__relatedTo ( array $elements, $value ) : array
__search ( array $elements, $value ) : array
__siblingOf ( array $elements, int\Neo_BlockModel $value ) : array
__status ( array $elements, Neo_BlockModel $value ) : array
__type ( array $elements, string $value ) : array
__typeId ( array $elements, integer $value ) : array
getState ( ) : array Returns all saved, private settings for the criteria model, to be used when copying.
setState ( array\Neo_CriteriaModel $state ) Sets all saved, private settings to the criteria model, to be used when copying.

비공개 메소드들

메소드 설명
_compareInt ( integer $value, string\int $comparison ) : boolean Compares an integer against a criteria model integer comparison string, or integer.
_getBlock ( int\Neo_BlockModel $block ) : bool\Neo_BlockModel Returns a block model given an ID, or an actual block model.
_indexOfBlock ( array $elements, Neo_BlockModel $block ) : integer Finds the position of a block inside a list of blocks.
_indexOfRootBlock ( array $elements, Neo_BlockModel $block ) : integer Finds the position of the block who is it's furthest ancestor to the passed block.
_runCriteria ( ) Runs Live Preview filtering and saves it's output to the criteria model.

메소드 상세

__ancestorDist() 보호된 메소드

protected __ancestorDist ( array $elements, integer $value ) : array
$elements array
$value integer
리턴 array

__ancestorOf() 보호된 메소드

protected __ancestorOf ( array $elements, Neo_BlockModel $value ) : array
$elements array
$value Neo_BlockModel
리턴 array

__collapsed() 보호된 메소드

protected __collapsed ( array $elements, Neo_BlockModel $value ) : array
$elements array
$value Neo_BlockModel
리턴 array

__construct() 공개 메소드

Initialises the criteria model, forcing the element type to be a Neo block.
public __construct ( array | null $attributes = null )
$attributes array | null

__descendantDist() 보호된 메소드

protected __descendantDist ( array $elements, integer $value ) : array
$elements array
$value integer
리턴 array

__descendantOf() 보호된 메소드

protected __descendantOf ( array $elements, Neo_BlockModel $value ) : array
$elements array
$value Neo_BlockModel
리턴 array

__fieldId() 보호된 메소드

protected __fieldId ( array $elements, integer $value ) : array
$elements array
$value integer
리턴 array

__id() 보호된 메소드

protected __id ( array $elements, integer $value ) : array
$elements array
$value integer
리턴 array

__level() 보호된 메소드

protected __level ( array $elements, integer $value ) : array
$elements array
$value integer
리턴 array

__limit() 보호된 메소드

protected __limit ( array $elements, integer $value ) : array
$elements array
$value integer
리턴 array

__nextSiblingOf() 보호된 메소드

protected __nextSiblingOf ( array $elements, int\Neo_BlockModel $value ) : array
$elements array
$value int\Neo_BlockModel
리턴 array

__offset() 보호된 메소드

protected __offset ( array $elements, integer $value ) : array
$elements array
$value integer
리턴 array

__positionedAfter() 보호된 메소드

protected __positionedAfter ( array $elements, int\Neo_BlockModel $value ) : array
$elements array
$value int\Neo_BlockModel
리턴 array

__positionedBefore() 보호된 메소드

protected __positionedBefore ( array $elements, int\Neo_BlockModel $value ) : array
$elements array
$value int\Neo_BlockModel
리턴 array

__prevSiblingOf() 보호된 메소드

protected __prevSiblingOf ( array $elements, int\Neo_BlockModel $value ) : array
$elements array
$value int\Neo_BlockModel
리턴 array

__relatedTo() 보호된 메소드

protected __relatedTo ( array $elements, $value ) : array
$elements array
$value
리턴 array

__siblingOf() 보호된 메소드

protected __siblingOf ( array $elements, int\Neo_BlockModel $value ) : array
$elements array
$value int\Neo_BlockModel
리턴 array

__status() 보호된 메소드

protected __status ( array $elements, Neo_BlockModel $value ) : array
$elements array
$value Neo_BlockModel
리턴 array

__type() 보호된 메소드

protected __type ( array $elements, string $value ) : array
$elements array
$value string
리턴 array

__typeId() 보호된 메소드

protected __typeId ( array $elements, integer $value ) : array
$elements array
$value integer
리턴 array

copy() 공개 메소드

Returns a clone of the criteria model.
public copy ( ) : Neo_CriteriaModel
리턴 Neo_CriteriaModel

count() 공개 메소드

Fixes live preview mode which broke in Craft 2.6.2793 due to this method. If live preview mode is detected, it uses the old method which worked in live preview mode.
public count ( ) : integer
리턴 integer

getState() 보호된 메소드

Returns all saved, private settings for the criteria model, to be used when copying.
protected getState ( ) : array
리턴 array

setAllElements() 공개 메소드

This becomes the main data source for Live Preview, instead of the database.
public setAllElements ( array $elements )
$elements array

setAttribute() 공개 메소드

Sets a filter value for the criteria model, then reruns Live Preview filtering.
public setAttribute ( string $name, mixed $value ) : boolean
$name string
$value mixed
리턴 boolean

setState() 보호된 메소드

Sets all saved, private settings to the criteria model, to be used when copying.
protected setState ( array\Neo_CriteriaModel $state )
$state array\Neo_CriteriaModel

프로퍼티 상세

$filterOrder 보호되어 있는 프로퍼티

This is important as changing the order can affect the results of certain filters, such as limit and offset. It also allows increased performance by allowing filters with high filtering potential to be run earlier.
protected array $filterOrder
리턴 array