function 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\Form

Code

public function __construct(SessionInterface $session, CacheTagsInvalidatorInterface $invalidator) {
  $this->session = $session;
  $this->cacheTagInvalidator = $invalidator;
}