Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
B
bat_api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
bat_api
Commits
621ac644
Commit
621ac644
authored
Sep 22, 2016
by
Nicolò Caruso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ‘hook_bat_api_events_index_calendar_alter’
parent
9ab41402
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
bat_api.api.php
bat_api.api.php
+16
-0
bat_api.module
bat_api.module
+11
-0
No files found.
bat_api.api.php
0 → 100644
View file @
621ac644
<?php
/**
* @file
* 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.
*/
function
hook_bat_api_units_index_calendar_alter
(
&
$units
)
{
// No example.
}
function
hook_bat_api_events_index_calendar_alter
(
&
$events
,
$context
)
{
// No example.
}
bat_api.module
View file @
621ac644
...
...
@@ -931,6 +931,17 @@ function bat_api_services_events_index_calendar($unit_ids, $unit_types, $start_d
$events_json
=
_bat_api_merge_non_blocking_events
(
$events_json
);
$context
=
array
(
'unit_ids'
=>
$unit_ids
,
'unit_types'
=>
$unit_types
,
'start_date'
=>
$start_date_object
,
'end_date'
=>
$end_date_object
,
'event_types'
=>
$event_types
,
'background'
=>
$background
,
);
drupal_alter
(
'bat_api_events_index_calendar'
,
$events_json
,
$context
);
return
array_values
(
$events_json
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment