public function FileDownloadController::__construct in WebP 8
Constructs a FileDownloadController object.
Parameters
\Drupal\Core\StreamWrapper\StreamWrapperManagerInterface|null $streamWrapperManager: The stream wrapper manager.
\Drupal\webp\Webp $webp: WebP driver.
\Drupal\Core\Image\ImageFactory $image_factory: The image factory.
File
- src/
Controller/ FileDownloadController.php, line 57
Class
Namespace
Drupal\webp\ControllerCode
public function __construct(StreamWrapperManagerInterface $streamWrapperManager = NULL, Webp $webp, ImageFactory $image_factory) {
if (!$streamWrapperManager) {
@trigger_error('Calling FileDownloadController::__construct() without the $streamWrapperManager argument is deprecated in drupal:8.8.0. The $streamWrapperManager argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3035273', E_USER_DEPRECATED);
$streamWrapperManager = \Drupal::service('stream_wrapper_manager');
}
$this->streamWrapperManager = $streamWrapperManager;
$this->webp = $webp;
$this->imageFactory = $image_factory;
$this->logger = $this
->getLogger('image');
}