function rules_get_event_base_name

Returns the base name of a configured event name.

For a configured event name like node_view--article the base event name node_view is returned.

Parameters

string $event_name: A (configured) event name.

Return value

string The event base name.

3 calls to rules_get_event_base_name()
RulesEventSet::rebuildEventCache in includes/rules.plugins.inc
Rebuilds the event cache.
rules_get_event_handler in ./rules.module
Returns the rule event handler for the given event.
rules_get_event_info in ./rules.module
Gets event info for a given event.

File

./rules.module, line 688

Code

function rules_get_event_base_name($event_name) {
    // Cut off any suffix from a configured event name.
    if (strpos($event_name, '--') !== FALSE) {
        $parts = explode('--', $event_name, 2);
        return $parts[0];
    }
    return $event_name;
}