protected function SearchLinks::getBundleableEntitiesList in Admin Toolbar 3.x
Same name and namespace in other branches
- 8.2 admin_toolbar_search/src/SearchLinks.php \Drupal\admin_toolbar_search\SearchLinks::getBundleableEntitiesList()
Gets a list of content entities.
Return value
array An array of metadata about content entities.
1 call to SearchLinks::getBundleableEntitiesList()
- SearchLinks::getLinks in admin_toolbar_search/
src/ SearchLinks.php - Gets extra links for admin toolbar search feature.
File
- admin_toolbar_search/
src/ SearchLinks.php, line 290
Class
- SearchLinks
- Extra search links.
Namespace
Drupal\admin_toolbar_searchCode
protected function getBundleableEntitiesList() {
$entity_types = $this->entityTypeManager
->getDefinitions();
$content_entities = [];
foreach ($entity_types as $key => $entity_type) {
if ($entity_type
->getBundleEntityType() && $entity_type
->get('field_ui_base_route') != '') {
$content_entities[$key] = [
'content_entity' => $key,
'content_entity_bundle' => $entity_type
->getBundleEntityType(),
];
}
}
return $content_entities;
}