private function DibaCarousel::getEntityTypes in Diba carousel slider 8
Get entity types list.
1 call to DibaCarousel::getEntityTypes()
- DibaCarousel::blockForm in src/
Plugin/ Block/ DibaCarousel.php
File
- src/
Plugin/ Block/ DibaCarousel.php, line 585
Class
- DibaCarousel
- Provides a Diba carousel Block.
Namespace
Drupal\diba_carousel\Plugin\BlockCode
private function getEntityTypes() {
$entities = [];
$entity_definitions = $this->entityTypeManager
->getDefinitions();
if (!empty($entity_definitions)) {
foreach ($entity_definitions as $definition) {
// Ensure that the entity type is fieldable.
if ($definition instanceof ContentEntityType && $definition
->get('field_ui_base_route')) {
$entities[$definition
->id()] = $definition
->id();
}
}
}
return $entities;
}