Skip to content

AgendaEventGet

This hook loads the data of an Agenda event into FormIt fields. The hook was introduced with Agenda 1.1.0.

The event is retrieved with the event ID or the repeat ID, if the event ID is not set. If no event can be retrieved, the hook returns false

FormIt Hook Properties

It uses the following hook properties:

Property Description Default
agendaActiveOnly Load only active events into FormIt. true
agendaCalendars Comma-separated list of aliases of calendars to filter the loaded event. -
agendaCategories Comma separated list of aliases of categories to filter the loaded event. -
agendaContexts Comma separated list of context keys to filter the loaded event. -
agendaDateformat Format of the startdate and enddate field, set by the hook. Must contain a supported date and time format. Y-m-d H:i:s
agendaDateformatAllday Format of the startdate and enddate field, set by the hook, when the event is an all day event. Must contain a supported date and time format. Y-m-d
agendaId ID of one event to load into FormIt. 0
agendaLocations Comma separated list of aliases of locations to filter the loaded event. -
agendaOwnEvent Load only own events (created by the current user) into FormIt. false
agendaRepeating ID of one repeating event to load into FormIt. 0
agendaUsergroups Comma separated list of user group names to filter the loaded event. -
agendaUsers Comma separated list of user IDs to filter the loaded event. -

Hook fields

The following FormIt fields are set by the loaded Agenda event in the hook.

Field Description
active The active status of the loaded event.
allday The all day status of the loaded event.
calendar The alias of the calendar of the loaded event.
calendar_id The id of the calendar of the loaded event.
category The aliases of the categories of the loaded event.
content The content of the loaded event.
context_key The context key of the loaded event.
description The description of the loaded event.
enddate The enddate of the loaded event (or the loaded repeating event).
id The id of the loaded event.
location The alias of the location of the loaded event.
location_id The id of the location of the loaded event.
repeat_enddate The enddate of the repeats of the loaded event.
repeat_interval The repeat interval of the loaded event.
repeat_on The repeat weekdays of the loaded event, when the repeat type is weekly
repeat_ordinal The repeat ordinal of the loaded event, when the repeat type is monthly by weekday
repeat_type The repeat type of the loaded event. (1 = daily , 2 = weekly, 3 = monthly, 4 = yearly, 5 = montly by weekday )
repeat_weekday The repeat weekday of the loaded event, when the repeat type is weekly
repeating The repeating status of the loaded event.
repeating_id The id of the loaded repeating event.
resource_id The id of the linked resource of the loaded event.
startdate The startdate of the loaded event (or the loaded repeating event).
title The title of the loaded event.