public function GDToolkit::setType in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php \Drupal\system\Plugin\ImageToolkit\GDToolkit::setType()
Sets the PHP type of the image.
Parameters
int $type: The image type represented by a PHP IMAGETYPE_* constant (e.g. IMAGETYPE_JPEG).
Return value
$this
1 call to GDToolkit::setType()
- GDToolkit::parseFile in core/
modules/ system/ src/ Plugin/ ImageToolkit/ GDToolkit.php - Determines if a file contains a valid image.
File
- core/
modules/ system/ src/ Plugin/ ImageToolkit/ GDToolkit.php, line 374
Class
- GDToolkit
- Defines the GD2 toolkit for image manipulation within Drupal.
Namespace
Drupal\system\Plugin\ImageToolkitCode
public function setType($type) {
if (in_array($type, static::supportedTypes())) {
$this->type = $type;
}
return $this;
}