You are here

public function Wbm2cmCommands::clear in Workbench Moderation to Content Moderation 8.2

Deletes moderation state data.

@command wbm2cm:clear @aliases wbm2cm-clear

Parameters

bool $standalone: Internal use only. TRUE if the command is being run directly.

1 call to Wbm2cmCommands::clear()
Wbm2cmCommands::migrate in src/Commands/Wbm2cmCommands.php
Migrates from Workbench Moderation to Content Moderation.

File

src/Commands/Wbm2cmCommands.php, line 102

Class

Wbm2cmCommands

Namespace

Drupal\wbm2cm\Commands

Code

public function clear($standalone = TRUE) {
  $out = $this
    ->output();
  $out
    ->writeln('Removing Workbench Moderation data...');
  $messages = $this->controller
    ->executeStepWithMessages('clear');
  array_walk($messages, [
    $out,
    'writeln',
  ]);
  if ($standalone) {
    $out
      ->writeln('You should now be able to uninstall Workbench Moderation and install Content Moderation.');
  }
}