public function views_handler_field::options_submit in Views (for Drupal 7) 7.3
Performs some cleanup tasks on the options array before saving it.
Overrides views_handler::options_submit
1 call to views_handler_field::options_submit()
- views_handler_field_links::options_submit in handlers/
views_handler_field_links.inc - Performs some cleanup tasks on the options array before saving it.
1 method overrides views_handler_field::options_submit()
- views_handler_field_links::options_submit in handlers/
views_handler_field_links.inc - Performs some cleanup tasks on the options array before saving it.
File
- handlers/
views_handler_field.inc, line 479 - Definition of views_handler_field.
Class
- views_handler_field
- Base field handler that has no options and renders an unformatted field.
Code
public function options_submit(&$form, &$form_state) {
$options =& $form_state['values']['options'];
$types = array(
'element_type',
'element_label_type',
'element_wrapper_type',
);
$base_types = array(
'element_class',
'element_label_class',
'element_wrapper_class',
);
$classes = array_combine($base_types, $types);
foreach ($types as $type) {
if (!$options[$type . '_enable']) {
$options[$type] = '';
}
}
foreach ($classes as $class => $type) {
if (!$options[$class . '_enable'] || !$options[$type . '_enable']) {
$options[$class] = '';
}
}
if (empty($options['custom_label'])) {
$options['label'] = '';
$options['element_label_colon'] = FALSE;
}
}