interface SanitizePluginInterface (View source)

Implement this interface when building a Drush sql-sanitize plugin.

Methods

sanitize($result, CommandData $commandData)

Run your sanitization logic using standard Drupal APIs.

string[]
messages(array $messages, InputInterface $input)

Use #[CLI\Hook(type: HookManager::ON_EVENT, target: SanitizeCommands::CONFIRMS)]

Details

sanitize($result, CommandData $commandData)

Run your sanitization logic using standard Drupal APIs.

Parameters

$result

Exit code from the main operation for sql-sanitize.

CommandData $commandData

Information about the current request.

Use #[CLI\Hook(type: HookManager::POST_COMMAND_HOOK, target: SanitizeCommands::SANITIZE)]

string[] messages(array $messages, InputInterface $input)

Use #[CLI\Hook(type: HookManager::ON_EVENT, target: SanitizeCommands::CONFIRMS)]

Parameters

array $messages

An array of messages to show during confirmation.

InputInterface $input

The effective commandline input for this request.

Return Value

string[]

An array of messages.