You are here

function content_translation_test_form_node_form_submit in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module \content_translation_test_form_node_form_submit()
  2. 9 core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module \content_translation_test_form_node_form_submit()

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

See also

content_translation_test_form_node_article_form_alter()

1 string reference to 'content_translation_test_form_node_form_submit'
content_translation_test_form_node_form_alter in core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module
Implements hook_form_BASE_FORM_ID_alter().

File

core/modules/content_translation/tests/modules/content_translation_test/content_translation_test.module, line 68
Helper module for the Content Translation tests.

Code

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