You are here

public function SinglePageSiteManager::__construct in Single Page Site 8

Same name and namespace in other branches
  1. 2.x src/Manager/SinglePageSiteManager.php \Drupal\single_page_site\Manager\SinglePageSiteManager::__construct()
  2. 2.0.x src/Manager/SinglePageSiteManager.php \Drupal\single_page_site\Manager\SinglePageSiteManager::__construct()

SinglePageSiteManager constructor.

Parameters

\Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel: Http kernel value.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config factory values.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher: Dispatcher value.

\Drupal\Core\Controller\ControllerResolverInterface $resolver: Resolver value.

\Drupal\Core\Menu\MenuLinkTree $menu_tree: Menu tree value.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: Language manager value.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: Module handler value.

File

src/Manager/SinglePageSiteManager.php, line 59

Class

SinglePageSiteManager
Class SinglePageSiteManager.

Namespace

Drupal\single_page_site\Manager

Code

public function __construct(HttpKernelInterface $http_kernel, ConfigFactoryInterface $config_factory, EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, MenuLinkTree $menu_tree, LanguageManagerInterface $language_manager, ModuleHandlerInterface $module_handler) {
  $this->settings = $config_factory
    ->get('single_page_site.config');
  $this->httpKernel = $http_kernel;
  $this->dispatcher = $dispatcher;
  $this->resolver = $resolver;
  $this->menuTree = $menu_tree;
  $this->languageNegotiation = $config_factory
    ->get('language.negotiation')
    ->get('url');
  $this->currentLanguage = $language_manager
    ->getCurrentLanguage()
    ->getId();
  $this->moduleHandler = $module_handler;
}