You are here

public function EntityUpdateTestSettings::submitForm in Entity Update 8

Same name and namespace in other branches
  1. 2.0.x tests/modules/entity_update_tests/src/Form/EntityUpdateTestSettings.php \Drupal\entity_update_tests\Form\EntityUpdateTestSettings::submitForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

modules/entity_update_tests/src/Form/EntityUpdateTestSettings.php, line 74

Class

EntityUpdateTestSettings
Class CheckEntityUpdate.

Namespace

Drupal\entity_update_tests\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $fields = self::getConfigurableFields();
  foreach ($fields as $field_key => $field_name) {
    $value = $form_state
      ->getValue($field_key);
    drupal_set_message("{$field_name} : ({$value}) " . ($value ? "TRUE" : "FALSE"));
    EntityUpdateTestHelper::fieldEnable($field_key, $value);
  }
  drupal_set_message($this
    ->t("Test entity configuration success"));
}