function views_handler_field_serialized::options_form

Overrides views_handler_field::options_form

File

handlers/views_handler_field_serialized.inc, line 28

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',
            ),
        ),
    );
}