function views_handler_field::options_submit

cis7 views_handler_field.inc views_handler_field::options_submit(&$form, &$form_state)
cle7 views_handler_field.inc views_handler_field::options_submit(&$form, &$form_state)
elmsmedia7 views_handler_field.inc views_handler_field::options_submit(&$form, &$form_state)
icor7 views_handler_field.inc views_handler_field::options_submit(&$form, &$form_state)
meedjum_blog7 views_handler_field.inc views_handler_field::options_submit(&$form, &$form_state)
mooc7 views_handler_field.inc views_handler_field::options_submit(&$form, &$form_state)

Performs some cleanup tasks on the options array before saving it.

Overrides views_handler::options_submit

File

sites/all/modules/ulmus/views/handlers/views_handler_field.inc, line 450
@todo.

Class

views_handler_field
Base field handler that has no options and renders an unformatted field.

Code

function options_submit(&$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;
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.