public function QuickEditController::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/quickedit/src/QuickEditController.php \Drupal\quickedit\QuickEditController::__construct()
Constructs a new QuickEditController.
Parameters
\Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory: The PrivateTempStore factory.
\Drupal\quickedit\MetadataGeneratorInterface $metadata_generator: The in-place editing metadata generator.
\Drupal\quickedit\EditorSelectorInterface $editor_selector: The in-place editor selector.
\Drupal\Core\Render\RendererInterface $renderer: The renderer.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository service.
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.
File
- core/
modules/ quickedit/ src/ QuickEditController.php, line 85
Class
- QuickEditController
- Returns responses for Quick Edit module routes.
Namespace
Drupal\quickeditCode
public function __construct(PrivateTempStoreFactory $temp_store_factory, MetadataGeneratorInterface $metadata_generator, EditorSelectorInterface $editor_selector, RendererInterface $renderer, EntityDisplayRepositoryInterface $entity_display_repository, EntityRepositoryInterface $entity_repository) {
$this->tempStoreFactory = $temp_store_factory;
$this->metadataGenerator = $metadata_generator;
$this->editorSelector = $editor_selector;
$this->renderer = $renderer;
if (!$entity_display_repository) {
@trigger_error('The entity_display.repository service must be passed to QuickEditController::__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 (!$entity_repository) {
@trigger_error('The entity.repository service must be passed to QuickEditController::__construct(), it is required before Drupal 9.0.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$entity_repository = \Drupal::service('entity.repository');
}
$this->entityRepository = $entity_repository;
}