function SectionStorageManager::notSupported
Same name and namespace in other branches
- 11.x core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php \Drupal\layout_builder\SectionStorage\SectionStorageManager::notSupported()
Determines whether a view mode is not supported by any storage.
Parameters
string $entity_type_id: The entity type id.
string $bundle: The bundle.
string $view_mode: The view mode.
Return value
bool TRUE if the view mode is not supported, otherwise FALSE.
Overrides SupportAwareSectionStorageManagerInterface::notSupported
File
-
core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManager.php, line 114
Class
- SectionStorageManager
- Provides the Section Storage type plugin manager.
Namespace
Drupal\layout_builder\SectionStorageCode
public function notSupported(string $entity_type_id, string $bundle, string $view_mode) : bool {
$storage_types = array_keys($this->getDefinitions());
foreach ($storage_types as $storage_type) {
$storage = $this->loadEmpty($storage_type);
if (!$storage instanceof SupportAwareSectionStorageInterface) {
@trigger_error('Section storage ' . get_class($storage) . ' not implementing \\Drupal\\layout_builder\\SupportAwareSectionStorageInterface is deprecated in drupal:11.4.0 and is required from drupal:13.0.0. See https://www.drupal.org/node/3574738', E_USER_DEPRECATED);
return FALSE;
}
if ($storage->isSupported($entity_type_id, $bundle, $view_mode)) {
return FALSE;
}
}
// No plugins support this view mode.
return TRUE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.