PHP Класс ValidationLogicCriteria, silverstripe-zenvalidator

Наследование: extends Object
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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