interface SynonymsFormatWordingProviderInterface in Synonyms 8
Interface to format a synonym into some kind of wording.
Hierarchy
- interface \Drupal\synonyms\SynonymsProviderInterface\SynonymsFormatWordingProviderInterface
Expanded class hierarchy of SynonymsFormatWordingProviderInterface
All classes that implement SynonymsFormatWordingProviderInterface
3 files declare their use of SynonymsFormatWordingProviderInterface
- BaseField.php in src/
Plugin/ Synonyms/ Provider/ BaseField.php - EntityReferenceField.php in src/
Plugin/ Synonyms/ Provider/ EntityReferenceField.php - Field.php in src/
Plugin/ Synonyms/ Provider/ Field.php
File
- src/
SynonymsProviderInterface/ SynonymsFormatWordingProviderInterface.php, line 11
Namespace
Drupal\synonyms\SynonymsProviderInterfaceView source
interface SynonymsFormatWordingProviderInterface {
/**
* Format a synonym into wording as requested by configuration.
*
* @param string $synonym
* Synonym that should be formatted.
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* Entity to which this synonym belongs.
* @param \Drupal\synonyms\SynonymInterface $synonym_config
* Synonym config entity in the context of which it all happens.
*
* @return string
* Formatted wording
*/
public function synonymFormatWording($synonym, ContentEntityInterface $entity, SynonymInterface $synonym_config);
/**
* Get available tokens for format wording.
*
* @return array
* Array of supported tokens in wording. Keys are the tokens whereas
* corresponding values are explanations about what each token means
*/
public function formatWordingAvailableTokens();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SynonymsFormatWordingProviderInterface:: |
public | function | Get available tokens for format wording. | |
SynonymsFormatWordingProviderInterface:: |
public | function | Format a synonym into wording as requested by configuration. |