You are here

function views_handler_field_system_info_screenshot::options_form in Views System 7.3

Same name and namespace in other branches
  1. 6.3 views/handlers/views_handler_field_system_info_screenshot.inc \views_handler_field_system_info_screenshot::options_form()
  2. 6.2 views/handlers/views_handler_field_system_info_screenshot.inc \views_handler_field_system_info_screenshot::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_screenshot.inc, line 28
Views field handler for the views_system module.

Class

views_handler_field_system_info_screenshot
Provides display options and renders the screenshot field of the system item.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['system_info_screenshot_image'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display as image'),
    '#default_value' => !empty($this->options['system_info_screenshot_image']),
  );
  $form['system_info_screenshot_image_class'] = array(
    '#type' => 'textfield',
    '#title' => t('Image class'),
    '#description' => t('The CSS class to apply to the image. Default classes: views-system-screenshot-large, views-system-screenshot-medium, views-system-screenshot-small.'),
    '#default_value' => !empty($this->options['system_info_screenshot_image_class']) ? $this->options['system_info_screenshot_image_class'] : 'views-system-screenshot-medium',
    '#process' => array(
      'ctools_dependent_process',
    ),
    '#dependency' => array(
      'edit-options-system-info-screenshot-image' => array(
        1,
      ),
    ),
  );
}