You are here

protected function TextOverlayImageEffect::getTokenTreeBuilder in Image Effects 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageEffect/TextOverlayImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\TextOverlayImageEffect::getTokenTreeBuilder()
  2. 8.2 src/Plugin/ImageEffect/TextOverlayImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\TextOverlayImageEffect::getTokenTreeBuilder()

Returns the token.tree_builder service, if available.

Return value

\Drupal\token\TreeBuilderInterface|null The token.tree_builder service if available, NULL otherwise.

1 call to TextOverlayImageEffect::getTokenTreeBuilder()
TextOverlayImageEffect::buildConfigurationForm in src/Plugin/ImageEffect/TextOverlayImageEffect.php
Form constructor.

File

src/Plugin/ImageEffect/TextOverlayImageEffect.php, line 129

Class

TextOverlayImageEffect
Overlays text on the image, defining text font, size and positioning.

Namespace

Drupal\image_effects\Plugin\ImageEffect

Code

protected function getTokenTreeBuilder() {
  return \Drupal::hasService('token.tree_builder') ? \Drupal::service('token.tree_builder') : NULL;
}