function ContentTranslationTestHooks::formNodeFormSubmit

Form submission handler for custom field added based on a request parameter.

See also

content_translation_test_form_node_article_form_alter()

File

core/modules/content_translation/tests/modules/content_translation_test/src/Hook/ContentTranslationTestHooks.php, line 83

Class

ContentTranslationTestHooks
Hook implementations for content_translation_test.

Namespace

Drupal\content_translation_test\Hook

Code

public function formNodeFormSubmit($form, FormStateInterface $form_state) : void {
    \Drupal::state()->set('test_field_only_en_fr', $form_state->getValue('test_field_only_en_fr'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.