class SocialPostPhotoAlbumConfigOverride in Open Social 10.3.x
Same name and namespace in other branches
- 10.0.x modules/social_features/social_post/modules/social_post_album/src/SocialPostPhotoAlbumConfigOverride.php \Drupal\social_post_album\SocialPostPhotoAlbumConfigOverride
- 10.1.x modules/social_features/social_post/modules/social_post_album/src/SocialPostPhotoAlbumConfigOverride.php \Drupal\social_post_album\SocialPostPhotoAlbumConfigOverride
- 10.2.x modules/social_features/social_post/modules/social_post_album/src/SocialPostPhotoAlbumConfigOverride.php \Drupal\social_post_album\SocialPostPhotoAlbumConfigOverride
Provides an overridden elements.
@package Drupal\social_post_album
Hierarchy
- class \Drupal\social_post_album\SocialPostPhotoAlbumConfigOverride implements ConfigFactoryOverrideInterface
Expanded class hierarchy of SocialPostPhotoAlbumConfigOverride
2 string references to 'SocialPostPhotoAlbumConfigOverride'
- SocialPostPhotoAlbumConfigOverride::getCacheSuffix in modules/
social_features/ social_post/ modules/ social_post_album/ src/ SocialPostPhotoAlbumConfigOverride.php - The string to append to the configuration static cache name.
- social_post_album.services.yml in modules/
social_features/ social_post/ modules/ social_post_album/ social_post_album.services.yml - modules/social_features/social_post/modules/social_post_album/social_post_album.services.yml
1 service uses SocialPostPhotoAlbumConfigOverride
- social_post_album.override in modules/
social_features/ social_post/ modules/ social_post_album/ social_post_album.services.yml - Drupal\social_post_album\SocialPostPhotoAlbumConfigOverride
File
- modules/
social_features/ social_post/ modules/ social_post_album/ src/ SocialPostPhotoAlbumConfigOverride.php, line 14
Namespace
Drupal\social_post_albumView source
class SocialPostPhotoAlbumConfigOverride implements ConfigFactoryOverrideInterface {
/**
* Field widget or formatter type per configuration.
*/
const TYPES = [
'core.entity_form_display.post.photo.default' => 'social_post_album_image',
'core.entity_view_display.post.photo.activity' => 'album_image',
];
/**
* {@inheritdoc}
*/
public function loadOverrides($names) {
$overrides = [];
foreach (self::TYPES as $config_name => $type) {
if (in_array($config_name, $names)) {
$overrides[$config_name]['content']['field_post_image']['type'] = $type;
}
}
return $overrides;
}
/**
* {@inheritdoc}
*/
public function getCacheSuffix() {
return 'SocialPostPhotoAlbumConfigOverride';
}
/**
* {@inheritdoc}
*/
public function getCacheableMetadata($name) {
return new CacheableMetadata();
}
/**
* {@inheritdoc}
*/
public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SocialPostPhotoAlbumConfigOverride:: |
public | function |
Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface:: |
|
SocialPostPhotoAlbumConfigOverride:: |
public | function |
Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface:: |
|
SocialPostPhotoAlbumConfigOverride:: |
public | function |
The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface:: |
|
SocialPostPhotoAlbumConfigOverride:: |
public | function |
Returns config overrides. Overrides ConfigFactoryOverrideInterface:: |
|
SocialPostPhotoAlbumConfigOverride:: |
constant | Field widget or formatter type per configuration. |