1 field.block.inc FieldBlock::formSubmit($form, &$form_state)

Submit handler to save the form settings.

Overrides Block::formSubmit

File

core/modules/field/field.block.inc, line 262

Class

FieldBlock
FieldBlock extends Block

Code

function formSubmit($form, &$form_state) {
  parent::formSubmit($form, $form_state);

  $values = $form_state['values'];

  $this->settings['label'] = $values['label'];
  $this->settings['formatter'] = $values['formatter'];
  $this->settings['formatter_settings'] = isset($values['formatter_settings']) ? $values['formatter_settings'] : array();
  $this->settings['delta_offset'] = isset($values['trim_output']['delta_offset']) ? $values['trim_output']['delta_offset'] : 0;
  $this->settings['delta_limit'] = !empty($values['trim_output']['delta_limit']) ? $values['trim_output']['delta_limit'] : '';
  $this->settings['delta_reversed'] = isset($values['delta_reversed']['delta_reversed']) ? $values['delta_reversed']['delta_reversed'] : 0;
}