Skip to content

Development

This page provides information for developers who wish to customize or extend the module's functionality.

Develop mode

During development, you may switch to non-minified assets by specifying the following in your local settings.php and clearing the Drupal cache:

  // Enable non-minified assets.
  $settings['fullcalendar_block.dev_mode'] = TRUE;

Drupal hook

There is a hook called hook_fullcalendar_block_settings_alter for other modules to modify the block settings, including the calendar options. For more details about this hook see: https://git.drupalcode.org/project/fullcalendar_block/-/blob/1.0.x/fullcalendar_block.api.php

JavaScript events.

  • fullcalendar_block.beforebuild An event to let other modules know that a calendar will be built. Parameters:

    • event: The event object.
    • calendarOptions: The calendar options object.
  • fullcalendar_block.build An event to let other modules know when a calendar has been built. Parameters:

    • event: The event object.
    • blockInstance: The block instance object containing
    • element: The fullcalendar block DOM element.
    • index: The fullcalendar block index.
    • calendar: The Fullcalendar instance.
    • calendarOptions: The calendar options object.
    • blockSettings: The block settings object.