Imbo\EventListener\ImageVariations\Database\DatabaseInterface::deleteImageVariations PHP Method

deleteImageVariations() public method

Remove all metadata about image variations for an image
public deleteImageVariations ( string $user, string $imageIdentifier, integer $width = null ) : boolean
$user string The user which the image belongs to
$imageIdentifier string The image identifier
$width integer Only delete the variation with this width
return boolean
    function deleteImageVariations($user, $imageIdentifier, $width = null);

Usage Example

Beispiel #1
0
 public function testCanDeleteAllTransformations()
 {
     $variations = [['width' => 770, 'height' => 564], ['width' => 385, 'height' => 282], ['width' => 192, 'height' => 140]];
     foreach ($variations as $variation) {
         $this->assertTrue($this->adapter->storeImageVariationMetadata('key', 'id', $variation['width'], $variation['height']));
     }
     $this->assertTrue($this->adapter->deleteImageVariations('key', 'id'));
     $this->assertSame(null, $this->adapter->getBestMatch('key', 'id', 100));
 }
All Usage Examples Of Imbo\EventListener\ImageVariations\Database\DatabaseInterface::deleteImageVariations