You are here

public function SocialLikeConfigOverride::loadOverrides in Open Social 8.2

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  2. 8 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  3. 8.3 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  4. 8.4 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  5. 8.5 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  6. 8.6 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  7. 8.7 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  8. 8.8 modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  9. 10.3.x modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  10. 10.0.x modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  11. 10.1.x modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()
  12. 10.2.x modules/social_features/social_like/src/SocialLikeConfigOverride.php \Drupal\social_like\SocialLikeConfigOverride::loadOverrides()

Returns config overrides.

Overrides ConfigFactoryOverrideInterface::loadOverrides

File

modules/social_features/social_like/src/SocialLikeConfigOverride.php, line 21

Class

SocialLikeConfigOverride
Class SocialLikeConfigOverride.

Namespace

Drupal\social_like

Code

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;
}