public function EntityFormController::getFormID

Returns a unique string identifying the form.

Return value

string The unique string identifying the form.

Overrides FormInterface::getFormID

File

drupal/core/lib/Drupal/Core/Entity/EntityFormController.php, line 69
Contains \Drupal\Core\Entity\EntityFormController.

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

public function getFormID() {
  $entity_type = $this->entity
    ->entityType();
  $bundle = $this->entity
    ->bundle();
  $form_id = $entity_type;
  if ($bundle != $entity_type) {
    $form_id = $bundle . '_' . $form_id;
  }
  if ($this->operation != 'default') {
    $form_id = $form_id . '_' . $this->operation;
  }
  return $form_id . '_form';
}