public function EntityHelper::entityTypeIsAtomic in Simple XML sitemap 4.x
Checks whether an entity type does not provide bundles.
Parameters
string $entity_type_id: The entity type ID.
Return value
bool TRUE if the entity type is atomic and FALSE otherwise.
1 call to EntityHelper::entityTypeIsAtomic()
- EntityHelper::getEntityInstanceIds in src/
Entity/ EntityHelper.php - Gets the entity IDs by entity type and bundle.
File
- src/
Entity/ EntityHelper.php, line 133
Class
- EntityHelper
- Helper class for working with entities.
Namespace
Drupal\simple_sitemap\EntityCode
public function entityTypeIsAtomic($entity_type_id) : bool {
// Menu fix.
if ($entity_type_id === 'menu_link_content') {
return FALSE;
}
$entity_types = $this->entityTypeManager
->getDefinitions();
if (!isset($entity_types[$entity_type_id])) {
// todo: Throw exception.
}
return empty($entity_types[$entity_type_id]
->getBundleEntityType());
}