You are here

public function RouteProvider::__construct in Multiversion 8

Constructs a new PathMatcher.

Parameters

\Drupal\Core\Database\Connection $connection: A database connection object.

\Drupal\Core\State\StateInterface $state: The state.

\Drupal\Core\Path\CurrentPathStack $current_path: The current path.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend.

\Drupal\Core\PathProcessor\InboundPathProcessorInterface $path_processor: The path processor.

\Drupal\Core\Cache\CacheTagsInvalidatorInterface $cache_tag_invalidator: The cache tag invalidator.

string $table: (Optional) The table in the database to use for matching. Defaults to 'router'

\Drupal\Core\Language\LanguageManagerInterface $language_manager: (Optional) The language manager.

Overrides RouteProvider::__construct

File

src/RouteProvider.php, line 31

Class

RouteProvider
Overrides core RouteProvider.

Namespace

Drupal\multiversion

Code

public function __construct(Connection $connection, StateInterface $state, CurrentPathStack $current_path, CacheBackendInterface $cache_backend, InboundPathProcessorInterface $path_processor, CacheTagsInvalidatorInterface $cache_tag_invalidator, $table = 'router', LanguageManagerInterface $language_manager = NULL, WorkspaceManagerInterface $workspace_manager) {

  // @todo Remove this when Multiversion requires Drupal 8.5 or newer.
  if (floatval(\Drupal::VERSION) < 8.5) {
    parent::__construct($connection, $state, $current_path, $cache_backend, $path_processor, $cache_tag_invalidator, $table);
  }
  else {
    parent::__construct($connection, $state, $current_path, $cache_backend, $path_processor, $cache_tag_invalidator, $table, $language_manager);
  }
  $this->workspaceManager = $workspace_manager;
}