You are here

function hook_bat_event_target_entity_types in Booking and Availability Management Tools for Drupal 8

Same name and namespace in other branches
  1. 7 modules/bat_event/bat_event.api.php \hook_bat_event_target_entity_types()

Allow modules to define entity types that may be referenced by Bat Events and provided to the BAT library as a Unit.

NB: Entity types returned by this hook must implement the following methods:

  • getEventDefaultValue
  • formatEventValue

Return value

array $entity_types Single-dimensional array with machine names of entity types.

1 function implements hook_bat_event_target_entity_types()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

bat_unit_bat_event_target_entity_types in modules/bat_unit/bat_unit.module
Implements hook_bat_event_target_entity_types().
1 invocation of hook_bat_event_target_entity_types()
EventTypeForm::form in modules/bat_event/src/EventTypeForm.php
Gets the actual form array to be built.

File

modules/bat_event/bat_event.api.php, line 31
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_bat_event_target_entity_types() {
  return [
    'bat_unit',
  ];
}