public function EntityHelper::entityTypeIsAtomic in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 src/EntityHelper.php \Drupal\simple_sitemap\EntityHelper::entityTypeIsAtomic()
Checks whether an entity type does not provide bundles.
Parameters
string $entity_type_id:
Return value
bool
File
- src/
EntityHelper.php, line 86
Class
- EntityHelper
- Class EntityHelper @package Drupal\simple_sitemap
Namespace
Drupal\simple_sitemapCode
public function entityTypeIsAtomic($entity_type_id) {
// 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()) ? TRUE : FALSE;
}