function bat_event_constraints_get_info in Booking and Availability Management Tools for Drupal 7
Same name and namespace in other branches
- 8 modules/bat_event/bat_event.module \bat_event_constraints_get_info()
See also
hook_event_constraints_info()
hook_event_constraints_info_alter()
3 calls to bat_event_constraints_get_info()
- bat_event_get_calendar_response in modules/
bat_event/ bat_event.module - Given a date range and a set of valid states it will return all units within the set of valid states.
- bat_event_get_matching_units_from_calendar in modules/
bat_event/ bat_event.module - Returns matching units based on a provided Calendar. A Calendar can be instantiated in a number of ways - bat_event offers bat_event_get_calendar. Using an already setup calendar multiple times reduces overall load.
- bat_facets_search_api_query_alter in modules/
bat_facets/ bat_facets.module - Implements hook_search_api_query_alter().
File
- modules/
bat_event/ bat_event.module, line 2539 - Manage Events - Events store the EventValue of a Unit over a period of time.
Code
function bat_event_constraints_get_info() {
// Use the advanced drupal_static() pattern, since this is called very often.
static $drupal_static_fast;
if (!isset($drupal_static_fast)) {
$drupal_static_fast['bat_event_constraints_info'] =& drupal_static(__FUNCTION__);
}
$constraints_info =& $drupal_static_fast['bat_event_constraints_info'];
if (empty($constraints_info)) {
if ($cache = cache_get('bat_event_constraints_info')) {
$constraints_info = $cache->data;
}
else {
$constraints_info = module_invoke_all('bat_event_constraints_info');
// Let other modules alter the entity info.
drupal_alter('bat_event_constraints_info', $constraints_info);
cache_set('bat_event_constraints_info', $constraints_info);
}
}
return $constraints_info;
}