You are here

public function GDToolkit::isValid in Drupal 8

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

Checks if the image is valid.

Return value

bool TRUE if the image toolkit is currently handling a valid image, FALSE otherwise.

Overrides ImageToolkitInterface::isValid

1 call to GDToolkit::isValid()
GDToolkit::load in core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
Loads a GD resource from a file.

File

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

Class

GDToolkit
Defines the GD2 toolkit for image manipulation within Drupal.

Namespace

Drupal\system\Plugin\ImageToolkit

Code

public function isValid() {
  return (bool) $this->preLoadInfo || (bool) $this->resource;
}