You are here

public function NgLightbox::__construct in NG Lightbox 8

Same name and namespace in other branches
  1. 2.x src/NgLightbox.php \Drupal\ng_lightbox\NgLightbox::__construct()

Constructs a new NgLightbox service.

Parameters

\Drupal\Core\Path\PathMatcherInterface $path_matcher: Patch matcher services for comparing the lightbox patterns.

\Drupal\Core\Path\AliasManagerInterface $alias_manager: Alias manager so we can also test path aliases.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory so we can get the lightbox settings.

File

src/NgLightbox.php, line 57

Class

NgLightbox

Namespace

Drupal\ng_lightbox

Code

public function __construct(PathMatcherInterface $path_matcher, AliasManagerInterface $alias_manager, ConfigFactoryInterface $config_factory, AdminContext $admin_context) {
  $this->pathMatcher = $path_matcher;
  $this->aliasManager = $alias_manager;
  $this->config = $config_factory
    ->get('ng_lightbox.settings');
  $this->adminContext = $admin_context;
}