You are here

public function FieldTypeToSynonyms::getSimpleFieldTypeToPropertyMap in Synonyms 8

Same name and namespace in other branches
  1. 2.0.x src/SynonymsService/FieldTypeToSynonyms.php \Drupal\synonyms\SynonymsService\FieldTypeToSynonyms::getSimpleFieldTypeToPropertyMap()

Map field types to the properties within them where synonyms are stored.

Return value

array Map where keys are simple field types and values are the properties where the corresponding field type keeps the synonyms

File

src/SynonymsService/FieldTypeToSynonyms.php, line 33

Class

FieldTypeToSynonyms
Service to map known field types to how synonyms are encoded in them.

Namespace

Drupal\synonyms\SynonymsService

Code

public function getSimpleFieldTypeToPropertyMap() {
  $map = [
    'integer' => 'value',
    'float' => 'value',
    'decimal' => 'value',
    'string' => 'value',
    'email' => 'value',
    'telephone' => 'value',
  ];
  $this->moduleHandler
    ->alter('synonyms_field_type_to_synonym', $map);
  return $map;
}