3 namespace Drupal\workspaces;
5 use Drupal\Core\DependencyInjection\ContainerBuilder;
6 use Drupal\Core\DependencyInjection\ServiceProviderBase;
9 * Defines a service provider for the Workspaces module.
11 class WorkspacesServiceProvider extends ServiceProviderBase {
16 public function alter(ContainerBuilder $container) {
17 // Add the 'workspace' cache context as required.
18 $renderer_config = $container->getParameter('renderer.config');
19 $renderer_config['required_cache_contexts'][] = 'workspace';
20 $container->setParameter('renderer.config', $renderer_config);