public function SiteName::getPropertyDefinitions in Search API Field Map 4.x
Same name and namespace in other branches
- 8.3 src/Plugin/search_api/processor/SiteName.php \Drupal\search_api_field_map\Plugin\search_api\processor\SiteName::getPropertyDefinitions()
- 8 src/Plugin/search_api/processor/SiteName.php \Drupal\search_api_field_map\Plugin\search_api\processor\SiteName::getPropertyDefinitions()
- 8.2 src/Plugin/search_api/processor/SiteName.php \Drupal\search_api_field_map\Plugin\search_api\processor\SiteName::getPropertyDefinitions()
File
- src/
Plugin/ search_api/ processor/ SiteName.php, line 32
Class
- SiteName
- Adds the site name to the indexed data.
Namespace
Drupal\search_api_field_map\Plugin\search_api\processorCode
public function getPropertyDefinitions(DatasourceInterface $datasource = NULL) {
$properties = [];
if (!$datasource) {
$definition = [
'label' => $this
->t('Site Name'),
'description' => $this
->t('The name of the site from which this content originated.'),
'type' => 'string',
'processor_id' => $this
->getPluginId(),
'is_list' => TRUE,
];
$properties['site_name'] = new SiteNameProperty($definition);
}
return $properties;
}