public function SearchLinks::__construct in Admin Toolbar 8.2
Same name and namespace in other branches
- 3.x admin_toolbar_search/src/SearchLinks.php \Drupal\admin_toolbar_search\SearchLinks::__construct()
Constructs a SearchLinks object.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider.
\Drupal\Core\Cache\Context\CacheContextsManager $cache_context_manager: The cache contexts manager.
\Drupal\Core\Cache\CacheBackendInterface $toolbar_cache: Cache backend instance to use.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config factory mservice.
File
- admin_toolbar_search/
src/ SearchLinks.php, line 82
Class
- SearchLinks
- Extra search links.
Namespace
Drupal\admin_toolbar_searchCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $module_handler, RouteProviderInterface $route_provider, CacheContextsManager $cache_context_manager, CacheBackendInterface $toolbar_cache, ConfigFactoryInterface $config_factory) {
$this->entityTypeManager = $entity_type_manager;
$this->moduleHandler = $module_handler;
$this->routeProvider = $route_provider;
$this->cacheContextManager = $cache_context_manager;
$this->toolbarCache = $toolbar_cache;
$this->config = $config_factory
->get('admin_toolbar_tools.settings');
}