class ThemeAccessCheck implements AccessInterface (View source)

Provides access checking for themes for routing and theme negotiation.

Properties

protected ThemeHandlerInterface $themeHandler

The theme handler.

Methods

__construct(ThemeHandlerInterface $theme_handler)

Constructs a \Drupal\Core\Theme\Registry object.

access(string $theme)

Checks access to the theme for routing.

bool
checkAccess(string $theme)

Indicates whether the theme is accessible based on whether it is installed.

Details

__construct(ThemeHandlerInterface $theme_handler)

Constructs a \Drupal\Core\Theme\Registry object.

Parameters

ThemeHandlerInterface $theme_handler

The theme handler.

AccessResultInterface access(string $theme)

Checks access to the theme for routing.

Parameters

string $theme

The name of a theme.

Return Value

AccessResultInterface

The access result.

bool checkAccess(string $theme)

Indicates whether the theme is accessible based on whether it is installed.

Parameters

string $theme

The name of a theme.

Return Value

bool

TRUE if the theme is installed, FALSE otherwise.