You are here

public function EntityLegalDocument::getAcceptanceForm in Entity Legal 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Entity/EntityLegalDocument.php \Drupal\entity_legal\Entity\EntityLegalDocument::getAcceptanceForm()
  2. 4.0.x src/Entity/EntityLegalDocument.php \Drupal\entity_legal\Entity\EntityLegalDocument::getAcceptanceForm()

Get an acceptance form for this legal document.

Return value

array The drupal acceptance form.

Overrides EntityLegalDocumentInterface::getAcceptanceForm

File

src/Entity/EntityLegalDocument.php, line 118

Class

EntityLegalDocument
Defines the entity legal document entity.

Namespace

Drupal\entity_legal\Entity

Code

public function getAcceptanceForm() {

  /** @var \Drupal\entity_legal\Form\EntityLegalDocumentAcceptanceForm $form */
  $form = \Drupal::classResolver()
    ->getInstanceFromDefinition(EntityLegalDocumentAcceptanceForm::class);
  $form
    ->setDocument($this);
  return \Drupal::formBuilder()
    ->getForm($form);
}