You are here

public function ImagemagickExecManager::getPackageLabel in ImageMagick 8.2

Same name and namespace in other branches
  1. 8.3 src/ImagemagickExecManager.php \Drupal\imagemagick\ImagemagickExecManager::getPackageLabel()

Gets a translated label of the binaries package in use.

Parameters

string $package: (optional) Force the package.

Return value

string A translated label of the binaries package in use, or the $package argument.

Overrides ImagemagickExecManagerInterface::getPackageLabel

3 calls to ImagemagickExecManager::getPackageLabel()
ImagemagickExecManager::checkPath in src/ImagemagickExecManager.php
Verifies file path of the executable binary by checking its version.
ImagemagickExecManager::execute in src/ImagemagickExecManager.php
Executes the convert executable as shell command.
ImagemagickExecManager::runOsShell in src/ImagemagickExecManager.php
Executes a command on the operating system.

File

src/ImagemagickExecManager.php, line 167

Class

ImagemagickExecManager
Manage execution of ImageMagick/GraphicsMagick commands.

Namespace

Drupal\imagemagick

Code

public function getPackageLabel($package = NULL) {
  switch ($this
    ->getPackage($package)) {
    case 'imagemagick':
      return $this
        ->t('ImageMagick');
    case 'graphicsmagick':
      return $this
        ->t('GraphicsMagick');
    default:
      return $package;
  }
}