Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sessionless
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
sessionless
Merge requests
!1
#3295666
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
#3295666
issue/sessionless-3295666:1.x
into
1.x
Overview
14
Commits
4
Pipelines
1
Changes
12
Open
Nitin Lama
requested to merge
issue/sessionless-3295666:1.x
into
1.x
1 year ago
Overview
14
Commits
4
Pipelines
1
Changes
12
Expand
#3295666
Addressing 10.1, 10.2, 10.3, 10.4, 10.5, 10.7, 10.8, 10.9
0
0
Merge request reports
Compare
1.x
version 3
9b24816f
9 months ago
version 2
1ee27560
1 year ago
version 1
157773bb
1 year ago
1.x (HEAD)
and
latest version
latest version
92aa22e9
4 commits,
9 months ago
version 3
9b24816f
3 commits,
9 months ago
version 2
1ee27560
2 commits,
1 year ago
version 1
157773bb
1 commit,
1 year ago
12 files
+
277
−
18
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
12
Search (e.g. *.vue) (Ctrl+P)
sessionless_forms/src/SessionlessFormCache.php
+
52
−
0
Options
@@ -22,18 +22,64 @@ use Drupal\sessionless\CryptoService;
*/
class
SessionlessFormCache
implements
FormCacheInterface
{
/**
* The root directory of the Drupal installation.
*
* @var string
*/
protected
string
$root
;
/**
* The module handler.
*
* @var \Drupal\Core\Extension\ModuleHandlerInterface
*/
protected
ModuleHandlerInterface
$moduleHandler
;
/**
* The currently logged-in user account.
*
* @var \Drupal\Core\Session\AccountInterface
*/
protected
AccountInterface
$currentUser
;
/**
* The CSRF token generator.
*
* @var \Drupal\Core\Access\CsrfTokenGenerator
*/
protected
CsrfTokenGenerator
$csrfToken
;
/**
* The logger channel.
*
* @var \Drupal\Core\Logger\LoggerChannelInterface
*/
protected
LoggerChannelInterface
$logger
;
/**
* The cryptography service.
*
* @var \Drupal\sessionless\CryptoService
*/
protected
CryptoService
$cryptoService
;
/**
* Constructs a new Drupal\sessionless_forms\SessionlessFormCache object.
*
* @param string $root
* The app root.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
* The module handler.
* @param \Drupal\Core\Session\AccountInterface $currentUser
* The current user.
* @param \Drupal\Core\Access\CsrfTokenGenerator $csrfToken
* The CSRF token generator.
* @param \Drupal\Core\Logger\LoggerChannelInterface $logger
* The logger.
* @param \Drupal\sessionless\CryptoService $cryptoService
* The cryptography service.
*/
public
function
__construct
(
string
$root
,
ModuleHandlerInterface
$moduleHandler
,
AccountInterface
$currentUser
,
CsrfTokenGenerator
$csrfToken
,
LoggerChannelInterface
$logger
,
CryptoService
$cryptoService
)
{
$this
->
root
=
$root
;
$this
->
moduleHandler
=
$moduleHandler
;
@@ -43,6 +89,9 @@ class SessionlessFormCache implements FormCacheInterface {
$this
->
cryptoService
=
$cryptoService
;
}
/**
* {@inheritdoc}
*/
public
function
getCache
(
$form_build_id
,
FormStateInterface
$form_state
)
{
$input
=
$form_state
->
getUserInput
();
if
(
@@ -120,6 +169,9 @@ class SessionlessFormCache implements FormCacheInterface {
}
}
/**
* {@inheritdoc}
*/
public
function
deleteCache
(
$form_build_id
)
{}
}
Loading