public function views_handler_field_serialized::options_form in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 handlers/views_handler_field_serialized.inc \views_handler_field_serialized::options_form()
Default options form provides the label widget that all fields should have.
Overrides views_handler_field::options_form
File
- handlers/
views_handler_field_serialized.inc, line 28 - Definition of views_handler_field_serialized.
Class
- views_handler_field_serialized
- Field handler to show data of serialized fields.
Code
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['format'] = array(
'#type' => 'select',
'#title' => t('Display format'),
'#description' => t('How should the serialized data be displayed. You can choose a custom array/object key or a print_r on the full output.'),
'#options' => array(
'unserialized' => t('Full data (unserialized)'),
'serialized' => t('Full data (serialized)'),
'key' => t('A certain key'),
),
'#default_value' => $this->options['format'],
);
$form['key'] = array(
'#type' => 'textfield',
'#title' => t('Which key should be displayed'),
'#default_value' => $this->options['key'],
'#dependency' => array(
'edit-options-format' => array(
'key',
),
),
);
}