You are here

protected function TextOverlayImageEffect::getTextimageFactory 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::getTextimageFactory()
  2. 8.2 src/Plugin/ImageEffect/TextOverlayImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\TextOverlayImageEffect::getTextimageFactory()

Returns the textimage.factory service, if available.

Return value

\Drupal\textimage\TextimageFactory|null The textimage.factory service if available, NULL otherwise.

3 calls to TextOverlayImageEffect::getTextimageFactory()
TextOverlayImageEffect::buildConfigurationForm in src/Plugin/ImageEffect/TextOverlayImageEffect.php
Form constructor.
TextOverlayImageEffect::buildPreviewRender in src/Plugin/ImageEffect/TextOverlayImageEffect.php
Builds a render array with the Text Overlay preview.
TextOverlayImageEffect::getTextWrapper in src/Plugin/ImageEffect/TextOverlayImageEffect.php
Get the image containing the text.

File

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

Class

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

Namespace

Drupal\image_effects\Plugin\ImageEffect

Code

protected function getTextimageFactory() {
  return \Drupal::hasService('textimage.factory') ? \Drupal::service('textimage.factory') : NULL;
}