1 views_handler_field.inc views_handler_field::option_definition()

Information about options for all kinds of purposes will be held here. @code 'option_name' => array(

  • 'default' => default value,
  • 'translatable' => (optional) TRUE/FALSE,
  • 'contains' => (optional) array of items this contains, with its own defaults, etc. If contains is set, the default will be ignored and assumed to be array().
  • 'bool' => (optional) TRUE/FALSE Is the value a boolean value. This will change the internal format to TRUE/FALSE instead of 1/0.

),

Return value

array: Returns the options of this handler/plugin.

Overrides views_handler::option_definition

See also

views_object::unpack_translatable()

File

core/modules/views/handlers/views_handler_field.inc, line 377
@todo.

Class

views_handler_field
Base field handler that has no options and renders an unformatted field.

Code

function option_definition() {
  $options = parent::option_definition();

  $options['label'] = array('default' => $this->definition['title'], 'translatable' => TRUE);
  $options['exclude'] = array('default' => FALSE, 'bool' => TRUE);
  $options['alter'] = array(
    'contains' => array(
      'alter_text' => array('default' => FALSE, 'bool' => TRUE),
      'text' => array('default' => '', 'translatable' => TRUE),
      'make_link' => array('default' => FALSE, 'bool' => TRUE),
      'path' => array('default' => ''),
      'absolute' => array('default' => FALSE, 'bool' => TRUE),
      'external' => array('default' => FALSE, 'bool' => TRUE),
      'replace_spaces' => array('default' => FALSE, 'bool' => TRUE),
      'path_case' => array('default' => 'none', 'translatable' => FALSE),
      'trim_whitespace' => array('default' => FALSE, 'bool' => TRUE),
      'alt' => array('default' => '', 'translatable' => TRUE),
      'rel' => array('default' => ''),
      'link_class' => array('default' => ''),
      'prefix' => array('default' => '', 'translatable' => TRUE),
      'suffix' => array('default' => '', 'translatable' => TRUE),
      'target' => array('default' => ''),
      'nl2br' => array('default' => FALSE, 'bool' => TRUE),
      'max_length' => array('default' => ''),
      'word_boundary' => array('default' => TRUE, 'bool' => TRUE),
      'ellipsis' => array('default' => TRUE, 'bool' => TRUE),
      'more_link' => array('default' => FALSE, 'bool' => TRUE),
      'more_link_text' => array('default' => '', 'translatable' => TRUE),
      'more_link_path' => array('default' => ''),
      'strip_tags' => array('default' => FALSE, 'bool' => TRUE),
      'trim' => array('default' => FALSE, 'bool' => TRUE),
      'preserve_tags' => array('default' => ''),
      'html' => array('default' => FALSE, 'bool' => TRUE),
    ),
  );
  $options['element_type'] = array('default' => '');
  $options['element_class'] = array('default' => '');

  $options['element_label_type'] = array('default' => '');
  $options['element_label_class'] = array('default' => '');
  $options['element_label_colon'] = array('default' => TRUE, 'bool' => TRUE);

  $options['element_wrapper_type'] = array('default' => '');
  $options['element_wrapper_class'] = array('default' => '');

  $options['element_default_classes'] = array('default' => TRUE, 'bool' => TRUE);

  $options['empty'] = array('default' => '', 'translatable' => TRUE);
  $options['hide_empty'] = array('default' => FALSE, 'bool' => TRUE);
  $options['empty_zero'] = array('default' => FALSE, 'bool' => TRUE);
  $options['hide_alter_empty'] = array('default' => TRUE, 'bool' => TRUE);

  return $options;
}