ImageBlock
class ImageBlock implements BlockContract
Properties
| protected string|null | $blockId | A string acting as a unique identifier for a block. |
|
| protected string | $url | The URL of the image to be displayed. |
|
| protected string|null | $altText | A plain-text summary of the image. |
|
| protected PlainTextOnlyTextObject|null | $title | An optional title for the image in the form of a text object that can only be of type: plain_text. |
Methods
__construct(string $url, string|null $altText = null)
Create a new image block instance.
id(string $id)
Set the block identifier.
alt(string $altText)
Set the alt text for the image.
title(string $title)
Set the title for the image.
array
toArray()
Get the instance as an array.
Details
at line 47
__construct(string $url, string|null $altText = null)
Create a new image block instance.
at line 60
ImageBlock
id(string $id)
Set the block identifier.
at line 70
ImageBlock
alt(string $altText)
Set the alt text for the image.
at line 84
PlainTextOnlyTextObject
title(string $title)
Set the title for the image.
at line 94
array
toArray()
Get the instance as an array.