public function views_handler_field::option_definition in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 handlers/views_handler_field.inc \views_handler_field::option_definition()
- 6.2 handlers/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 (wrap in t() on export if true),
- '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 export format to TRUE/FALSE instead of 1/0.
- 'export' => (optional) FALSE or a callback for special export handling if necessary.
- 'unpack_translatable' => (optional) callback for special handling for translating data within the option, if necessary.
),
Return value
array Returns the options of this handler/plugin.
Overrides views_handler::option_definition
See also
views_object::export_option_always()
views_object::unpack_translatable()
33 calls to views_handler_field::option_definition()
- views_handler_field_accesslog_path::option_definition in modules/
statistics/ views_handler_field_accesslog_path.inc - Information about options for all kinds of purposes will be held here.
- views_handler_field_aggregator_category::option_definition in modules/
aggregator/ views_handler_field_aggregator_category.inc - Information about options for all kinds of purposes will be held here.
- views_handler_field_aggregator_title_link::option_definition in modules/
aggregator/ views_handler_field_aggregator_title_link.inc - Information about options for all kinds of purposes will be held here.
- views_handler_field_boolean::option_definition in handlers/
views_handler_field_boolean.inc - Information about options for all kinds of purposes will be held here.
- views_handler_field_comment::option_definition in modules/
comment/ views_handler_field_comment.inc - Information about options for all kinds of purposes will be held here.
33 methods override views_handler_field::option_definition()
- views_handler_field_accesslog_path::option_definition in modules/
statistics/ views_handler_field_accesslog_path.inc - Information about options for all kinds of purposes will be held here.
- views_handler_field_aggregator_category::option_definition in modules/
aggregator/ views_handler_field_aggregator_category.inc - Information about options for all kinds of purposes will be held here.
- views_handler_field_aggregator_title_link::option_definition in modules/
aggregator/ views_handler_field_aggregator_title_link.inc - Information about options for all kinds of purposes will be held here.
- views_handler_field_boolean::option_definition in handlers/
views_handler_field_boolean.inc - Information about options for all kinds of purposes will be held here.
- views_handler_field_comment::option_definition in modules/
comment/ views_handler_field_comment.inc - Information about options for all kinds of purposes will be held here.
File
- handlers/
views_handler_field.inc, line 420 - Definition of views_handler_field.
Class
- views_handler_field
- Base field handler that has no options and renders an unformatted field.
Code
public 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,
),
'unwanted_characters' => array(
'default' => '',
),
'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;
}