You are here

public function MenuTreeStorage::__construct in Multiversion 8.2

Same name and namespace in other branches
  1. 8 src/MenuTreeStorage.php \Drupal\multiversion\MenuTreeStorage::__construct()

Constructs a new \Drupal\Core\Menu\MenuTreeStorage.

Parameters

\Drupal\Core\Database\Connection $connection: A Database connection to use for reading and writing configuration data.

\Drupal\Core\Cache\CacheBackendInterface $menu_cache_backend: Cache backend instance for the extracted tree data.

\Drupal\Core\Cache\CacheTagsInvalidatorInterface $cache_tags_invalidator: The cache tags invalidator.

string $table: A database table name to store configuration data in.

array $options: (optional) Any additional database connection options to use in queries.

Overrides MenuTreeStorage::__construct

File

src/MenuTreeStorage.php, line 26

Class

MenuTreeStorage

Namespace

Drupal\multiversion

Code

public function __construct(Connection $connection, CacheBackendInterface $menu_cache_backend, CacheTagsInvalidatorInterface $cache_tags_invalidator, $table, array $options = []) {
  $this->connection = $connection;
  $this->cacheTagsInvalidator = $cache_tags_invalidator;
  $this->table = $table;
  $this->options = $options;
  $this->entityTypeManager = \Drupal::service('entity_type.manager');
  $this->workspaceManager = \Drupal::service('workspaces.manager');
  $this->menuCacheBackend = $menu_cache_backend;
}