public function CriticalCssProvider::isEnabled in Critical CSS 8
When accessing an admin route, this module is always disabled to avoid multiple problems with Drupal's admin theme. On the other hand, this is a module aimed to be used for a site's frontend, and not for the backend.
Overrides CriticalCssProviderInterface::isEnabled
1 call to CriticalCssProvider::isEnabled()
- CriticalCssProvider::calculateFilePaths in src/
Asset/ CriticalCssProvider.php - Get all possible paths to search, relatives to theme.
File
- src/
Asset/ CriticalCssProvider.php, line 176
Class
- CriticalCssProvider
- Critical CSS Provider.
Namespace
Drupal\critical_css\AssetCode
public function isEnabled() {
$route = $this->currentRouteMatch
->getRouteObject();
if ($route && $this->adminContext
->isAdminRoute($route)) {
return FALSE;
}
return (bool) $this->config
->get('enabled');
}