You are here

public function SocialEventManagersConfigOverride::loadOverrides in Open Social 10.1.x

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

Load overrides.

Overrides ConfigFactoryOverrideInterface::loadOverrides

File

modules/social_features/social_event/modules/social_event_managers/src/SocialEventManagersConfigOverride.php, line 21

Class

SocialEventManagersConfigOverride
Class SocialEventManagersConfigOverride.

Namespace

Drupal\social_event_managers

Code

public function loadOverrides($names) {
  $overrides = [];
  $config_name = 'core.entity_form_display.node.event.default';
  if (in_array($config_name, $names)) {
    $config = \Drupal::service('config.factory')
      ->getEditable($config_name);

    // Add a field group.
    if ($group_attachment = $config
      ->get('third_party_settings.field_group.group_attachments')) {
      $group_attachment['children'][] = 'field_event_managers';
      $overrides[$config_name]['third_party_settings']['field_group']['group_attachments'] = $group_attachment;
    }

    // Add the field to the content.
    $content = $config
      ->get('content');
    $content['field_event_managers'] = [];
    $content['field_event_managers']['settings'] = [];
    $content['field_event_managers']['settings']['match_operator'] = 'CONTAINS';
    $content['field_event_managers']['settings']['placeholder'] = '';
    $content['field_event_managers']['settings']['size'] = '60';
    $content['field_event_managers']['type'] = 'entity_reference_autocomplete';
    $content['field_event_managers']['weight'] = 100;
    $content['field_event_managers']['region'] = 'content';
    $content['field_event_managers']['third_party_settings'] = [];
    $overrides[$config_name]['content'] = $content;
  }
  return $overrides;
}