You are here

function views_plugin_display_i18n_page::options_form in i18n page views 7

Same name and namespace in other branches
  1. 6 views_plugin_display_i18n_page.inc \views_plugin_display_i18n_page::options_form()
  2. 6.0 views_plugin_display_i18n_page.inc \views_plugin_display_i18n_page::options_form()

Provide the default form for setting options.

Overrides views_plugin_display::options_form

File

./views_plugin_display_i18n_page.inc, line 170
Contains the i18n page display plugin.

Class

views_plugin_display_i18n_page
The plugin that handles a full page.

Code

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

  // It is very important to call the parent function here:
  parent::options_form($form, $form_state);
  $key = $form_state['section'];
  if (stristr($key, 'path_') === FALSE) {
    return;
  }
  $form['#title'] .= t('The menu path or URL of this view');
  $form['#help_topic'] = 'path';
  $form[$key] = array(
    '#type' => 'textfield',
    '#description' => t('This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for arguments: For example, "node/%/feed".'),
    '#default_value' => $this
      ->get_option($key),
    '#field_prefix' => '<span dir="ltr">' . url(NULL, array(
      'absolute' => TRUE,
    )) . (variable_get('clean_url', 0) ? '' : '?q='),
    '#field_suffix' => '</span>&lrm;',
    '#attributes' => array(
      'dir' => 'ltr',
    ),
  );
}