You are here

protected function ImagemagickOperationTrait::getFormatMapper in Image Effects 8.3

Same name and namespace in other branches
  1. 8 src/Plugin/ImageToolkit/Operation/imagemagick/ImagemagickOperationTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\ImagemagickOperationTrait::getFormatMapper()
  2. 8.2 src/Plugin/ImageToolkit/Operation/imagemagick/ImagemagickOperationTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\ImagemagickOperationTrait::getFormatMapper()

Returns the format mapper service.

Return value

\Drupal\imagemagick\ImagemagickFormatMapperInterface The format mapper service.

File

src/Plugin/ImageToolkit/Operation/imagemagick/ImagemagickOperationTrait.php, line 23

Class

ImagemagickOperationTrait
Trait for ImageMagick image toolkit operations.

Namespace

Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick

Code

protected function getFormatMapper() {
  if (!$this->formatMapper) {
    $this->formatMapper = \Drupal::service('imagemagick.format_mapper');
  }
  return $this->formatMapper;
}