private function EntityManagerWrapper::getStorageDecorator in Devel 8
Same name and namespace in other branches
- 8.3 webprofiler/src/Entity/EntityManagerWrapper.php \Drupal\webprofiler\Entity\EntityManagerWrapper::getStorageDecorator()
- 8.2 webprofiler/src/Entity/EntityManagerWrapper.php \Drupal\webprofiler\Entity\EntityManagerWrapper::getStorageDecorator()
- 4.x webprofiler/src/Entity/EntityManagerWrapper.php \Drupal\webprofiler\Entity\EntityManagerWrapper::getStorageDecorator()
Parameters
$entity_type:
$handler:
Return value
\Drupal\webprofiler\Entity\EntityDecorator
1 call to EntityManagerWrapper::getStorageDecorator()
- EntityManagerWrapper::getStorage in webprofiler/
src/ Entity/ EntityManagerWrapper.php - Creates a new storage instance.
File
- webprofiler/
src/ Entity/ EntityManagerWrapper.php, line 90
Class
- EntityManagerWrapper
- Class EntityManagerWrapper
Namespace
Drupal\webprofiler\EntityCode
private function getStorageDecorator($entity_type, $handler) {
if ($handler instanceof ConfigEntityStorageInterface) {
switch ($entity_type) {
case 'taxonomy_vocabulary':
return new VocabularyStorageDecorator($handler);
break;
case 'user_role':
return new RoleStorageDecorator($handler);
break;
case 'shortcut_set':
return new ShortcutSetStorageDecorator($handler);
break;
case 'image_style':
return new ImageStyleStorageDecorator($handler);
break;
default:
return new ConfigEntityStorageDecorator($handler);
break;
}
}
return $handler;
}