You are here

function rb_views_plugin_argument_validate_rules_component::options_form in Rules Bonus Pack 7

Provide the default form for setting options.

Overrides views_plugin_argument_validate::options_form

File

views/rb_views_plugin_argument_validate_rules_component.inc, line 27
Contains the plugin for validating a Views argument with rule sets.

Class

rb_views_plugin_argument_validate_rules_component
Use a Rules component to validate a contextual filter value ('argument').

Code

function options_form(&$form, &$form_state) {

  // Get all the relevant plugin instances.
  $components = rules_get_components(TRUE, NULL, array(
    'plugin' => 'views argument validator',
  ));

  // Build the options form for the validator.
  $form['component'] = array(
    '#type' => 'select',
    '#title' => t('Choose validator component'),
    '#options' => $components,
    '#default_value' => $this->options['component'],
    '#description' => t('New argument validators can be set up using the Rules component interface.'),
  );
}