public function ViewEditForm::__construct in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views_ui/src/ViewEditForm.php \Drupal\views_ui\ViewEditForm::__construct()
- 10 core/modules/views_ui/src/ViewEditForm.php \Drupal\views_ui\ViewEditForm::__construct()
Constructs a new ViewEditForm object.
Parameters
\Drupal\Core\TempStore\SharedTempStoreFactory $temp_store_factory: The factory for the temp store object.
\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack object.
\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date Formatter service.
\Drupal\Core\Render\ElementInfoManagerInterface $element_info: The element info manager.
\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager.
File
- core/
modules/ views_ui/ src/ ViewEditForm.php, line 78
Class
- ViewEditForm
- Form controller for the Views edit form.
Namespace
Drupal\views_uiCode
public function __construct(SharedTempStoreFactory $temp_store_factory, RequestStack $requestStack, DateFormatterInterface $date_formatter, ElementInfoManagerInterface $element_info, ThemeManagerInterface $theme_manager = NULL) {
$this->tempStore = $temp_store_factory
->get('views');
$this->requestStack = $requestStack;
$this->dateFormatter = $date_formatter;
$this->elementInfo = $element_info;
if ($theme_manager === NULL) {
@trigger_error('Calling ' . __METHOD__ . ' without the $theme_manager argument is deprecated in drupal:9.1.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3159506', E_USER_DEPRECATED);
$theme_manager = \Drupal::service('theme.manager');
}
$this->themeManager = $theme_manager;
}