public function RestrictedNameProcessor::getPropertyDefinitions in Open Social 8.9
Same name and namespace in other branches
- 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()
- 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()
- 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()
- 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::getPropertyDefinitions()
- 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()
- 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()
Retrieves the properties this processor defines for the given datasource.
Property names have to start with a letter or an underscore, followed by any number of letters, numbers and underscores. To avoid collisions, it is also recommended to prefix the property name with the identifier of the module defining the processor.
Parameters
\Drupal\search_api\Datasource\DatasourceInterface|null $datasource: (optional) The datasource this set of properties belongs to. If NULL, the datasource-independent properties should be added (or modified).
Return value
\Drupal\search_api\Processor\ProcessorPropertyInterface[] An array of property definitions for that datasource, keyed by property names.
Overrides ProcessorPluginBase::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\processorCode
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;
}