You are here

protected function ImagemagickEventSubscriber::prependArguments in ImageMagick 8.2

Same name and namespace in other branches
  1. 8.3 src/EventSubscriber/ImagemagickEventSubscriber.php \Drupal\imagemagick\EventSubscriber\ImagemagickEventSubscriber::prependArguments()

Adds configured arguments at the beginning of the list.

Parameters

\Drupal\imagemagick\ImagemagickExecArguments $arguments: The ImageMagick/GraphicsMagick execution arguments object.

2 calls to ImagemagickEventSubscriber::prependArguments()
ImagemagickEventSubscriber::preConvertExecute in src/EventSubscriber/ImagemagickEventSubscriber.php
Fires before the 'convert' command is executed.
ImagemagickEventSubscriber::preIdentifyExecute in src/EventSubscriber/ImagemagickEventSubscriber.php
Fires before the 'identify' command is executed.

File

src/EventSubscriber/ImagemagickEventSubscriber.php, line 161

Class

ImagemagickEventSubscriber
Imagemagick's module Event Subscriber.

Namespace

Drupal\imagemagick\EventSubscriber

Code

protected function prependArguments(ImagemagickExecArguments $arguments) {

  // Add prepended arguments if needed.
  if ($prepend = $this->imagemagickSettings
    ->get('prepend')) {
    $arguments
      ->add($prepend, $this->imagemagickSettings
      ->get('prepend_pre_source') ? ImagemagickExecArguments::PRE_SOURCE : ImagemagickExecArguments::POST_SOURCE, 0);
  }
}