function rules_get_event_info

Gets event info for a given event.

Parameters

string $event_name: A (configured) event name.

Return value

array An array of event info. If the event is unknown, a suiting info array is generated and returned

4 calls to rules_get_event_info()
RulesReactionRule::access in includes/rules.plugins.inc
RulesReactionRule::dependencies in includes/rules.plugins.inc
rules_get_event_handler in ./rules.module
Returns the rule event handler for the given event.
rules_ui_remove_event in ui/ui.forms.inc
Form to remove an event from a rule.

File

./rules.module, line 664

Code

function rules_get_event_info($event_name) {
    $base_event_name = rules_get_event_base_name($event_name);
    $events = rules_fetch_data('event_info');
    if (isset($events[$base_event_name])) {
        return $events[$base_event_name] + array(
            'name' => $base_event_name,
        );
    }
    return array(
        'label' => t('Unknown event "!event_name"', array(
            '!event_name' => $base_event_name,
        )),
        'name' => $base_event_name,
    );
}