You are here

abstract public function SynonymsGetTrait::getSynonyms in Synonyms 8

Fetch synonyms from an entity.

Parameters

Drupal\Core\Entity\ContentEntityInterface $entity: Entity whose synonyms should be fetched.

Return value

string[] Array of extracted synonyms

1 call to SynonymsGetTrait::getSynonyms()
SynonymsGetTrait::getSynonymsMultiple in src/SynonymsProviderInterface/SynonymsGetTrait.php
Fetch synonyms from multiple entities at once.
3 methods override SynonymsGetTrait::getSynonyms()
BaseField::getSynonyms in src/Plugin/Synonyms/Provider/BaseField.php
Fetch synonyms from an entity.
EntityReferenceField::getSynonyms in src/Plugin/Synonyms/Provider/EntityReferenceField.php
Fetch synonyms from an entity.
Field::getSynonyms in src/Plugin/Synonyms/Provider/Field.php
Fetch synonyms from an entity.

File

src/SynonymsProviderInterface/SynonymsGetTrait.php, line 44

Class

SynonymsGetTrait
Trait to extract synonyms from an entity.

Namespace

Drupal\synonyms\SynonymsProviderInterface

Code

public abstract function getSynonyms(ContentEntityInterface $entity);