public function MenuTreeStorage::__construct in Colossal Menu 8
Same name and namespace in other branches
- 2.x src/Menu/MenuTreeStorage.php \Drupal\colossal_menu\Menu\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\Entity\EntityTypeManagerInterface $entity_type_manager: The EntityTypeManager service.
\Drupal\Core\Routing\RouteMatchInterface $current_route_match: The currently active route match object.
string $entity_type: The entity type name.
string $table: A database table name to store configuration data in.
File
- src/
Menu/ MenuTreeStorage.php, line 66
Class
- MenuTreeStorage
- Provides a menu tree storage using the database.
Namespace
Drupal\colossal_menu\MenuCode
public function __construct(Connection $connection, EntityTypeManagerInterface $entity_type_manager, RouteMatchInterface $current_route_match, string $entity_type, string $table) {
$this->connection = $connection;
$this->storage = $entity_type_manager
->getStorage($entity_type);
$this->currentRouteMatch = $current_route_match;
$this->table = $table;
}