public function FormTestControllerObject::submitForm

Implements \Drupal\Core\Form\FormInterface::submitForm().

Overrides FormInterface::submitForm

File

drupal/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestControllerObject.php, line 67
Contains \Drupal\form_test\FormTestControllerObject.

Class

FormTestControllerObject
Provides a test form object.

Namespace

Drupal\form_test

Code

public function submitForm(array &$form, array &$form_state) {
  drupal_set_message(t('The FormTestControllerObject::submitForm() method was used for this form.'));
  config('form_test.object')
    ->set('bananas', $form_state['values']['bananas'])
    ->save();
}