You are here

function embed_views_plugin_display_embed::options_form in Embed Views Display 7.2

Add options form.

  • Add exposed block overridden value, adding help text and, adding embed exposed filter option.

Overrides views_plugin_display::options_form

File

./embed_views_plugin_display_embed.inc, line 47
Contains the embed display plugin.

Class

embed_views_plugin_display_embed
A plugin to create an embed display.

Code

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

  // Add all the parent options.
  parent::options_form($form, $form_state);
  if ($form_state['section'] == 'exposed_block') {
    $form['exposed_block']['#default_value'] = $this
      ->get_option('exposed_block', TRUE) ? 1 : 0;
  }
  if ($form_state['section'] == 'exposed_embed') {
    $form['#title'] .= t('Display exposed filter with embed code');
    $form['description'] = array(
      '#markup' => '<div class="description form-item">' . t('If set, any exposed widgets will not appear with this view, and will require that it is embedded elsewhere.') . '</div>',
    );
    $form['exposed_embed'] = array(
      '#type' => 'radios',
      '#options' => array(
        1 => t('Yes'),
        0 => t('No'),
      ),
      '#default_value' => $this
        ->get_option('exposed_embed') ? 1 : 0,
    );
  }
}