function WorkspaceViewBuilder::createInstance
Same name in other branches
- 9 core/modules/workspaces/src/WorkspaceViewBuilder.php \Drupal\workspaces\WorkspaceViewBuilder::createInstance()
- 10 core/modules/workspaces/src/WorkspaceViewBuilder.php \Drupal\workspaces\WorkspaceViewBuilder::createInstance()
Overrides EntityViewBuilder::createInstance
File
-
core/
modules/ workspaces/ src/ WorkspaceViewBuilder.php, line 53
Class
- WorkspaceViewBuilder
- Provides a Workspace view builder.
Namespace
Drupal\workspacesCode
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
$instance = parent::createInstance($container, $entity_type);
$instance->entityTypeManager = $container->get('entity_type.manager');
$instance->workspaceAssociation = $container->get('workspaces.association');
$instance->dateFormatter = $container->get('date.formatter');
$instance->bundleInfo = $container->get('entity_type.bundle.info');
return $instance;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.