class WorkspacesCron
Decorates the cron service.
Hierarchy
- class \Drupal\workspaces\WorkspacesCron implements \Drupal\Core\CronInterface
Expanded class hierarchy of WorkspacesCron
File
-
core/
modules/ workspaces/ src/ WorkspacesCron.php, line 13
Namespace
Drupal\workspacesView source
class WorkspacesCron implements CronInterface {
public function __construct(#[AutowireDecorated] protected CronInterface $inner, protected WorkspaceManagerInterface $workspaceManager) {
}
/**
* {@inheritdoc}
*/
public function run() {
// Ensure that cron tasks run without an active workspace.
return $this->workspaceManager
->executeOutsideWorkspace(fn() => $this->inner
->run());
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
|---|---|---|---|---|
| WorkspacesCron::run | public | function | Executes a cron run. | Overrides CronInterface::run |
| WorkspacesCron::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.