You are here

trait ImagemagickOperationTrait in Image Effects 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageToolkit/Operation/imagemagick/ImagemagickOperationTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\ImagemagickOperationTrait
  2. 8.2 src/Plugin/ImageToolkit/Operation/imagemagick/ImagemagickOperationTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\ImagemagickOperationTrait

Trait for ImageMagick image toolkit operations.

Hierarchy

File

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

Namespace

Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick
View source
trait ImagemagickOperationTrait {

  /**
   * The format mapper service.
   *
   * @var \Drupal\imagemagick\ImagemagickFormatMapperInterface
   */
  protected $formatMapper;

  /**
   * Returns the format mapper service.
   *
   * @return \Drupal\imagemagick\ImagemagickFormatMapperInterface
   *   The format mapper service.
   */
  protected function getFormatMapper() {
    if (!$this->formatMapper) {
      $this->formatMapper = \Drupal::service('imagemagick.format_mapper');
    }
    return $this->formatMapper;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ImagemagickOperationTrait::$formatMapper protected property The format mapper service.
ImagemagickOperationTrait::getFormatMapper protected function Returns the format mapper service.