You are here

class RestrictedNameProcessorOverride in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_profile/modules/social_profile_privacy/src/RestrictedNameProcessorOverride.php \Drupal\social_profile_privacy\RestrictedNameProcessorOverride
  2. 8.8 modules/social_features/social_profile/modules/social_profile_privacy/src/RestrictedNameProcessorOverride.php \Drupal\social_profile_privacy\RestrictedNameProcessorOverride
  3. 10.3.x modules/social_features/social_profile/modules/social_profile_privacy/src/RestrictedNameProcessorOverride.php \Drupal\social_profile_privacy\RestrictedNameProcessorOverride
  4. 10.0.x modules/social_features/social_profile/modules/social_profile_privacy/src/RestrictedNameProcessorOverride.php \Drupal\social_profile_privacy\RestrictedNameProcessorOverride
  5. 10.1.x modules/social_features/social_profile/modules/social_profile_privacy/src/RestrictedNameProcessorOverride.php \Drupal\social_profile_privacy\RestrictedNameProcessorOverride
  6. 10.2.x modules/social_features/social_profile/modules/social_profile_privacy/src/RestrictedNameProcessorOverride.php \Drupal\social_profile_privacy\RestrictedNameProcessorOverride

Adds the Restricted Name field to our required processors.

@package Drupal\social_profile_privacy

Hierarchy

Expanded class hierarchy of RestrictedNameProcessorOverride

1 string reference to 'RestrictedNameProcessorOverride'
social_profile_privacy.services.yml in modules/social_features/social_profile/modules/social_profile_privacy/social_profile_privacy.services.yml
modules/social_features/social_profile/modules/social_profile_privacy/social_profile_privacy.services.yml
1 service uses RestrictedNameProcessorOverride
social_profile_privacy.overrider in modules/social_features/social_profile/modules/social_profile_privacy/social_profile_privacy.services.yml
Drupal\social_profile_privacy\RestrictedNameProcessorOverride

File

modules/social_features/social_profile/modules/social_profile_privacy/src/RestrictedNameProcessorOverride.php, line 13

Namespace

Drupal\social_profile_privacy
View source
class RestrictedNameProcessorOverride implements ConfigFactoryOverrideInterface {

  /**
   * Load overrides.
   */
  public function loadOverrides($names) {
    $overrides = [];

    // Set hero title block for book content type.
    $config_names = [
      'search_api.index.social_all',
      'search_api.index.social_users',
    ];
    foreach ($config_names as $config_name) {
      if (in_array($config_name, $names, TRUE)) {
        $overrides[$config_name] = [
          'processor_settings' => [
            'tokenizer' => [
              'fields' => [
                'social_profile_privacy_restricted_name' => 'social_profile_privacy_restricted_name',
              ],
            ],
            'ignorecase' => [
              'fields' => [
                'social_profile_privacy_restricted_name' => 'social_profile_privacy_restricted_name',
              ],
            ],
            'transliteration' => [
              'fields' => [
                'social_profile_privacy_restricted_name' => 'social_profile_privacy_restricted_name',
              ],
            ],
          ],
        ];
      }
    }
    return $overrides;
  }

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

  /**
   * {@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
RestrictedNameProcessorOverride::createConfigObject public function Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface::createConfigObject
RestrictedNameProcessorOverride::getCacheableMetadata public function Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface::getCacheableMetadata
RestrictedNameProcessorOverride::getCacheSuffix public function The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface::getCacheSuffix
RestrictedNameProcessorOverride::loadOverrides public function Load overrides. Overrides ConfigFactoryOverrideInterface::loadOverrides