FormFlash
extends FormFlash
in package
Class FormFlash
Table of Contents
Properties
- $createdTimestamp : int
- $data : array<string|int, mixed>|null
- $exists : bool
- $files : array<string|int, mixed>
- $folder : string
- $formName : string
- $id : string
- $sessionId : string
- $uniqueId : string
- $updatedTimestamp : int
- $uploadedFiles : array<string|int, mixed>
- $uploadObjects : array<string|int, string>
- $url : string
- $user : array<string|int, mixed>|null
Methods
- __construct() : mixed
- addFile() : bool
- Add existing file to the form flash.
- addUploadedFile() : string
- Add uploaded file to the form flash.
- clearFiles() : void
- Clear form flash from all uploaded files.
- cropFile() : bool
- delete() : $this
- Delete this form flash.
- exists() : bool
- Check if this form flash exists.
- getCreatedTimestamp() : int
- Get creation timestamp for this form flash.
- getData() : array<string|int, mixed>|null
- Get raw form data.
- getFilesByField() : array<string|int, mixed>
- Get all files associated to a form field.
- getFilesByFields() : array<string|int, mixed>
- Get all files grouped by the associated form fields.
- getFormName() : string
- Get form name associated to this form instance.
- getId() : string
- Get unique form flash id if set.
- getLegacyFiles() : array<string|int, mixed>
- getSessionId() : string
- Get session Id associated to this form instance.
- getTmpDir() : string
- getUniqieId() : string
- getUniqueId() : string
- Get unique identifier associated to this form instance.
- getUpdatedTimestamp() : int
- Get last updated timestamp for this form flash.
- getUrl() : string
- Get URL associated to this form instance.
- getUserEmail() : string
- Get email from the user who was associated to this form instance.
- getUsername() : string
- Get username from the user who was associated to this form instance.
- jsonSerialize() : array<string|int, mixed>
- removeFile() : bool
- Remove any file from form flash.
- save() : $this
- Save this form flash.
- setData() : void
- Set raw form data.
- setUrl() : $this
- setUser() : $this
- setUserEmail() : $this
- setUserName() : $this
- uploadFile() : bool
- addFileInternal() : void
- getTmpIndex() : YamlFile|null
- init() : void
- loadStoredForm() : array<string|int, mixed>|null
- Load raw flex flash data from the filesystem.
- removeTmpDir() : void
- removeTmpFile() : void
Properties
$createdTimestamp
protected
int
$createdTimestamp
$data
protected
array<string|int, mixed>|null
$data
$exists
protected
bool
$exists
$files
protected
array<string|int, mixed>
$files
$folder
protected
string
$folder
$formName
protected
string
$formName
$id
protected
string
$id
$sessionId
protected
string
$sessionId
$uniqueId
protected
string
$uniqueId
$updatedTimestamp
protected
int
$updatedTimestamp
$uploadedFiles
protected
array<string|int, mixed>
$uploadedFiles
$uploadObjects
protected
array<string|int, string>
$uploadObjects
$url
protected
string
$url
$user
protected
array<string|int, mixed>|null
$user
Methods
__construct()
public
__construct(mixed $config) : mixed
Parameters
- $config : mixed
-
Available configuration keys: session_id, unique_id, form_name
Tags
addFile()
Add existing file to the form flash.
public
addFile(string $filename, string $field[, array<string|int, mixed> $crop = null ]) : bool
Parameters
- $filename : string
- $field : string
- $crop : array<string|int, mixed> = null
Tags
Return values
booladdUploadedFile()
Add uploaded file to the form flash.
public
addUploadedFile(UploadedFileInterface $upload[, string $field = null ][, array<string|int, mixed> $crop = null ]) : string
Parameters
- $upload : UploadedFileInterface
- $field : string = null
- $crop : array<string|int, mixed> = null
Tags
Return values
string —Return name of the file
clearFiles()
Clear form flash from all uploaded files.
public
clearFiles() : void
Tags
cropFile()
public
cropFile(string $field, string $filename, array<string|int, mixed> $upload, array<string|int, mixed> $crop) : bool
For backwards compatibility only, do not use
Parameters
- $field : string
- $filename : string
- $upload : array<string|int, mixed>
- $crop : array<string|int, mixed>
Return values
booldelete()
Delete this form flash.
public
delete() : $this
Tags
Return values
$thisexists()
Check if this form flash exists.
public
exists() : bool
Tags
Return values
boolgetCreatedTimestamp()
Get creation timestamp for this form flash.
public
getCreatedTimestamp() : int
Tags
Return values
intgetData()
Get raw form data.
public
getData() : array<string|int, mixed>|null
Tags
Return values
array<string|int, mixed>|nullgetFilesByField()
Get all files associated to a form field.
public
getFilesByField(string $field) : array<string|int, mixed>
Parameters
- $field : string
Tags
Return values
array<string|int, mixed>getFilesByFields()
Get all files grouped by the associated form fields.
public
getFilesByFields([mixed $includeOriginal = false ]) : array<string|int, mixed>
Parameters
- $includeOriginal : mixed = false
Tags
Return values
array<string|int, mixed>getFormName()
Get form name associated to this form instance.
public
getFormName() : string
Tags
Return values
stringgetId()
Get unique form flash id if set.
public
getId() : string
Tags
Return values
stringgetLegacyFiles()
public
getLegacyFiles() : array<string|int, mixed>
For backwards compatibility only, do not use
Return values
array<string|int, mixed>getSessionId()
Get session Id associated to this form instance.
public
getSessionId() : string
Tags
Return values
stringgetTmpDir()
public
getTmpDir() : string
Return values
stringgetUniqieId()
public
getUniqieId() : string
Use '->getUniqueId()' method instead.
Return values
stringgetUniqueId()
Get unique identifier associated to this form instance.
public
getUniqueId() : string
Tags
Return values
stringgetUpdatedTimestamp()
Get last updated timestamp for this form flash.
public
getUpdatedTimestamp() : int
Tags
Return values
intgetUrl()
Get URL associated to this form instance.
public
getUrl() : string
Tags
Return values
stringgetUserEmail()
Get email from the user who was associated to this form instance.
public
getUserEmail() : string
Tags
Return values
stringgetUsername()
Get username from the user who was associated to this form instance.
public
getUsername() : string
Tags
Return values
stringjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>removeFile()
Remove any file from form flash.
public
removeFile(string $name[, string $field = null ]) : bool
Parameters
- $name : string
- $field : string = null
Tags
Return values
boolsave()
Save this form flash.
public
save([bool $force = false ]) : $this
Parameters
- $force : bool = false
Tags
Return values
$thissetData()
Set raw form data.
public
setData(array<string|int, mixed>|null $data) : void
Parameters
- $data : array<string|int, mixed>|null
Tags
setUrl()
public
setUrl(string $url) : $this
Parameters
- $url : string
Return values
$thissetUser()
public
setUser([UserInterface|null $user = null ]) : $this
Parameters
- $user : UserInterface|null = null
Return values
$thissetUserEmail()
public
setUserEmail([string|null $email = null ]) : $this
Parameters
- $email : string|null = null
Return values
$thissetUserName()
public
setUserName([string|null $username = null ]) : $this
Parameters
- $username : string|null = null
Return values
$thisuploadFile()
public
uploadFile(string $field, string $filename, array<string|int, mixed> $upload) : bool
For backwards compatibility only, do not use
Parameters
- $field : string
- $filename : string
- $upload : array<string|int, mixed>
Return values
booladdFileInternal()
protected
addFileInternal(string|null $field, string $name, array<string|int, mixed> $data[, array<string|int, mixed>|null $crop = null ]) : void
Parameters
- $field : string|null
- $name : string
- $data : array<string|int, mixed>
- $crop : array<string|int, mixed>|null = null
getTmpIndex()
protected
getTmpIndex() : YamlFile|null
Return values
YamlFile|nullinit()
protected
init(array<string|int, mixed>|null $data, array<string|int, mixed> $config) : void
Parameters
- $data : array<string|int, mixed>|null
- $config : array<string|int, mixed>
loadStoredForm()
Load raw flex flash data from the filesystem.
protected
loadStoredForm() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullremoveTmpDir()
protected
removeTmpDir() : void
removeTmpFile()
protected
removeTmpFile(string $name) : void
Parameters
- $name : string