public function BundleConfigManager::getViewModeIds in Title 8.2
Get all of the view mode IDs for an entity type.
Parameters
string $entity_type: The entity type to load IDs for.
Return value
array An array of view mode IDs.
1 call to BundleConfigManager::getViewModeIds()
- BundleConfigManager::tearDownBundleState in src/
BundleConfigManager.php - Hide the title on all view modes when of a bundle when disabling.
File
- src/
BundleConfigManager.php, line 146
Class
- BundleConfigManager
- Allow management of the title module config.
Namespace
Drupal\titleCode
public function getViewModeIds($entity_type) {
$ids = [];
$view_modes = $this->entityTypeManager
->getViewModes('node');
foreach ($view_modes as $view_mode) {
$ids[] = str_replace($entity_type . '.', '', $view_mode['id']);
}
$ids[] = 'default';
return $ids;
}