public static function BackgroundImageFormTrait::getTokenEntityMapper in Background Image 8
Same name and namespace in other branches
- 2.x src/BackgroundImageFormTrait.php \Drupal\background_image\BackgroundImageFormTrait::getTokenEntityMapper()
- 2.0.x src/BackgroundImageFormTrait.php \Drupal\background_image\BackgroundImageFormTrait::getTokenEntityMapper()
Retrieves the Token Entity Mapper service.
Return value
\Drupal\token\TokenEntityMapperInterface
1 call to BackgroundImageFormTrait::getTokenEntityMapper()
- BackgroundImageFormTrait::addTokenBrowser in src/
BackgroundImageFormTrait.php - Adds a "Browse available tokens" link to the specified element.
File
- src/
BackgroundImageFormTrait.php, line 412
Class
- BackgroundImageFormTrait
- Trait BackgroundImageFormTrait.
Namespace
Drupal\background_imageCode
public static function getTokenEntityMapper() {
if (!isset(self::$tokenEntityMapper) && static::tokenExists()) {
self::$tokenEntityMapper = \Drupal::service('token.entity_mapper');
}
return self::$tokenEntityMapper;
}