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