class SectionBlock implements BlockContract

Properties

protected string|null $blockId

A string acting as a unique identifier for a block.

protected TextObject|null $text

The text for the block, in the form of a text object.

protected TextObject[] $fields

Required if no text is provided. An array of text objects.

protected ElementContract|null $accessory

One of the available element objects.

Methods

id(string $id)

Set the block identifier.

text(string $text)

Set the text for the block.

field(string $text)

Add a field to the block.

accessory(ElementContract $element)

Set the accessory for the block.

array
toArray()

Get the instance as an array.

Details

at line 53
SectionBlock id(string $id)

Set the block identifier.

Parameters

string $id

Return Value

SectionBlock

at line 63
TextObject text(string $text)

Set the text for the block.

Parameters

string $text

Return Value

TextObject

at line 73
TextObject field(string $text)

Add a field to the block.

Parameters

string $text

Return Value

TextObject

at line 83
SectionBlock accessory(ElementContract $element)

Set the accessory for the block.

Parameters

ElementContract $element

Return Value

SectionBlock

at line 93
array toArray()

Get the instance as an array.

Return Value

array