public function LibraryItemForm::getFormId

File

paragraphs/modules/paragraphs_library/src/Form/LibraryItemForm.php, line 26

Class

LibraryItemForm
Form controller for paragraph type forms.

Namespace

Drupal\paragraphs_library\Form

Code

public function getFormId() {

  // If the entity is not new, add the entity id. This will allow having more
  // than one form open when editing a library item within another.
  // To alter this form use hook_form_BASE_FORM_ID_alter.
  if ($this->entity
    ->id()) {
    return 'paragraphs_library_item_edit_form_' . $this->entity
      ->id();
  }
  return 'paragraphs_library_item_edit_form';
}