You are here

public function EditableFieldsForm::prepareUniqueFormId in Editable Fields 8

Same name and namespace in other branches
  1. 1.0.x src/Form/EditableFieldsForm.php \Drupal\editablefields\Form\EditableFieldsForm::prepareUniqueFormId()

Set unique form id.

Return value

string Unique part of the form ID.

1 call to EditableFieldsForm::prepareUniqueFormId()
EditableFieldsForm::getFormId in src/Form/EditableFieldsForm.php
Returns a unique string identifying the form.

File

src/Form/EditableFieldsForm.php, line 203

Class

EditableFieldsForm
Class EditableFieldsForm.

Namespace

Drupal\editablefields\Form

Code

public function prepareUniqueFormId() {
  $entity = $this->entity;
  $parts = [
    $entity
      ->getEntityTypeId(),
    $entity
      ->bundle(),
    $entity
      ->id(),
    $this->field_name,
    $this->form_mode,
  ];
  return implode('_', $parts);
}