Performs some cleanup tasks on the options array before saving it.
Overrides HandlerBase::submitOptionsForm
public function submitOptionsForm(&$form, &$form_state) {
$options =& $form_state['values']['options'];
$types = array(
'element_type',
'element_label_type',
'element_wrapper_type',
);
$classes = array_combine(array(
'element_class',
'element_label_class',
'element_wrapper_class',
), $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;
}
}