- Added some more information into the form context whether a form was sent, and what was it's return value (if there was any)
This commit is contained in:
1 parent
164a27d267
commit
1f5d38a8b9
2 files changed
+8
-5
No files matched your search
@@ -13,6 +13,8 @@ class FormContext implements FormContextInterface
|
||||
|
||||
public bool $formExecuted = false;
|
||||
|
||||
public /*mixed*/ $formExecutionStatus = null;
|
||||
|
||||
public array $values = [];
|
||||
|
||||
public array $files = [];
|
||||
@@ -64,7 +66,7 @@ class FormContext implements FormContextInterface
|
||||
|
||||
public function formSent() : bool
|
||||
{
|
||||
$valid = true;
|
||||
$valid = in_array($this->request->getMethod(), [ 'POST', 'PUT', 'PATCH', 'DELETE', ]);
|
||||
|
||||
if ( ! $this->skipCsrf && ($this->formName ?? false) ) {
|
||||
$token = $this->get('picea-ui-form')[$this->formName] ?? false;
|
||||
|
||||
Reference in new issue
Block a user