public function PrintableEntityManager::getEntityName in Printer and PDF versions for Drupal 8+ 2.x
Same name and namespace in other branches
- 8 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 51  
Class
- PrintableEntityManager
 - Helper class for the printable module.
 
Namespace
Drupal\printableCode
public function getEntityName(EntityInterface $entity) {
  return $entity
    ->getEntityTypeId();
}