You are here

function views_plugin_display_block_path::options_form in Views Hacks 6

Same name and namespace in other branches
  1. 7 views_display_block_path/views_plugin_display_block_path.inc \views_plugin_display_block_path::options_form()

File

views_display_block_path/views_plugin_display_block_path.inc, line 28

Class

views_plugin_display_block_path

Code

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

  // It is very important to call the parent function here:
  parent::options_form($form, $form_state);
  switch ($form_state['section']) {
    case 'path':
      $form['#title'] .= t('URL of this block');
      $form['#help_topic'] = 'path';
      $form['path'] = array(
        '#type' => 'textfield',
        '#description' => t('The URL reported by this block. Leave blank to return the URL of the page in which the block is embedded.'),
        '#default_value' => $this
          ->get_option('path'),
        '#field_prefix' => '<span dir="ltr">' . url(NULL, array(
          'absolute' => TRUE,
        )) . (variable_get('clean_url', 0) ? '' : '?q='),
        '#field_suffix' => '</span>&lrm;',
        '#attributes' => array(
          'dir' => 'ltr',
        ),
      );
      break;
  }
}