Class myNonOverlapingDateValidator

Description

myNonOverlapingDateValidator is a validator module to check that periods passed to add a new period to a period table are not overlaped

  • author: Diego Cebrián

Located in /apps/frontend/lib/myNonOverlapingDateValidator.class.php (line 19)

sfValidator
   |
   --myNonOverlapingDateValidator
Method Summary
boolean execute (string &$value, string &$error)
boolean initialize (unknown_type $context, [array $parameters = null])
Methods
execute (line 86)

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

  • access: public
boolean execute (string &$value, string &$error)
  • string &$value
  • string &$error
initialize (line 63)

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)

  • access: public
boolean initialize (unknown_type $context, [array $parameters = null])
  • unknown_type $context
  • array $parameters

Documentation generated on Tue, 31 Mar 2009 19:03:26 +0200 by phpDocumentor 1.4.2