1 block.class.inc Block::formSubmit($form, &$form_state)

Submit handler to save the form settings.

File

core/modules/layout/includes/block.class.inc, line 257
A class that wraps around a block to store settings information.

Class

Block
@file A class that wraps around a block to store settings information.

Code

function formSubmit($form, &$form_state) {
  $this->settings['title_display'] = $form_state['values']['title_display'];
  $this->settings['title'] = $form_state['values']['title'];
  $this->settings['style'] = $form_state['values']['style'];
  if (isset($form_state['values']['contexts'])) {
    $this->settings['contexts'] = $form_state['values']['contexts'];
  }
  // Remove contexts if none are visible in the form.
  else {
    $this->settings['contexts'] = array();
  }
}