class SanitizeUserTableCommands extends DrushCommands implements SanitizePluginInterface (View source)

A sql-sanitize plugin.

Traits

ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Properties

protected $database
protected $passwordHasher
protected $entityTypeManager

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct($database, $passwordHasher, $entityTypeManager)

No description

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

sanitize($result, CommandData $commandData)

Sanitize usernames and passwords. This also an example of how to write a database sanitizer for sql-sync.

options($options = ['sanitize-email' => 'user+%uid@localhost.localdomain', 'sanitize-password' => null])

No description

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

No description

bool
isEnabled($value)

Test an option value to see if it is disabled.

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct($database, $passwordHasher, $entityTypeManager)

Parameters

$database
$passwordHasher
$entityTypeManager

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

sanitize($result, CommandData $commandData)

Sanitize usernames and passwords. This also an example of how to write a database sanitizer for sql-sync.

Parameters

$result Exit code from the main operation for sql-sanitize.
CommandData $commandData Information about the current request.

options($options = ['sanitize-email' => 'user+%uid@localhost.localdomain', 'sanitize-password' => null])

Parameters

$options

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

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.

protected bool isEnabled($value)

Test an option value to see if it is disabled.

Parameters

$value

Return Value

bool