public function ViewsIcalHelperInterface::addEvent in Views iCal 8
Adds an event.
This is used when the date_field type is `datetime` or `daterange`.
Parameters
\Eluceo\iCal\Component\Event[] $events: Set of events where the new event will be added.
\Drupal\Core\Entity\ContentEntityInterface $entity: The entity to be used for creating the event.
\DateTimeZone $timezone: Timezone data to be specified to the event.
array $field_mapping: Views field option and entity field name mapping. Example: [ 'date_field' => 'field_event_date', 'summary_field' => 'field_event_summary', 'description_field' => 'field_event_description', ] End of example.
Throws
\Exception Throws exception if it fails to parse the datetime data from entity.
See also
\Drupal\views_ical\Plugin\views\style\Ical::defineOptions
1 method overrides ViewsIcalHelperInterface::addEvent()
- ViewsIcalHelper::addEvent in src/
ViewsIcalHelper.php - Adds an event.
File
- src/
ViewsIcalHelperInterface.php, line 39
Class
- ViewsIcalHelperInterface
- Contract for ViewsIcalHelper.
Namespace
Drupal\views_icalCode
public function addEvent(array &$events, ResultRow $row, \DateTimeZone $timezone, array $field_mapping) : void;