You are here

public function NumericField::submitOptionsForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/field/NumericField.php \Drupal\views\Plugin\views\field\NumericField::submitOptionsForm()

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

Overrides FieldPluginBase::submitOptionsForm

File

core/modules/views/src/Plugin/views/field/NumericField.php, line 139

Class

NumericField
Render a field as a numeric value

Namespace

Drupal\views\Plugin\views\field

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state) {

  // Merge plural format options into one string and drop the individual
  // option values.
  $options =& $form_state
    ->getValue('options');
  $options['format_plural_string'] = implode(PoItem::DELIMITER, $options['format_plural_values']);
  unset($options['format_plural_values']);
  parent::submitOptionsForm($form, $form_state);
}