You are here

public function Lazy::__construct in Lazy-load 8.3

Lazy constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

\Drupal\Core\Condition\ConditionManager $condition_manager: The condition plugins manager.

\Drupal\Core\Routing\AdminContext $admin_context: The route admin context service.

\Drupal\Core\Extension\ModuleHandler $module_handler: The module manager.

File

src/Lazy.php, line 67

Class

Lazy
Lazy-load service.

Namespace

Drupal\lazy

Code

public function __construct(ConfigFactoryInterface $config_factory, RequestStack $request_stack, ConditionManager $condition_manager, AdminContext $admin_context, ModuleHandler $module_handler) {
  $this->lazySettings = $config_factory
    ->get('lazy.settings')
    ->get();
  $this->requestStack = $request_stack
    ->getCurrentRequest();
  $this->conditionManager = $condition_manager;
  $this->adminContext = $admin_context;
  $this->moduleHandler = $module_handler;
}