final class SanitizeUserTableListener (View source)

Sanitize emails and passwords. This also an example of how to write a database sanitizer.

Traits

A copy of \Drupal\Core\DependencyInjection\AutowireTrait with first params' type hint changed.

Methods

static 
create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

__construct(Connection $database, PasswordInterface $passwordHasher, EntityTypeManagerInterface $entityTypeManager, LoggerInterface $logger)

No description

void
onDefinition(ConsoleDefinitionsEvent $event)

No description

void
onSanitizeConfirm(SanitizeConfirmsEvent $event)

No description

void
onConsoleTerminate(ConsoleTerminateEvent $event)

No description

bool
isEnabled(string|null $value)

Test an option value to see if it is disabled.

Details

static create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

Parameters

ContainerInterface $container

The service container this instance should use.

__construct(Connection $database, PasswordInterface $passwordHasher, EntityTypeManagerInterface $entityTypeManager, LoggerInterface $logger)

No description

Parameters

Connection $database
PasswordInterface $passwordHasher
EntityTypeManagerInterface $entityTypeManager
LoggerInterface $logger

void onDefinition(ConsoleDefinitionsEvent $event)

No description

Parameters

ConsoleDefinitionsEvent $event

Return Value

void

void onSanitizeConfirm(SanitizeConfirmsEvent $event)

No description

Parameters

SanitizeConfirmsEvent $event

Return Value

void

void onConsoleTerminate(ConsoleTerminateEvent $event)

No description

Parameters

ConsoleTerminateEvent $event

Return Value

void

protected bool isEnabled(string|null $value)

Test an option value to see if it is disabled.

Parameters

string|null $value

Return Value

bool