function notifications_alter in Notifications 5
This dispatch function hands off structured Drupal arrays to type-specific _notifications_*_alter implementations. Modelled after Drupal 6 drupal_alter()
Parameters
$type: The data type of the structured array. 'form', 'links', 'node_content', and so on are several examples.
$data: The structured array to be altered.
...: Any additional params will be passed on to the called hook_notifications_$type_alter functions.
3 calls to notifications_alter()
- notifications_event_types in ./
notifications.module - Get event types
- notifications_subscription_types in ./
notifications.module - Get info about subscription types
- notifications_ui_node_form in notifications_ui/
notifications_ui.module - Form for node subscriptions @ TODO: offer the same form in a block to be put in the contents region.
File
- ./
notifications.module, line 1115 - Notifications module
Code
function notifications_alter($type, &$data) {
// Now, use func_get_args() to pull in any additional parameters passed into
// the drupal_alter() call.
$args = array(
&$data,
);
$additional_args = func_get_args();
array_shift($additional_args);
array_shift($additional_args);
$args = array_merge($args, $additional_args);
foreach (module_implements('notifications_' . $type . '_alter') as $module) {
$function = $module . '_notifications_' . $type . '_alter';
call_user_func_array($function, $args);
}
}