You are here

public function MaintenanceModeExempt::__construct in Maintenance Exempt 8

Constructs a new maintenance mode service.

Parameters

\Drupal\Core\State\StateInterface $state: The state.

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

\Drupal\Core\Path\PathMatcherInterface $path_matcher: The path matcher service.

Overrides MaintenanceMode::__construct

File

src/MaintenanceModeExempt.php, line 41

Class

MaintenanceModeExempt
Provides the default implementation of the maintenance mode service.

Namespace

Drupal\maintenance_exempt

Code

public function __construct(StateInterface $state, RequestStack $request_stack, PathMatcherInterface $path_matcher) {
  $this->state = $state;
  $this->request = $request_stack
    ->getCurrentRequest();
  $this->pathMatcher = $path_matcher;
}