You are here

public function S3Url::getImageStyleUrl in AmazonS3 7.2

Return the image style URL associated with this URL.

Parameters

string $styleName: The name of the image style.

Return value

\Drupal\amazons3\S3Url An image style URL.

File

src/S3Url.php, line 102

Class

S3Url
Represents an s3:// stream URL.

Namespace

Drupal\amazons3

Code

public function getImageStyleUrl($styleName) {
  $styleUrl = new S3Url($this
    ->getBucket());
  $styleUrl
    ->setPath("/styles/{$styleName}/" . $this
    ->getKey());
  return $styleUrl;
}