You are here

public function EntityLegalDocumentVersion::getDocument in Entity Legal 3.0.x

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

Get attached document entity.

Return value

EntityLegalDocumentInterface The attached document entity.

Overrides EntityLegalDocumentVersionInterface::getDocument

File

src/Entity/EntityLegalDocumentVersion.php, line 185

Class

EntityLegalDocumentVersion
Defines the entity legal document version entity.

Namespace

Drupal\entity_legal\Entity

Code

public function getDocument() {
  return \Drupal::entityTypeManager()
    ->getStorage(ENTITY_LEGAL_DOCUMENT_ENTITY_NAME)
    ->load($this
    ->bundle());
}