ContextBlock
class ContextBlock implements BlockContract
Properties
| protected string|null | $blockId | A string acting as a unique identifier for a block. |
|
| protected ElementContract[] | $elements | An array of image elements and text objects. |
Methods
id(string $id)
Set the block identifier.
image(string $imageUrl, string|null $altText = null)
Add an image element to the block.
text(string $text)
Add a text element to the block.
array
toArray()
Get the instance as an array.
Details
at line 38
ContextBlock
id(string $id)
Set the block identifier.
at line 48
ImageElement
image(string $imageUrl, string|null $altText = null)
Add an image element to the block.
at line 58
TextObject
text(string $text)
Add a text element to the block.
at line 68
array
toArray()
Get the instance as an array.