public function RoleConfigurationHandler::removeFromDatabase in Configuration Management 7.3
Deletes a configuration from the database.
Parameters
\Configuration\Configuration $configuration: The configuration to be deleted.
Overrides ConfigurationHandler::removeFromDatabase
File
- src/
Handlers/ RoleConfigurationHandler.php, line 73
Class
Namespace
Configuration\HandlersCode
public function removeFromDatabase(Configuration $configuration) {
$name = $this
->getInternalId($configuration
->getIdentifier());
if ($name == 'anonymous_user' || $name == 'authenticated_user') {
return;
}
$event = $this
->triggerEvent('remove_from_database', $configuration);
$role = $event->configuration
->getData();
$this->configuration_manager
->drupal()
->user_role_delete($role);
}