You are here

public function Webp::__construct in WebP 8

Webp constructor.

Parameters

\Drupal\Core\Image\ImageFactory $imageFactory: Image factory to be used.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $loggerFactory: Logger channel factory.

\Drupal\Core\StringTranslation\TranslationInterface $stringTranslation: String translation interface.

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: Configuration factory.

\Drupal\Core\File\FileSystem $fileSystem: The file system service.

File

src/Webp.php, line 65

Class

Webp
Class Webp.

Namespace

Drupal\webp

Code

public function __construct(ImageFactory $imageFactory, LoggerChannelFactoryInterface $loggerFactory, TranslationInterface $stringTranslation, ConfigFactoryInterface $configFactory, FileSystem $fileSystem) {
  $this->imageFactory = $imageFactory;
  $this->logger = $loggerFactory
    ->get('webp');
  $this
    ->setStringTranslation($stringTranslation);
  $this->defaultQuality = $configFactory
    ->get('webp.settings')
    ->get('quality');
  $this->fileSystem = $fileSystem;
}