function SessionExampleForm::__construct
Same name in other branches
- 8.x-1.x session_example/src/Form/SessionExampleForm.php \Drupal\session_example\Form\SessionExampleForm::__construct()
- 4.0.x modules/session_example/src/Form/SessionExampleForm.php \Drupal\session_example\Form\SessionExampleForm::__construct()
Constructs a new SessionExampleForm object.
Parameters
\Symfony\Component\HttpFoundation\Session\SessionInterface $session: The session object.
\Drupal\Core\Cache\CacheTagsInvalidatorInterface $invalidator: The cache tag invalidator service.
File
-
modules/
session_example/ src/ Form/ SessionExampleForm.php, line 50
Class
- SessionExampleForm
- Form to allow the user to store information in their session.
Namespace
Drupal\session_example\FormCode
public function __construct(SessionInterface $session, CacheTagsInvalidatorInterface $invalidator) {
$this->session = $session;
$this->cacheTagInvalidator = $invalidator;
}