function ImageToolkitManager::getDefaultToolkit

Same name in other branches
  1. 9 core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php \Drupal\Core\ImageToolkit\ImageToolkitManager::getDefaultToolkit()
  2. 8.9.x core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php \Drupal\Core\ImageToolkit\ImageToolkitManager::getDefaultToolkit()
  3. 10 core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php \Drupal\Core\ImageToolkit\ImageToolkitManager::getDefaultToolkit()

Gets the default image toolkit.

Return value

\Drupal\Core\ImageToolkit\ImageToolkitInterface Object of the default toolkit, or FALSE on error.

File

core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php, line 80

Class

ImageToolkitManager
Manages image toolkit plugins.

Namespace

Drupal\Core\ImageToolkit

Code

public function getDefaultToolkit() {
    if ($toolkit_id = $this->getDefaultToolkitId()) {
        return $this->createInstance($toolkit_id);
    }
    return FALSE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.