public function RestrictedNameProcessor::preIndexSave in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_profile/modules/social_profile_privacy/src/Plugin/search_api/processor/RestrictedNameProcessor.php \Drupal\social_profile_privacy\Plugin\search_api\processor\RestrictedNameProcessor::preIndexSave()
- 8.7 modules/social_features/social_profile/modules/social_profile_privacy/src/Plugin/search_api/processor/RestrictedNameProcessor.php \Drupal\social_profile_privacy\Plugin\search_api\processor\RestrictedNameProcessor::preIndexSave()
- 8.8 modules/social_features/social_profile/modules/social_profile_privacy/src/Plugin/search_api/processor/RestrictedNameProcessor.php \Drupal\social_profile_privacy\Plugin\search_api\processor\RestrictedNameProcessor::preIndexSave()
- 10.3.x modules/social_features/social_profile/modules/social_profile_privacy/src/Plugin/search_api/processor/RestrictedNameProcessor.php \Drupal\social_profile_privacy\Plugin\search_api\processor\RestrictedNameProcessor::preIndexSave()
- 10.0.x modules/social_features/social_profile/modules/social_profile_privacy/src/Plugin/search_api/processor/RestrictedNameProcessor.php \Drupal\social_profile_privacy\Plugin\search_api\processor\RestrictedNameProcessor::preIndexSave()
- 10.1.x modules/social_features/social_profile/modules/social_profile_privacy/src/Plugin/search_api/processor/RestrictedNameProcessor.php \Drupal\social_profile_privacy\Plugin\search_api\processor\RestrictedNameProcessor::preIndexSave()
File
- modules/
social_features/ social_profile/ modules/ social_profile_privacy/ src/ Plugin/ search_api/ processor/ RestrictedNameProcessor.php, line 73
Class
- RestrictedNameProcessor
- The RestrictedNameProcessor adds the restricted name to search indexes.
Namespace
Drupal\social_profile_privacy\Plugin\search_api\processorCode
public function preIndexSave() {
$datasources = $this
->getIndex()
->getDatasources();
// Ensure that we have our "Restricted Name" field for all our supported
// datasources.
foreach ($datasources as $datasource_id => $datasource) {
if ($this
->supportsDataSource($datasource)) {
$this
->ensureField($datasource_id, 'social_profile_privacy_restricted_name');
}
}
}