You are here

public function SimpleForm::getFormId in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 form_api_example/src/Form/SimpleForm.php \Drupal\form_api_example\Form\SimpleForm::getFormId()

Getter method for Form ID.

The form ID is used in implementations of hook_form_alter() to allow other modules to alter the render array built by this form controller. It must be unique site wide. It normally starts with the providing module's name.

Return value

string The unique ID of the form defined by this class.

Overrides FormInterface::getFormId

File

modules/form_api_example/src/Form/SimpleForm.php, line 72

Class

SimpleForm
Implements the SimpleForm form controller.

Namespace

Drupal\form_api_example\Form

Code

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