PHP 클래스 ValidationLogicCriteria, silverstripe-zenvalidator

상속: extends Object
파일 보기 프로젝트 열기: sheadawson/silverstripe-zenvalidator 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$criteria array A list of {@link ValidationLogicCriterion} objects
$logicalOperator string Either "and" or "or", determines disjunctive or conjunctive logic for the whole criteria set
$master string The name of the form field that depends on the criteria
$parent ValidationLogicCriteria A parent {@link ValidationLogicCriteria}, for grouping
$slave FormField The form field that responds to the state of {@link $master}

공개 메소드들

메소드 설명
__call ( sting $method, array $args ) : ValidationLogicCriteria Wildcard method for applying all the possible conditions
__construct ( FormField $slave, [type] $master, [type] $parent = null ) Constructor
addCriterion ( ValidationLogicCriterion $c ) Adds a new criterion
andIf ( string $master = null ) : ValidationLogicCriteria Adds a new criterion, and makes this set use conjuctive logic
end ( ) : FormField/ValidationLogicCriteria Ends the chaining and returns the parent object, either {@link ValidationLogicCriteria} or {@link FormField}
getCriteria ( ) : array Gets all the criteria
getLogicalOperator ( ) : string Gets a Javascript symbol for the logical operator
getMasterList ( ) : string Gets a list of all the master fields in this criteria set
group ( ) : ValidationLogicCriteria Creates a nested {@link ValidationLogicCriteria}
orIf ( string $master = null ) : ValidationLogicCriteria Adds a new criterion, and makes this set use disjunctive logic
phpEvalString ( ) : string
toScript ( ) : string Creates a JavaScript readable representation of the logic

메소드 상세

__call() 공개 메소드

Wildcard method for applying all the possible conditions
public __call ( sting $method, array $args ) : ValidationLogicCriteria
$method sting The method name
$args array The arguments
리턴 ValidationLogicCriteria

__construct() 공개 메소드

Constructor
public __construct ( FormField $slave, [type] $master, [type] $parent = null )
$slave FormField The form field that responds to changes of another form field
$master [type]
$parent [type]

addCriterion() 공개 메소드

Adds a new criterion
public addCriterion ( ValidationLogicCriterion $c )
$c ValidationLogicCriterion

andIf() 공개 메소드

Adds a new criterion, and makes this set use conjuctive logic
public andIf ( string $master = null ) : ValidationLogicCriteria
$master string The master form field
리턴 ValidationLogicCriteria

end() 공개 메소드

Ends the chaining and returns the parent object, either {@link ValidationLogicCriteria} or {@link FormField}
public end ( ) : FormField/ValidationLogicCriteria
리턴 FormField/ValidationLogicCriteria

getCriteria() 공개 메소드

Gets all the criteria
public getCriteria ( ) : array
리턴 array

getLogicalOperator() 공개 메소드

Gets a Javascript symbol for the logical operator
public getLogicalOperator ( ) : string
리턴 string

getMasterList() 공개 메소드

Gets a list of all the master fields in this criteria set
public getMasterList ( ) : string
리턴 string

group() 공개 메소드

Creates a nested {@link ValidationLogicCriteria}
public group ( ) : ValidationLogicCriteria
리턴 ValidationLogicCriteria

orIf() 공개 메소드

Adds a new criterion, and makes this set use disjunctive logic
public orIf ( string $master = null ) : ValidationLogicCriteria
$master string The master form field
리턴 ValidationLogicCriteria

phpEvalString() 공개 메소드

public phpEvalString ( ) : string
리턴 string

toScript() 공개 메소드

Creates a JavaScript readable representation of the logic
public toScript ( ) : string
리턴 string

프로퍼티 상세

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

A list of {@link ValidationLogicCriterion} objects
protected array $criteria
리턴 array

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

Either "and" or "or", determines disjunctive or conjunctive logic for the whole criteria set
protected string $logicalOperator
리턴 string

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

The name of the form field that depends on the criteria
protected string $master
리턴 string

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

A parent {@link ValidationLogicCriteria}, for grouping
protected ValidationLogicCriteria $parent
리턴 ValidationLogicCriteria

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

The form field that responds to the state of {@link $master}
protected FormField $slave
리턴 FormField