You are here

public function MappedFields::getPropertyDefinitions in Search API Field Map 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/processor/MappedFields.php \Drupal\search_api_field_map\Plugin\search_api\processor\MappedFields::getPropertyDefinitions()
  2. 8 src/Plugin/search_api/processor/MappedFields.php \Drupal\search_api_field_map\Plugin\search_api\processor\MappedFields::getPropertyDefinitions()
  3. 8.2 src/Plugin/search_api/processor/MappedFields.php \Drupal\search_api_field_map\Plugin\search_api\processor\MappedFields::getPropertyDefinitions()

File

src/Plugin/search_api/processor/MappedFields.php, line 32

Class

MappedFields
Normalize multiple content types into a single mapped field.

Namespace

Drupal\search_api_field_map\Plugin\search_api\processor

Code

public function getPropertyDefinitions(DatasourceInterface $datasource = NULL) {
  $properties = [];
  if (!$datasource) {
    $definition = [
      'label' => $this
        ->t('Mapped field'),
      'description' => $this
        ->t('Normalize multiple content types into a single mapped field.'),
      'type' => 'string',
      'processor_id' => $this
        ->getPluginId(),
    ];
    $properties['mapped_field'] = new MappedFieldProperty($definition);
  }
  return $properties;
}