public function Update310::enableModerationDashboard in Lightning Workflow 8.3
Enables the Moderation Dashboard module.
@update
@ask Do you want to enable the Moderation Dashboard module?
Parameters
\Symfony\Component\Console\Style\StyleInterface $io: The I/O handler.
File
- src/
Update/ Update310.php, line 68
Class
- Update310
- Contains optional updates targeting Lightning Workflow 3.1.0.
Namespace
Drupal\lightning_workflow\UpdateCode
public function enableModerationDashboard(StyleInterface $io) {
$installed = $this->moduleInstaller
->install([
'moderation_dashboard',
]);
if ($installed) {
$question = (string) $this
->t('Do you want users with the appropriate permissions to be redirected to the moderation dashboard when they log in?');
$this->configFactory
->getEditable('moderation_dashboard.settings')
->set('redirect_on_login', $io
->confirm($question, FALSE))
->save();
}
}