public function CrmCoreAdminNegotiator::applies in CRM Core 8.3
Whether this theme negotiator should be used to set the theme.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match object.
Return value
bool TRUE if this negotiator should be used or FALSE to let other negotiators decide.
Overrides AdminNegotiator::applies
File
- src/
Theme/ CrmCoreAdminNegotiator.php, line 23
Class
- CrmCoreAdminNegotiator
- Provides the theme negotiator to use the admin theme on crm-core pages.
Namespace
Drupal\crm_core\ThemeCode
public function applies(RouteMatchInterface $route_match) {
if ($this->configFactory
->get('crm_core.settings')
->get('custom_theme')) {
if ($route_match
->getRouteObject()) {
$path = $route_match
->getRouteObject()
->getPath();
if (strpos($path, '/crm-core') === 0) {
return TRUE;
}
}
}
return FALSE;
}