You are here

function _rb_misc_add_variant_render_events in Rules Bonus Pack 7

Helper function that adds event information for Page manager page variants.

1 call to _rb_misc_add_variant_render_events()
rb_misc_rules_event_info in ./rb_misc.rules.inc
Implements hook_rules_event_info().

File

./rb_misc.rules.inc, line 443
Miscellaneous conditions and actions for Rules.

Code

function _rb_misc_add_variant_render_events(&$events, $task_info, $subtask, $variant) {
  $rules_info = rb_misc_list_variant_context_entities($task_info, $subtask, $variant);
  $events['rb_misc_trigger_' . $variant->name] = array(
    'group' => t('Rules Bonus: Miscellaneous'),
    'label' => t('Variant @name is rendered', array(
      '@name' => $variant->conf['title'],
    )),
    'variables' => $rules_info,
  );
}