You are here

public function PrintableEntityManager::getEntityName in Printer and PDF versions for Drupal 8+ 8

Same name and namespace in other branches
  1. 2.x src/PrintableEntityManager.php \Drupal\printable\PrintableEntityManager::getEntityName()

Gets the ID of the type of the entity.

Parameters

Drupal\Core\Entity\EntityInterface $entity: The entity to check a printable version is available for.

Return value

string The entity type ID.

Overrides PrintableEntityManagerInterface::getEntityName

File

src/PrintableEntityManager.php, line 52

Class

PrintableEntityManager
Helper class for the printable module.

Namespace

Drupal\printable

Code

public function getEntityName(EntityInterface $entity) {
  return $entity
    ->getEntityTypeId();
}