Jinya CMS

Form extends Entity
in package
implements JsonSerializable

This class contains a form, forms allow artists to receive feedback from their site visitors

Tags

Interfaces, Classes, Traits and Enums

JsonSerializable

Table of Contents

$createdAt  : DateTime
$creatorId  : int
$description  : string
$id  : int
$lastUpdatedAt  : DateTime
$title  : string
$toAddress  : string
$updatedById  : int
create()  : void
Creates the current form
format()  : array<string, array<string, array<string, string|null>|string>|int|string>
Formats the form into an array
getCreator()  : Artist|null
Gets the creator of this form
getItems()  : Iterator<string|int, FormItem>
Gets all form items in the form
getUpdatedBy()  : Artist|null
Gets the artist that last updated this form
jsonSerialize()  : mixed
replaceItems()  : void
Replaces all form items with the new items
update()  : void
Updates the current form

Properties

$createdAt

public DateTime $createdAt

The time the form was created at

Tags

$creatorId

public int $creatorId

The ID of the artist who created the form

Tags

$description

public string $description = ''

The description of the form may contain HTML

Tags

$lastUpdatedAt

public DateTime $lastUpdatedAt

The time the form was last updated at

Tags

$title

public string $title

The title of the form

Tags

$toAddress

public string $toAddress

The email address filled out forms should be mailed to

Tags

$updatedById

public int $updatedById

The ID of the artist who last touched the form

Tags

Methods

create()

Creates the current form

public create() : void
Tags
throws
NotNullViolationException
Return values
void

format()

Formats the form into an array

public format() : array<string, array<string, array<string, string|null>|string>|int|string>
Tags
Return values
array<string, array<string, array<string, string|null>|string>|int|string>

getCreator()

Gets the creator of this form

public getCreator() : Artist|null
Tags
Return values
Artist|null

getItems()

Gets all form items in the form

public getItems() : Iterator<string|int, FormItem>
Tags
Return values
Iterator<string|int, FormItem>

getUpdatedBy()

Gets the artist that last updated this form

public getUpdatedBy() : Artist|null
Tags
Return values
Artist|null

jsonSerialize()

public jsonSerialize() : mixed
Tags
Return values
mixed

replaceItems()

Replaces all form items with the new items

public replaceItems(array<string|int, array{type: string, options?: string[], spamFilter?: string[], label: string, helpText?: string, placeholder?: string, isFromAddress?: bool, isSubject?: bool, isRequired?: bool}> $newItems) : void
Parameters
$newItems : array<string|int, array{type: string, options?: string[], spamFilter?: string[], label: string, helpText?: string, placeholder?: string, isFromAddress?: bool, isSubject?: bool, isRequired?: bool}>
Tags
throws
TransactionFailedException
throws
JsonException
Return values
void

update()

Updates the current form

public update() : void
Tags
throws
NotNullViolationException
Return values
void

Search results