class SocialLikeConfigOverride in Open Social 8.6
Same name and namespace in other branches
- 8.9 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 8 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 8.2 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 8.3 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 8.4 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 8.5 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 8.7 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 8.8 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 10.3.x modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 10.0.x modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 10.1.x modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
- 10.2.x modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride
Class SocialLikeConfigOverride.
Example configuration override.
@package Drupal\social_like
Hierarchy
- class \Drupal\social_like\SocialLikeConfigOverride implements ConfigFactoryOverrideInterface
Expanded class hierarchy of SocialLikeConfigOverride
2 string references to 'SocialLikeConfigOverride'
- SocialLikeConfigOverride::getCacheSuffix in modules/
social_features/ social_like/ src/ SocialLikeConfigOverride.php - The string to append to the configuration static cache name.
- social_like.services.yml in modules/
social_features/ social_like/ social_like.services.yml - modules/social_features/social_like/social_like.services.yml
1 service uses SocialLikeConfigOverride
- social_like.override in modules/
social_features/ social_like/ social_like.services.yml - \Drupal\social_like\SocialLikeConfigOverride
File
- modules/
social_features/ social_like/ src/ SocialLikeConfigOverride.php, line 16
Namespace
Drupal\social_likeView source
class SocialLikeConfigOverride implements ConfigFactoryOverrideInterface {
/**
* Returns config overrides.
*/
public function loadOverrides($names) {
$overrides = [];
// Override post photo default.
$config_names = [
'core.entity_view_display.post.photo.activity',
'core.entity_view_display.post.photo.default',
];
foreach ($config_names as $config_name) {
if (in_array($config_name, $names)) {
$overrides[$config_name] = [
'content' => [
'like_and_dislike' => [
'weight' => 2,
'settings' => [],
'third_party_settings' => [],
],
],
];
}
}
return $overrides;
}
/**
* {@inheritdoc}
*/
public function getCacheSuffix() {
return 'SocialLikeConfigOverride';
}
/**
* {@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 |
---|---|---|---|---|
SocialLikeConfigOverride:: |
public | function |
Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface:: |
|
SocialLikeConfigOverride:: |
public | function |
Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface:: |
|
SocialLikeConfigOverride:: |
public | function |
The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface:: |
|
SocialLikeConfigOverride:: |
public | function |
Returns config overrides. Overrides ConfigFactoryOverrideInterface:: |