You are here

public function ReadonlymodeCommands::getStatus in Read only mode 2.0.x

Get the status of the read only mode.

@command readonlymode:status

@usage drush readonlymode:status Prints the warning of the read-only mode.

File

src/Commands/ReadonlymodeCommands.php, line 40

Class

ReadonlymodeCommands
The drush commands.

Namespace

Drupal\readonlymode\Commands

Code

public function getStatus() {
  if ($this->manager
    ->isReadonly()) {
    $this
      ->io()
      ->warning($this->manager
      ->getWarningMessage());
    return;
  }
  $this
    ->io()
    ->success("The read-only mode is inactive.");
}