1 block_example.inc BlockExample::formSubmit($form, &$form_state)

Submit handler to save the form settings.

All keys included in $this->settings are automatically saved to the configuration file for the Layout where this block instance has been placed. It is not necessary to return a value from formSubmit().

Overrides Block::formSubmit

File

modules/examples/block_example/block_example.inc, line 96

Class

BlockExample
BlockExample extends Block

Code

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

  $this->settings['content'] = $form_state['values']['content']['value'];
  $this->settings['format'] = $form_state['values']['content']['format'];
}