CRM_Core_Form_Date
in package
since 5.69 will be removed around 5.79
Tags
Table of Contents
Constants
- DATE_dd_mm_yyyy = 32
- Various Date Formats.
- DATE_dd_mon_yy = 16
- Various Date Formats.
- DATE_mm_dd_yy = 2
- Various Date Formats.
- DATE_mm_dd_yyyy = 4
- Various Date Formats.
- DATE_Month_dd_yyyy = 8
- Various Date Formats.
- DATE_yyyy_mm_dd = 1
- Various Date Formats.
Methods
- addDateRangeToForm() : mixed
- Build the date range - relative or absolute.
- buildAllowedDateFormats() : mixed
- Build the date-format form.
- returnDateRangeSelector() : array<string|int, mixed>
- Build the date range array that will provide the form option values.
Constants
DATE_dd_mm_yyyy
Various Date Formats.
since 5.69 will be removed around 5.79
public
mixed
DATE_dd_mm_yyyy
= 32
DATE_dd_mon_yy
Various Date Formats.
since 5.69 will be removed around 5.79
public
mixed
DATE_dd_mon_yy
= 16
DATE_mm_dd_yy
Various Date Formats.
since 5.69 will be removed around 5.79
public
mixed
DATE_mm_dd_yy
= 2
DATE_mm_dd_yyyy
Various Date Formats.
since 5.69 will be removed around 5.79
public
mixed
DATE_mm_dd_yyyy
= 4
DATE_Month_dd_yyyy
Various Date Formats.
since 5.69 will be removed around 5.79
public
mixed
DATE_Month_dd_yyyy
= 8
DATE_yyyy_mm_dd
Various Date Formats.
since 5.69 will be removed around 5.79
public
mixed
DATE_yyyy_mm_dd
= 1
Methods
addDateRangeToForm()
Build the date range - relative or absolute.
public
static addDateRangeToForm(CRM_Core_Form &$form, string $fieldName, array<string|int, mixed> $selector, string $from, string $to, string $fromLabel, bool $required, string $dateFormat, bool $displayTime, array<string|int, mixed> $attributes) : mixed
since 5.28 will be removed around 5.79
Parameters
- $form : CRM_Core_Form
-
The form object that we are operating on.
- $fieldName : string
- $selector : array<string|int, mixed>
-
Array of option values to add.
- $from : string
-
Label.
- $to : string
- $fromLabel : string
- $required : bool
- $dateFormat : string
- $displayTime : bool
- $attributes : array<string|int, mixed>
buildAllowedDateFormats()
Build the date-format form.
public
static buildAllowedDateFormats(CRM_Core_Form &$form) : mixed
since 5.69 will be removed around 5.79
Parameters
- $form : CRM_Core_Form
-
The form object that we are operating on.
returnDateRangeSelector()
Build the date range array that will provide the form option values.
public
static returnDateRangeSelector(CRM_Core_Form &$form, string $fieldName[, int $count = 1 ][, string $from = '_from' ][, string $to = '_to' ][, string $fromLabel = 'From:' ][, bool $required = FALSE ][, array<string|int, mixed> $operators = [] ][, string $dateFormat = 'searchDate' ][, bool $displayTime = FALSE ]) : array<string|int, mixed>
since 5.28 will be removed around 5.79
It can be - relative or absolute.
Parameters
- $form : CRM_Core_Form
-
The form object that we are operating on.
- $fieldName : string
- $count : int = 1
- $from : string = '_from'
- $to : string = '_to'
- $fromLabel : string = 'From:'
- $required : bool = FALSE
- $operators : array<string|int, mixed> = []
-
Additional Operator Selections to add.
- $dateFormat : string = 'searchDate'
- $displayTime : bool = FALSE
Return values
array<string|int, mixed> —Values for Selector