function ViewUIConverter::__construct
Same name in this branch
- 8.9.x core/modules/views_ui/src/ProxyClass/ParamConverter/ViewUIConverter.php \Drupal\views_ui\ProxyClass\ParamConverter\ViewUIConverter::__construct()
Same name in other branches
- 9 core/modules/views_ui/src/ProxyClass/ParamConverter/ViewUIConverter.php \Drupal\views_ui\ProxyClass\ParamConverter\ViewUIConverter::__construct()
- 9 core/modules/views_ui/src/ParamConverter/ViewUIConverter.php \Drupal\views_ui\ParamConverter\ViewUIConverter::__construct()
- 10 core/modules/views_ui/src/ProxyClass/ParamConverter/ViewUIConverter.php \Drupal\views_ui\ProxyClass\ParamConverter\ViewUIConverter::__construct()
- 10 core/modules/views_ui/src/ParamConverter/ViewUIConverter.php \Drupal\views_ui\ParamConverter\ViewUIConverter::__construct()
- 11.x core/modules/views_ui/src/ProxyClass/ParamConverter/ViewUIConverter.php \Drupal\views_ui\ProxyClass\ParamConverter\ViewUIConverter::__construct()
- 11.x core/modules/views_ui/src/ParamConverter/ViewUIConverter.php \Drupal\views_ui\ParamConverter\ViewUIConverter::__construct()
Constructs a new ViewUIConverter.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\TempStore\SharedTempStoreFactory $temp_store_factory: The factory for the temp store object.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Routing\AdminContext $admin_context: The route admin context service.
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.
Overrides AdminPathConfigEntityConverter::__construct
File
-
core/
modules/ views_ui/ src/ ParamConverter/ ViewUIConverter.php, line 53
Class
- ViewUIConverter
- Provides upcasting for a view entity to be used in the Views UI.
Namespace
Drupal\views_ui\ParamConverterCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, SharedTempStoreFactory $temp_store_factory, ConfigFactoryInterface $config_factory = NULL, AdminContext $admin_context = NULL, $entity_repository = NULL) {
// The config factory and admin context are new arguments due to changing
// the parent. Avoid an error on updated sites by falling back to getting
// them from the container.
// @todo Remove in 8.2.x in https://www.drupal.org/node/2674328.
if (!$config_factory) {
$config_factory = \Drupal::configFactory();
}
if (!$admin_context) {
$admin_context = \Drupal::service('router.admin_context');
}
parent::__construct($entity_type_manager, $config_factory, $admin_context, $entity_repository);
$this->tempStoreFactory = $temp_store_factory;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.