Your cart is empty!
Display Event
public function onDisplayCalendarRect(array &$data, mixed $event) : void
Fires before displaying an event within the weekly/daily calendar.
Description
Trigger hook to let external plugins manipulate the text to display, the background color and additional data to introduce within the HTML rectangle.
Parameters
- &$data
-
(array) An associative array of display data.
id
- an array of appointments;employee
- an array of employees (assigned to the appointments);service
- an array of services (assigned to the appointments);color
- the (HEX) background color of the event to display (without #);label
- the HTML to display as label within the event.
- $event
-
(CalendarRect) The object handling a list of events.
Return Value
None.
Example
/**
* Trigger hook to let external plugins manipulate the text to display,
* the background color and additional data to introduce within the HTML rect.
*
* @param array &$data An associative array of display data.
* @param self $rect The object handling all the events.
*
* @return void
*/
public function onDisplayCalendarRect(&$data, $event)
{
/**
* @todo it is possible to manipulate here the data array
*/
}
Changelog
Version | Description |
---|---|
1.7 | Introduced. |
Last Update: 2021-10-06 16:05
Helpful?