Select Git revision
aggregator.module
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
bat_api.module 38.80 KiB
<?php
/**
* @file
* API access to booking data for BAT.
*/
use Roomify\Bat\Event\Event;
use Roomify\Bat\Calendar\Calendar;
use Roomify\Bat\Store\DrupalDBStore;
use Roomify\Bat\Unit\Unit;
use Drupal\bat_fullcalendar\FullCalendarOpenStateEventFormatter;
use Drupal\bat_fullcalendar\FullCalendarFixedStateEventFormatter;
/**
* Implements hook_ctools_plugin_api().
*/
function bat_api_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "services" && $api == "services") {
return array("version" => "3");
}
}
/**
* Implements hook_ctools_plugin_directory().
*/
function bat_api_ctools_plugin_directory($owner, $plugin_type) {
if ($owner == 'bat_api' && $plugin_type == 'bat_unit_field_handler') {
return 'plugins/bat_unit_field_handler';
}
if ($owner == 'bat_api' && $plugin_type == 'bat_type_field_handler') {
return 'plugins/bat_type_field_handler';
}
}
/**
* Implements hook_ctools_plugin_type().
*/
function bat_api_ctools_plugin_type() {
return array(
'bat_unit_field_handler' => array(
'use hooks' => TRUE,
),
'bat_type_field_handler' => array(
'use hooks' => TRUE,
),
);
}
/**
* Implements hook_permission().
*/
function bat_api_permission() {
return array(
'access types index service' => array(
'title' => t('Access types index service'),
'description' => t('Access types index service.'),
),
'access edit type service' => array(
'title' => t('Access edit type service'),
'description' => t('Access edit type service.'),
),
'access add type service' => array(
'title' => t('Access add type service'),
'description' => t('Access add type service.'),
),
'access units index service' => array(
'title' => t('Access units index service'),
'description' => t('Access units index service.'),