public function ReadonlymodeCommands::postDeploy in Read only mode 2.0.x
After the deploy hook has run we can disable the readonly mode.
@hook post-command deploy:hook
File
- src/
Commands/ ReadonlymodeCommands.php, line 88
Class
- ReadonlymodeCommands
- The drush commands.
Namespace
Drupal\readonlymode\CommandsCode
public function postDeploy($result, CommandData $commandData) {
if ($result === 0) {
// We could make this configurable.
if ($this->manager
->isReadonly()) {
$this->manager
->setReadonly(FALSE);
$this
->io()
->success('Read-only mode disabled after deployment');
}
}
}