social_event_content_block.api.php in Open Social 10.3.x
Same filename and directory in other branches
- 8.9 modules/social_features/social_content_block/modules/social_event_content_block/social_event_content_block.api.php
- 8.8 modules/social_features/social_content_block/modules/social_event_content_block/social_event_content_block.api.php
- 10.0.x modules/social_features/social_content_block/modules/social_event_content_block/social_event_content_block.api.php
- 10.1.x modules/social_features/social_content_block/modules/social_event_content_block/social_event_content_block.api.php
- 10.2.x modules/social_features/social_content_block/modules/social_event_content_block/social_event_content_block.api.php
Hooks for the Social Event Content Block module.
File
modules/social_features/social_content_block/modules/social_event_content_block/social_event_content_block.api.phpView source
<?php
/**
* @file
* Hooks for the Social Event Content Block module.
*/
/**
* Change the filter range for a content list block of events.
*
* @param array $range
* An array containing a `start` and `end` value that can be set to control
* the start and end dates of the result.
* @param string $value
* The value that the user chose in the date filter value.
*/
function hook_social_event_content_block_date_range_alter(array &$range, $value) {
// We only care about the 'example' choice, other choices are handled by other
// modules.
if ($value === 'example') {
// Only show events that occur on april 1st of this year.
$range['start'] = new DateTime('1 april this year 00:00');
$range['end'] = new DateTime('1 april this year 23:59');
}
}
Functions
Name | Description |
---|---|
hook_social_event_content_block_date_range_alter | Change the filter range for a content list block of events. |