Documentation

FormFlashInterface extends JsonSerializable

Interface FormFlashInterface

Table of Contents

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.
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.
getSessionId()  : string
Get session Id associated to this form instance.
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.

Methods

__construct()

public __construct(array<string|int, mixed> $config) : mixed
Parameters
$config : array<string|int, mixed>

Available configuration keys: session_id, unique_id, form_name

addFile()

Add existing file to the form flash.

public addFile(string $filename, string $field[, array<string|int, mixed>|null $crop = null ]) : bool
Parameters
$filename : string
$field : string
$crop : array<string|int, mixed>|null = null
Return values
bool

addUploadedFile()

Add uploaded file to the form flash.

public addUploadedFile(UploadedFileInterface $upload[, string|null $field = null ][, array<string|int, mixed>|null $crop = null ]) : string
Parameters
$upload : UploadedFileInterface
$field : string|null = null
$crop : array<string|int, mixed>|null = null
Return values
string

Return name of the file

clearFiles()

Clear form flash from all uploaded files.

public clearFiles() : void

exists()

Check if this form flash exists.

public exists() : bool
Return values
bool

getCreatedTimestamp()

Get creation timestamp for this form flash.

public getCreatedTimestamp() : int
Return values
int

getData()

Get raw form data.

public getData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getFilesByField()

Get all files associated to a form field.

public getFilesByField(string $field) : array<string|int, mixed>
Parameters
$field : string
Return values
array<string|int, mixed>

getFilesByFields()

Get all files grouped by the associated form fields.

public getFilesByFields([bool $includeOriginal = false ]) : array<string|int, mixed>
Parameters
$includeOriginal : bool = false
Return values
array<string|int, mixed>

getFormName()

Get form name associated to this form instance.

public getFormName() : string
Return values
string

getId()

Get unique form flash id if set.

public getId() : string
Return values
string

getSessionId()

Get session Id associated to this form instance.

public getSessionId() : string
Return values
string

getUniqueId()

Get unique identifier associated to this form instance.

public getUniqueId() : string
Return values
string

getUpdatedTimestamp()

Get last updated timestamp for this form flash.

public getUpdatedTimestamp() : int
Return values
int

getUrl()

Get URL associated to this form instance.

public getUrl() : string
Return values
string

getUserEmail()

Get email from the user who was associated to this form instance.

public getUserEmail() : string
Return values
string

getUsername()

Get username from the user who was associated to this form instance.

public getUsername() : string
Return values
string

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

removeFile()

Remove any file from form flash.

public removeFile(string $name[, string|null $field = null ]) : bool
Parameters
$name : string
$field : string|null = null
Return values
bool

setData()

Set raw form data.

public setData(array<string|int, mixed>|null $data) : void
Parameters
$data : array<string|int, mixed>|null

        
On this page

Search results