public function PrintableEntityManager::getPrintableEntities in Printer and PDF versions for Drupal 8+ 2.x
Same name and namespace in other branches
- 8 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 58
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;
}