public function GetSettingsFromCoreSettings::onGetSettings in Acquia Content Hub 8.2
Gets a prebuilt Settings object from Drupal's settings file.
Parameters
\Drupal\acquia_contenthub\Event\AcquiaContentHubSettingsEvent $event: The dispatched event.
See also
\Acquia\ContentHubClient\Settings
File
- src/
EventSubscriber/ GetSettings/ GetSettingsFromCoreSettings.php, line 32
Class
- GetSettingsFromCoreSettings
- Gets the ContentHub Server settings from Drupal's settings.
Namespace
Drupal\acquia_contenthub\EventSubscriber\GetSettingsCode
public function onGetSettings(AcquiaContentHubSettingsEvent $event) {
$settings = CoreSettings::get('acquia_contenthub.settings');
if ($settings && $settings instanceof ContentHubClientSettings) {
$event
->setSettings($settings);
$event
->setProvider('core_settings');
$event
->stopPropagation();
}
}