function FormCache::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Form/FormCache.php \Drupal\Core\Form\FormCache::__construct()
- 8.9.x core/lib/Drupal/Core/Form/FormCache.php \Drupal\Core\Form\FormCache::__construct()
- 11.x core/lib/Drupal/Core/Form/FormCache.php \Drupal\Core\Form\FormCache::__construct()
Constructs a new FormCache.
Parameters
string $root: The app root.
\Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface $key_value_expirable_factory: The key value expirable factory, used to create key value expirable stores for the form cache and form state cache.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
\Drupal\Core\Access\CsrfTokenGenerator $csrf_token: The CSRF token generator.
\Psr\Log\LoggerInterface $logger: A logger instance.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\Core\PageCache\RequestPolicyInterface $request_policy: A policy rule determining the cacheability of a request.
File
-
core/
lib/ Drupal/ Core/ Form/ FormCache.php, line 106
Class
- FormCache
- Encapsulates the caching of a form and its form state.
Namespace
Drupal\Core\FormCode
public function __construct($root, KeyValueExpirableFactoryInterface $key_value_expirable_factory, ModuleHandlerInterface $module_handler, AccountInterface $current_user, CsrfTokenGenerator $csrf_token, LoggerInterface $logger, RequestStack $request_stack, RequestPolicyInterface $request_policy) {
$this->root = $root;
$this->keyValueExpirableFactory = $key_value_expirable_factory;
$this->moduleHandler = $module_handler;
$this->currentUser = $current_user;
$this->logger = $logger;
$this->csrfToken = $csrf_token;
$this->requestStack = $request_stack;
$this->requestPolicy = $request_policy;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.