public function ImageStylesWarmer::__construct in Image Style Warmer 8
Constructs a ImageStylesWarmer object.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Entity\EntityTypeManagerInterface $file_storage: The file storage.
\Drupal\Core\Image\ImageFactory $image_factory: The image factory.
\Drupal\Core\Entity\EntityTypeManagerInterface $image_style_storage: The image style storage.
\Drupal\Core\Queue\QueueFactory $queue_factory: The queue factory.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
ImageStylesWarmer.php, line 68
Class
- ImageStylesWarmer
- Defines an images styles warmer.
Namespace
Drupal\image_style_warmerCode
public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $file_storage, ImageFactory $image_factory, EntityTypeManagerInterface $image_style_storage, QueueFactory $queue_factory) {
$this->config = $config_factory
->get('image_style_warmer.settings');
$this->file = $file_storage
->getStorage('file');
$this->image = $image_factory;
$this->imageStyles = $image_style_storage
->getStorage('image_style');
$this->queueFactory = $queue_factory;
}