delivery-8.x-1.x-dev/modules/workspaces_negotiator_path/workspaces_negotiator_path.services.yml
modules/workspaces_negotiator_path/workspaces_negotiator_path.services.yml
services:
workspaces_negotiator_path.prefix:
class: Drupal\workspaces_negotiator_path\PathPrefixWorkspaceNegotiator
arguments: ['@entity_type.manager', '@tempstore.private', '@logger.channel.workspaces', '@messenger']
tags:
# We set a high priority, to make sure this is the first negotiator which
# is called.
- { name: workspace_negotiator, priority: 1000 }
workspaces_negotiator_path.path_processor_domain:
class: Drupal\workspaces_negotiator_path\PathProcessor
tags:
# We want this processor to run at an early stage, the workspace path
# prefix is the first part of the URL.
- { name: path_processor_inbound, priority: 1000 }
# For the outbound processor we want to run at a later stage, so that we
# can properly prepend the path prefix before other outbound processors.
- { name: path_processor_outbound, priority: 0 }
arguments: ['@workspaces.manager', '@workspaces_negotiator_path.prefix']
workspaces_negotiator_path.event_subscriber:
class: Drupal\workspaces_negotiator_path\EventSubscriber\WorkspaceRedirectSubscriber
arguments: ['@workspaces_negotiator_path.prefix']
tags:
- { name: event_subscriber }
