class MediaSettingsOverride in Media Download 1.0.x
Same name and namespace in other branches
- 1.2.x src/MediaSettingsOverride.php \Drupal\media_download\MediaSettingsOverride
- 1.1.x src/MediaSettingsOverride.php \Drupal\media_download\MediaSettingsOverride
Overrides the Media module's settings to forcibly enable standalone URL.
Copyright (C) 2021 Library Solutions, LLC (et al.).
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Hierarchy
- class \Drupal\media_download\MediaSettingsOverride implements ConfigFactoryOverrideInterface
Expanded class hierarchy of MediaSettingsOverride
1 string reference to 'MediaSettingsOverride'
1 service uses MediaSettingsOverride
File
- src/
MediaSettingsOverride.php, line 19
Namespace
Drupal\media_downloadView source
class MediaSettingsOverride implements ConfigFactoryOverrideInterface {
/**
* {@inheritdoc}
*/
public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function getCacheSuffix() {
return self::CLASS;
}
/**
* {@inheritdoc}
*/
public function getCacheableMetadata($name) {
return new CacheableMetadata();
}
/**
* {@inheritdoc}
*/
public function loadOverrides($names) {
$overrides = [];
if (in_array('media.settings', $names)) {
$overrides['media.settings']['standalone_url'] = TRUE;
}
return $overrides;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MediaSettingsOverride:: |
public | function |
Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface:: |
|
MediaSettingsOverride:: |
public | function |
Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface:: |
|
MediaSettingsOverride:: |
public | function |
The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface:: |
|
MediaSettingsOverride:: |
public | function |
Returns config overrides. Overrides ConfigFactoryOverrideInterface:: |