You are here

function rules_element_invoke_component_operations in Rules 7.2

Implements RulesPluginUIInterface::operations() for the action.

Related topics

File

modules/rules_core.rules.inc, line 280
Rules integration with Drupal core.

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;
}