function ImageStyle::fileDefaultScheme

Same name in other branches
  1. 9 core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::fileDefaultScheme()
  2. 10 core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::fileDefaultScheme()
  3. 11.x core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::fileDefaultScheme()

Provides a wrapper to allow unit testing.

Gets the default file stream implementation.

Return value

string 'public', 'private' or any other file scheme defined as the default.

1 call to ImageStyle::fileDefaultScheme()
ImageStyle::buildUri in core/modules/image/src/Entity/ImageStyle.php
Returns the URI of this image when using this style.

File

core/modules/image/src/Entity/ImageStyle.php, line 561

Class

ImageStyle
Defines an image style configuration entity.

Namespace

Drupal\image\Entity

Code

protected function fileDefaultScheme() {
    return \Drupal::config('system.file')->get('default_scheme');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.