You are here

function rb_misc_conditions_summary in Rules Bonus Pack 7

Provide a summary description.

1 string reference to 'rb_misc_conditions_summary'
rb_misc_condition_get_plugin_info in plugins/access/rb_misc_conditions.inc
Gets plugin information for a single component.

File

plugins/access/rb_misc_conditions.inc, line 140
Plugin to create access plugins from Rules condition components.

Code

function rb_misc_conditions_summary($conf, $context) {
  $name = $conf['component_name'];
  $component = rules_config_load($name);
  if (module_exists('rules_admin')) {
    return t('Rules condition component (%type): <a href="!edit-url" target="_blank">%label</a>', array(
      '%type' => drupal_strtoupper($component
        ->plugin()),
      '!edit-url' => url(RulesPluginUI::path($component->name)),
      '%label' => $component
        ->label(),
    ));
  }
  return t('Rules condition component %type: %label', array(
    '%type' => $component
      ->plugin(),
    '%label' => $component
      ->label(),
  ));
}