class WorkspaceServiceProvider in Workspace 8.2
Defines a service provider for the workspace module.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\workspace\WorkspaceServiceProvider
Expanded class hierarchy of WorkspaceServiceProvider
File
- src/
WorkspaceServiceProvider.php, line 11
Namespace
Drupal\workspaceView source
class WorkspaceServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
// Add the 'workspace' cache context as required.
$renderer_config = $container
->getParameter('renderer.config');
$renderer_config['required_cache_contexts'][] = 'workspace';
$container
->setParameter('renderer.config', $renderer_config);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |
WorkspaceServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |