public function RoleConfigurationHandler::loadFromDatabase in Configuration Management 7.3
Loads the configuration from the database.
Parameters
string $identifier: The identifier of the configuration to load.
Return value
\Configuration\Configuration A configuration object.
Overrides ConfigurationHandler::loadFromDatabase
File
- src/
Handlers/ RoleConfigurationHandler.php, line 36
Class
Namespace
Configuration\HandlersCode
public function loadFromDatabase($identifier) {
$name = $this
->getInternalId($identifier);
$configuration = new Configuration();
$configuration
->setIdentifier($identifier);
foreach ($this->configuration_manager
->drupal()
->role_export_roles() as $role) {
if ($role->machine_name == $name) {
unset($role->rid);
$configuration
->setData($role);
$configuration
->addModule('role_export');
break;
}
}
$event = $this
->triggerEvent('load_from_database', $configuration);
return $event->configuration;
}