public function TestToolkit::setType in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::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 TestToolkit::setType()
- TestToolkit::parseFile in core/
modules/ system/ tests/ modules/ image_test/ src/ Plugin/ ImageToolkit/ TestToolkit.php - Determines if a file contains a valid image.
File
- core/
modules/ system/ tests/ modules/ image_test/ src/ Plugin/ ImageToolkit/ TestToolkit.php, line 219 - Contains \Drupal\image_test\Plugin\ImageToolkit\TestToolkit.
Class
- TestToolkit
- Defines a Test toolkit for image manipulation within Drupal.
Namespace
Drupal\image_test\Plugin\ImageToolkitCode
public function setType($type) {
if (in_array($type, static::supportedTypes())) {
$this->type = $type;
}
return $this;
}