function rules_element_invoke_component_operations

Implements RulesPluginUIInterface::operations() for the action.

Related topics

File

modules/rules_core.rules.inc, line 280

Code

function rules_element_invoke_component_operations(RulesPlugin $element) {
    $defaults = $element->extender('RulesPluginUI')
        ->operations();
    $info = $element->info();
    // Add an operation for editing the component.
    $defaults['#links']['component'] = array(
        'title' => t('edit component'),
        'href' => RulesPluginUI::path($info['#config_name']),
    );
    return $defaults;
}