function GDToolkit::getResource

Same name and namespace in other branches
  1. 9 core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php \Drupal\system\Plugin\ImageToolkit\GDToolkit::getResource()
  2. 8.9.x core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php \Drupal\system\Plugin\ImageToolkit\GDToolkit::getResource()

Retrieves the GD image resource.

Return value

\GdImage|null The GD image resource, or NULL if not available.

Deprecated

in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\system\Plugin\ImageToolkit\GDToolkit::getImage() instead.

See also

https://www.drupal.org/node/3265963

File

core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php, line 188

Class

GDToolkit
Defines the GD2 toolkit for image manipulation within Drupal.

Namespace

Drupal\system\Plugin\ImageToolkit

Code

public function getResource() {
    @trigger_error(__METHOD__ . '() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \\Drupal\\system\\Plugin\\ImageToolkit\\GDToolkit::getImage() instead. See https://www.drupal.org/node/3265963', E_USER_DEPRECATED);
    return $this->getImage();
}

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