public function PrintableEntityManager::getPrintableEntities in Printer and PDF versions for Drupal 8+ 8
Same name and namespace in other branches
- 2.x src/PrintableEntityManager.php \Drupal\printable\PrintableEntityManager::getPrintableEntities()
Get the entities that printable is available for.
Return value
array An array of entity definitions keyed by the entity type.
Overrides PrintableEntityManagerInterface::getPrintableEntities
1 call to PrintableEntityManager::getPrintableEntities()
- PrintableEntityManager::isPrintableEntity in src/
PrintableEntityManager.php - Check if an entity has a printable version available for it.
File
- src/
PrintableEntityManager.php, line 59
Class
- PrintableEntityManager
- Helper class for the printable module.
Namespace
Drupal\printableCode
public function getPrintableEntities() {
$compatible_entities = $this
->getCompatibleEntities();
$entities = [];
foreach ($this->configFactory
->get('printable.settings')
->get('printable_entities') as $entity_type) {
if (isset($compatible_entities[$entity_type])) {
$entities[$entity_type] = $compatible_entities[$entity_type];
}
}
return $entities;
}