Skip to main content

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

NameTypeDescription
$cronarrayThe expression parts, joined with spaces in this order.
↳ $minutestringMinute, 00-59, or *.
↳ $hourstringHour, 00-23, or *.
↳ $day_monthstringDay of month, 1-31, or *.
↳ $monthstringMonth, 01-12, or *.
↳ $day_weekstringDay of week, 0-6 (Sunday is 0), or *.
$cyclestringThe submitted repeat frequency: every_day, every_week, every_month or every_year.
$start_datestringThe event start date, in Y-m-d format. Empty when the submitted date is missing or unparseable.
$timestampintThe start date as a Unix timestamp.
$is_all_day_eventboolWhether the event runs all day.
$start_timestring|nullThe 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_event and $start_time parameters.

Source

Defined in src/EventField.php at line 1245