You are here

public function PrintableEntityManager::isPrintableEntity 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::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 73

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());
}