You are here

public function TestForm::getFormId in Drupal 9

Same name in this branch
  1. 9 core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php \Drupal\Tests\Core\Form\TestForm::getFormId()
  2. 9 core/modules/page_cache/tests/modules/src/Form/TestForm.php \Drupal\page_cache_form_test\Form\TestForm::getFormId()
  3. 9 core/modules/block/tests/modules/block_test/src/Form/TestForm.php \Drupal\block_test\Form\TestForm::getFormId()
  4. 9 core/modules/system/tests/modules/test_page_test/src/Form/TestForm.php \Drupal\test_page_test\Form\TestForm::getFormId()
Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php \Drupal\Tests\Core\Form\TestForm::getFormId()

Returns a unique string identifying the form.

The returned ID should be a unique string that can be a valid PHP function name, since it's used in hook implementation names such as hook_form_FORM_ID_alter().

Return value

string The unique string identifying the form.

Overrides FormInterface::getFormId

File

core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php, line 936
Contains \Drupal\Tests\Core\Form\FormBuilderTest.

Class

TestForm

Namespace

Drupal\Tests\Core\Form

Code

public function getFormId() {
  return 'test_form';
}