You are here

public function SocialContentBlockLandingPageConfigOverride::loadOverrides in Open Social 10.2.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_content_block/modules/social_content_block_landing_page/src/SocialContentBlockLandingPageConfigOverride.php \Drupal\social_content_block_landing_page\SocialContentBlockLandingPageConfigOverride::loadOverrides()
  2. 10.3.x modules/social_features/social_content_block/modules/social_content_block_landing_page/src/SocialContentBlockLandingPageConfigOverride.php \Drupal\social_content_block_landing_page\SocialContentBlockLandingPageConfigOverride::loadOverrides()
  3. 10.0.x modules/social_features/social_content_block/modules/social_content_block_landing_page/src/SocialContentBlockLandingPageConfigOverride.php \Drupal\social_content_block_landing_page\SocialContentBlockLandingPageConfigOverride::loadOverrides()
  4. 10.1.x modules/social_features/social_content_block/modules/social_content_block_landing_page/src/SocialContentBlockLandingPageConfigOverride.php \Drupal\social_content_block_landing_page\SocialContentBlockLandingPageConfigOverride::loadOverrides()

Returns config overrides.

Parameters

array $names: A list of configuration names that are being loaded.

Return value

array An array keyed by configuration name of override data. Override data contains a nested array structure of overrides.

Overrides ConfigFactoryOverrideInterface::loadOverrides

File

modules/social_features/social_content_block/modules/social_content_block_landing_page/src/SocialContentBlockLandingPageConfigOverride.php, line 37

Class

SocialContentBlockLandingPageConfigOverride
Class SocialContentBlockLandingPageConfigOverride.

Namespace

Drupal\social_content_block_landing_page

Code

public function loadOverrides($names) {
  $overrides = [];
  $config_name = 'field.field.paragraph.section.field_section_paragraph';
  if (in_array($config_name, $names)) {
    $dependencies = $this->configFactory
      ->getEditable($config_name)
      ->get('dependencies.config');
    $dependencies[] = 'paragraphs.paragraphs_type.custom_content_list';
    $overrides[$config_name] = [
      'dependencies' => [
        'config' => $dependencies,
      ],
      'settings' => [
        'handler_settings' => [
          'target_bundles' => [
            'custom_content_list' => 'custom_content_list',
          ],
          'target_bundles_drag_drop' => [
            'custom_content_list' => [
              'enabled' => TRUE,
              'weight' => 17,
            ],
          ],
        ],
      ],
    ];
  }
  return $overrides;
}