You are here

class SocialFollowLandingPageOverrides in Open Social 10.3.x

Same name and namespace in other branches
  1. 10.0.x modules/social_features/social_follow_taxonomy/modules/social_follow_landing_page/src/SocialFollowLandingPageOverrides.php \Drupal\social_follow_landing_page\SocialFollowLandingPageOverrides
  2. 10.1.x modules/social_features/social_follow_taxonomy/modules/social_follow_landing_page/src/SocialFollowLandingPageOverrides.php \Drupal\social_follow_landing_page\SocialFollowLandingPageOverrides
  3. 10.2.x modules/social_features/social_follow_taxonomy/modules/social_follow_landing_page/src/SocialFollowLandingPageOverrides.php \Drupal\social_follow_landing_page\SocialFollowLandingPageOverrides

Class SocialFollowLandingPageOverrides.

Override section paragraph settings.

@package Drupal\social_follow_landing_page

Hierarchy

Expanded class hierarchy of SocialFollowLandingPageOverrides

2 string references to 'SocialFollowLandingPageOverrides'
SocialFollowLandingPageOverrides::getCacheSuffix in modules/social_features/social_follow_taxonomy/modules/social_follow_landing_page/src/SocialFollowLandingPageOverrides.php
The string to append to the configuration static cache name.
social_follow_landing_page.services.yml in modules/social_features/social_follow_taxonomy/modules/social_follow_landing_page/social_follow_landing_page.services.yml
modules/social_features/social_follow_taxonomy/modules/social_follow_landing_page/social_follow_landing_page.services.yml
1 service uses SocialFollowLandingPageOverrides
social_follow_landing_page.overrider in modules/social_features/social_follow_taxonomy/modules/social_follow_landing_page/social_follow_landing_page.services.yml
Drupal\social_follow_landing_page\SocialFollowLandingPageOverrides

File

modules/social_features/social_follow_taxonomy/modules/social_follow_landing_page/src/SocialFollowLandingPageOverrides.php, line 17

Namespace

Drupal\social_follow_landing_page
View source
class SocialFollowLandingPageOverrides implements ConfigFactoryOverrideInterface {

  /**
   * The config factory.
   *
   * @var \Drupal\Core\Config\ConfigFactoryInterface
   */
  protected $configFactory;

  /**
   * Constructs the configuration override.
   *
   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
   *   The Drupal configuration factory.
   */
  public function __construct(ConfigFactoryInterface $config_factory) {
    $this->configFactory = $config_factory;
  }

  /**
   * {@inheritdoc}
   */
  public function loadOverrides($names) {
    $overrides = [];

    // Add tag paragraph to bundle list in section paragraph config.
    $config_name = 'field.field.paragraph.section.field_section_paragraph';
    if (in_array($config_name, $names)) {
      $overrides[$config_name]['settings']['handler_settings']['target_bundles']['tag'] = 'tag';
      $overrides[$config_name]['settings']['handler_settings']['target_bundles_drag_drop']['tag']['enabled'] = TRUE;
    }
    return $overrides;
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheSuffix() {
    return 'SocialFollowLandingPageOverrides';
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheableMetadata($name) {
    return new CacheableMetadata();
  }

  /**
   * {@inheritdoc}
   */
  public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
    return NULL;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SocialFollowLandingPageOverrides::$configFactory protected property The config factory.
SocialFollowLandingPageOverrides::createConfigObject public function Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface::createConfigObject
SocialFollowLandingPageOverrides::getCacheableMetadata public function Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface::getCacheableMetadata
SocialFollowLandingPageOverrides::getCacheSuffix public function The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface::getCacheSuffix
SocialFollowLandingPageOverrides::loadOverrides public function Returns config overrides. Overrides ConfigFactoryOverrideInterface::loadOverrides
SocialFollowLandingPageOverrides::__construct public function Constructs the configuration override.