You are here

public function RestrictedNameProcessor::getPropertyDefinitions in Open Social 10.0.x

Same name and namespace in other branches
  1. 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::getPropertyDefinitions()
  2. 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::getPropertyDefinitions()
  3. 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::getPropertyDefinitions()
  4. 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::getPropertyDefinitions()
  5. 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::getPropertyDefinitions()
  6. 10.2.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::getPropertyDefinitions()

File

modules/social_features/social_profile/modules/social_profile_privacy/src/Plugin/search_api/processor/RestrictedNameProcessor.php, line 53

Class

RestrictedNameProcessor
The RestrictedNameProcessor adds the restricted name to search indexes.

Namespace

Drupal\social_profile_privacy\Plugin\search_api\processor

Code

public function getPropertyDefinitions(DatasourceInterface $datasource = NULL) {
  $properties = parent::getPropertyDefinitions($datasource);
  if ($datasource && $this
    ->supportsDataSource($datasource)) {
    $definition = [
      'label' => $this
        ->t('Restricted Name'),
      'description' => $this
        ->t('The display name that is visible for unpriviliged users.'),
      'type' => 'search_api_text',
      'is_list' => FALSE,
      'processor_id' => $this
        ->getPluginId(),
    ];
    $properties['social_profile_privacy_restricted_name'] = new ProcessorProperty($definition);
  }
  return $properties;
}