You are here

function rb_misc_page_manager_variant_trigger_form in Rules Bonus Pack 7

Configuration form to turn on/off Rules triggers on Page manager variants.

1 string reference to 'rb_misc_page_manager_variant_trigger_form'
rb_misc_page_manager_variant_operations_alter in ./rb_misc.module
Implements hook_page_manager_variant_operations().

File

./rb_misc.module, line 26
A necessary file for letting Drupal know this is a module. All functionality goes into rb_misc.rules.inc.

Code

function rb_misc_page_manager_variant_trigger_form($form, &$form_state) {
  $default_value = isset($form_state['handler']->conf['rb_misc_trigger']) ? $form_state['handler']->conf['rb_misc_trigger'] : 0;
  $form['rb_misc_trigger'] = array(
    '#type' => 'checkbox',
    '#title' => t('Create a Rules event for this variant'),
    '#description' => t('This option makes this custom page appear as an event
      in Rules. The configuration of conditions and reactions are made at in the
      Rules configuration interface.'),
    '#default_value' => $default_value,
  );
  return $form;
}