You are here

public function PrintableEntityManager::isPrintableEntity in Printer and PDF versions for Drupal 8+ 2.x

Same name and namespace in other branches
  1. 8 src/PrintableEntityManager.php \Drupal\printable\PrintableEntityManager::isPrintableEntity()

Check if an entity has a printable version available for it.

Parameters

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

Return value

bool TRUE if the entity has a printable version available, FALSE if not.

Overrides PrintableEntityManagerInterface::isPrintableEntity

File

src/PrintableEntityManager.php, line 72

Class

PrintableEntityManager
Helper class for the printable module.

Namespace

Drupal\printable

Code

public function isPrintableEntity(EntityInterface $entity) {
  return array_key_exists($entity
    ->getEntityTypeId(), $this
    ->getPrintableEntities());
}