Filter: gk/field-event/cron-value
Filters the recurrence expression before it is stored on the entry.
Every part must be a number or *. Step, list and nth-weekday syntax (1#3, L and the like) is not supported: {@see \self::date_interval_from_cron()} derives the recurrence interval by counting wildcards, so any pattern containing one silently changes the interval.
Only the four frequencies listed under $cycle produce a distinct expression. Any other value stores the daily expression.
Parameters
| Name | Type | Description |
|---|---|---|
| $cron | array | The expression parts, joined with spaces in this order. |
| ↳ $minute | string | Minute, 00-59, or *. |
| ↳ $hour | string | Hour, 00-23, or *. |
| ↳ $day_month | string | Day of month, 1-31, or *. |
| ↳ $month | string | Month, 01-12, or *. |
| ↳ $day_week | string | Day of week, 0-6 (Sunday is 0), or *. |
| $cycle | string | The submitted repeat frequency: every_day, every_week, every_month or every_year. |
| $start_date | string | The event start date, in Y-m-d format. Empty when the submitted date is missing or unparseable. |
| $timestamp | int | The start date as a Unix timestamp. |
| $is_all_day_event | bool | Whether the event runs all day. |
| $start_time | string|null | The submitted start time. Null for an all-day event, and null when a timed event was submitted without one. |
Since
- 1.1.0
- 1.7.0: Added the
$cycle,$start_date,$timestamp,$is_all_day_eventand$start_timeparameters.
Source
Defined in src/EventField.php at line 1245