You are here

class WorkspaceServiceProvider in Workspace 8.2

Defines a service provider for the workspace module.

Hierarchy

Expanded class hierarchy of WorkspaceServiceProvider

File

src/WorkspaceServiceProvider.php, line 11

Namespace

Drupal\workspace
View 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

Namesort descending Modifiers Type Description Overrides
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1
WorkspaceServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter