function QuickEditImageController::__construct
Same name in other branches
- 9 core/modules/quickedit/src/Controller/QuickEditImageController.php \Drupal\quickedit\Controller\QuickEditImageController::__construct()
- 9 core/modules/image/src/Controller/QuickEditImageController.php \Drupal\image\Controller\QuickEditImageController::__construct()
Constructs a new QuickEditImageController.
Parameters
\Drupal\Core\Render\RendererInterface $renderer: The renderer.
\Drupal\Core\Image\ImageFactory $image_factory: The image factory.
\Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory: The tempstore factory.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository service.
\Drupal\Core\File\FileSystemInterface $file_system: The file system.
File
-
core/
modules/ image/ src/ Controller/ QuickEditImageController.php, line 74
Class
- QuickEditImageController
- Returns responses for our image routes.
Namespace
Drupal\image\ControllerCode
public function __construct(RendererInterface $renderer, ImageFactory $image_factory, PrivateTempStoreFactory $temp_store_factory, EntityDisplayRepositoryInterface $entity_display_repository = NULL, FileSystemInterface $file_system = NULL) {
$this->renderer = $renderer;
$this->imageFactory = $image_factory;
$this->tempStore = $temp_store_factory->get('quickedit');
if (!$entity_display_repository) {
@trigger_error('The entity_display.repository service must be passed to QuickEditImageController::__construct(), it is required before Drupal 9.0.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$entity_display_repository = \Drupal::service('entity_display.repository');
}
$this->entityDisplayRepository = $entity_display_repository;
if (!$file_system) {
@trigger_error('The file_system service must be passed to QuickEditImageController::__construct(), it is required before Drupal 9.0.0. See https://www.drupal.org/node/3006851.', E_USER_DEPRECATED);
$file_system = \Drupal::service('file_system');
}
$this->fileSystem = $file_system;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.