You are here

public function TestToolkit::save in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::save()
  2. 9 core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php \Drupal\image_test\Plugin\ImageToolkit\TestToolkit::save()

Writes an image resource to a destination file.

Parameters

string $destination: A string file URI or path where the image should be saved.

Return value

bool TRUE on success, FALSE on failure.

Overrides ImageToolkitInterface::save

File

core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php, line 148

Class

TestToolkit
Defines a Test toolkit for image manipulation within Drupal.

Namespace

Drupal\image_test\Plugin\ImageToolkit

Code

public function save($destination) {
  $this
    ->logCall('save', func_get_args());

  // Return false so that image_save() doesn't try to chmod the destination
  // file that we didn't bother to create.
  return FALSE;
}