You are here

function birthdays_birthdays in Birthdays 7

Implements hook_birthdays().

File

./birthdays.module, line 937
The Birthdays module allows users to add their birthday to their profile. It lists birthdays on a seperate page and in different blocks. Users can receive an email on their birthday automatically, and the administrator can receive daily reminders of…

Code

function birthdays_birthdays($entity, $instance) {

  // Trigger module support.
  if (module_exists('trigger')) {

    // Context information.
    $context = array(
      'group' => 'birthdays',
      'hook' => _birthdays_instance_hook($instance),
      $instance['entity_type'] => $entity,
    );

    // Execute the matching set of actions.
    $aids = trigger_get_assigned_actions($context['hook']);
    actions_do(array_keys($aids), $entity, $context, $instance);
  }

  // Rules module support.
  if (module_exists('rules')) {
    rules_invoke_event_by_args('birthdays_current', array(
      'birthdays_current' => $entity,
    ));
  }
}