You are here

function views_handler_field_system_info_project::options_form in Views System 7.3

Same name and namespace in other branches
  1. 6.3 views/handlers/views_handler_field_system_info_project.inc \views_handler_field_system_info_project::options_form()
  2. 6.2 views/handlers/views_handler_field_system_info_project.inc \views_handler_field_system_info_project::options_form()

Default options form provides the label widget that all fields should have.

Overrides views_handler_field::options_form

File

views/handlers/views_handler_field_system_info_project.inc, line 28
Views field handler for the views_system module.

Class

views_handler_field_system_info_project
Provides display options and renders the project field of the system item.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['system_info_project_link'] = array(
    '#type' => 'checkbox',
    '#title' => t('Link this field to its drupal.org project page'),
    '#description' => t('This will override any other link you have set.'),
    '#default_value' => !empty($this->options['system_info_project_link']),
  );
  $form['system_info_project_link_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Link path'),
    '#description' => t('URL of the drupal.org project page. Replacement patterns: [project]'),
    '#default_value' => !empty($this->options['system_info_project_link_path']) ? $this->options['system_info_project_link_path'] : 'http://drupal.org/project/[project]',
    '#process' => array(
      'ctools_dependent_process',
    ),
    '#dependency' => array(
      'edit-options-system-info-project-link' => array(
        1,
      ),
    ),
  );
}