Function that execute the validation with the parameters passed in initialize, except the value, that is passed here by the validation helper, and it's value is the value filled in the field form to check
boolean
execute
(string &$value, string &$error)
-
string
&$value
-
string
&$error
Function to start the validation class.
The parameters array is composed of (+ are mandatory, * one of this is mandatory):
- +class_name: the name for the class where we look for periods
- +start_date_db: the start date of the period in the db table
- +end_date_db: the end date of the period in the db table
- +start_date_field: the start date form field
- +end_date_field: the end date form field
- +start_date_error_message: the returned error message
- +end_date_error_message: the returned error message
- +inside_error_message: the returned error message
- -exception_id: if there is an exception row in the table (Example: in
edition the row edited), it takes the field of the form which contains
it)
- -criteria: some additional criteria for propel selection. This
aditional criteria must be noted this way:
- criteria:
- criteria1:
- +column: column name for criteria checking
- *value: value for criteria
- *field: field of the form where the value is defined
- -criteria: criteria pattern (see symfony or propel
documentation)
boolean
initialize
(unknown_type $context, [array $parameters = null])
-
unknown_type
$context
-
array
$parameters