public function CronWorkspaceNegotiator::applies in Multiversion 8
Parameters
\Symfony\Component\HttpFoundation\Request $request:
Return value
boolean
Overrides WorkspaceNegotiatorInterface::applies
File
- src/
Workspace/ CronWorkspaceNegotiator.php, line 28
Class
Namespace
Drupal\multiversion\WorkspaceCode
public function applies(Request $request) {
// This negotiator only applies if the current route is 'system.cron',
// 'system.run_cron' or '<none>';
$route = $request->attributes
->get('_route');
return in_array($route, [
'system.cron',
'system.run_cron',
'<none>',
]);
}