You are here

public function ImagemagickToolkit::getPackage in ImageMagick 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::getPackage()

Gets the binaries package in use.

Parameters

string $package: (optional) Force the graphics package.

Return value

string The default package ('imagemagick'|'graphicsmagick'), or the $package argument.

5 calls to ImagemagickToolkit::getPackage()
ImagemagickToolkit::buildConfigurationForm in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Form constructor.
ImagemagickToolkit::checkPath in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Verifies file path of the executable binary by checking its version.
ImagemagickToolkit::getPackageLabel in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Gets a translated label of the binaries package in use.
ImagemagickToolkit::imagemagickExec in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Executes the convert executable as shell command.
ImagemagickToolkit::parseFileViaIdentify in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Parses the image file using the 'identify' executable.

File

src/Plugin/ImageToolkit/ImagemagickToolkit.php, line 397

Class

ImagemagickToolkit
Provides ImageMagick integration toolkit for image manipulation.

Namespace

Drupal\imagemagick\Plugin\ImageToolkit

Code

public function getPackage($package = NULL) {
  if ($package === NULL) {
    $package = $this->configFactory
      ->get('imagemagick.settings')
      ->get('binaries');
  }
  return $package;
}