Composition Objects
Generated from actual PHP reflection and PHPDoc. Names live in the Slackblocks namespace. Use named arguments and declare(strict_types=1); values validate before construction returns.
AreaChart
An area chart for a data visualization block. Every series needs exactly one data point for each axis category. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$series
Adds data series in display order. Series names must be unique.
/** @var list<DataSeries> */
public readonly array $series;
Related types: DataSeries
$axisConfig
Sets the axis categories and labels. Every series needs exactly one point per category.
public readonly AxisConfig $axisConfig;
Related types: AxisConfig
__construct
Construct a validated immutable value.
public function __construct(array $series, AxisConfig $axisConfig, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
series | list<DataSeries> — Adds data series in display order. Series names must be unique. |
axisConfig | AxisConfig — Sets the axis categories and labels. Every series needs exactly one point per category. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: AxisConfig, JsonObject
AxisConfig
The categories and labels shared by bar, area, and line chart axes. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$categories
Adds axis categories in display order. Labels must be unique.
/** @var list<string> */
public readonly array $categories;
$xLabel
Sets the horizontal axis label.
public readonly ?string $xLabel;
$yLabel
Sets the vertical axis label.
public readonly ?string $yLabel;
__construct
Construct a validated immutable value.
public function __construct(array $categories, ?string $xLabel = NULL, ?string $yLabel = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
categories | list<string> — Adds axis categories in display order. Labels must be unique. |
xLabel | string|null — Sets the horizontal axis label. |
yLabel | string|null — Sets the vertical axis label. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
BarChart
A bar chart for a data visualization block. Every series needs exactly one data point for each axis category. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$series
Adds data series in display order. Series names must be unique.
/** @var list<DataSeries> */
public readonly array $series;
Related types: DataSeries
$axisConfig
Sets the axis categories and labels. Every series needs exactly one point per category.
public readonly AxisConfig $axisConfig;
Related types: AxisConfig
__construct
Construct a validated immutable value.
public function __construct(array $series, AxisConfig $axisConfig, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
series | list<DataSeries> — Adds data series in display order. Series names must be unique. |
axisConfig | AxisConfig — Sets the axis categories and labels. Every series needs exactly one point per category. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: AxisConfig, JsonObject
ChartSegment
One labelled segment of a pie chart. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$label
Sets the segment label.
public readonly string $label;
$value
Sets the segment's size. Must be greater than zero.
public readonly int|float $value;
__construct
Construct a validated immutable value.
public function __construct(string $label, int|float $value, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
label | string — Sets the segment label. |
value | int|float — Sets the segment's size. Must be greater than zero. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
ColumnSettings
Alignment and wrapping settings for one table column. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$align
Sets how cell content in the column is aligned.
public readonly ?ColumnAlign $align;
Related types: ColumnAlign
$isWrapped
Sets whether long cell content wraps instead of being truncated.
public readonly ?bool $isWrapped;
__construct
Construct a validated immutable value.
public function __construct(?ColumnAlign $align = NULL, ?bool $isWrapped = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
align | ColumnAlign|null — Sets how cell content in the column is aligned. |
isWrapped | bool|null — Sets whether long cell content wraps instead of being truncated. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: ColumnAlign, JsonObject
Confirmation
A dialog that asks users to confirm an action before it is sent. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$title
Sets the dialog title.
public readonly PlainText $title;
Related types: PlainText
$text
Sets the explanatory text in the dialog body.
public readonly Text $text;
Related types: Text
$confirm
Sets the label of the button that confirms the action.
public readonly PlainText $confirm;
Related types: PlainText
$deny
Sets the label of the button that cancels the action.
public readonly PlainText $deny;
Related types: PlainText
$style
Sets the emphasis of the confirm button.
public readonly ?ButtonStyle $style;
Related types: ButtonStyle
__construct
Construct a validated immutable value.
public function __construct(PlainText|string $title, Text|string $text, PlainText|string $confirm, PlainText|string $deny, ?ButtonStyle $style = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
title | PlainText|string — Sets the dialog title. |
text | Text|string — Sets the explanatory text in the dialog body. |
confirm | PlainText|string — Sets the label of the button that confirms the action. |
deny | PlainText|string — Sets the label of the button that cancels the action. |
style | ButtonStyle|null — Sets the emphasis of the confirm button. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: ButtonStyle, JsonObject, PlainText, Text
ConversationFilter
Limits which conversations a conversation menu offers. Set at least one filter. Include only im, mpim, private, and public. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$include
Adds conversation types to offer: im, mpim, private, or public.
/** @var list<string>|null */
public readonly ?array $include;
$excludeExternalSharedChannels
Sets whether externally shared channels are excluded.
public readonly ?bool $excludeExternalSharedChannels;
$excludeBotUsers
Sets whether bot users are excluded.
public readonly ?bool $excludeBotUsers;
__construct
Construct a validated immutable value.
public function __construct(?array $include = NULL, ?bool $excludeExternalSharedChannels = NULL, ?bool $excludeBotUsers = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
include | list<string>|null — Adds conversation types to offer: im, mpim, private, or public. |
excludeExternalSharedChannels | bool|null — Sets whether externally shared channels are excluded. |
excludeBotUsers | bool|null — Sets whether bot users are excluded. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
DataPoint
One value of a chart series, keyed by axis category. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$label
Sets the axis category this point belongs to.
public readonly string $label;
$value
Sets the point's value.
public readonly int|float $value;
__construct
Construct a validated immutable value.
public function __construct(string $label, int|float $value, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
label | string — Sets the axis category this point belongs to. |
value | int|float — Sets the point's value. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
DataSeries
A named series of chart data points. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$name
Sets the series name shown in the legend.
public readonly string $name;
$data
Adds data points in axis-category order.
/** @var list<DataPoint> */
public readonly array $data;
Related types: DataPoint
__construct
Construct a validated immutable value.
public function __construct(string $name, array $data, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
name | string — Sets the series name shown in the legend. |
data | list<DataPoint> — Adds data points in axis-category order. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
DispatchActionConfiguration
Chooses which interactions with an input send a block_actions payload. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$triggerActionsOn
Adds the interactions that send a payload: on_enter_pressed or on_character_entered.
/** @var list<string>|null */
public readonly ?array $triggerActionsOn;
__construct
Construct a validated immutable value.
public function __construct(?array $triggerActionsOn = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
triggerActionsOn | list<string>|null — Adds the interactions that send a payload: on_enter_pressed or on_character_entered. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
FeedbackButton
One button of a feedback buttons element. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$text
Sets the button label.
public readonly PlainText $text;
Related types: PlainText
$value
Sets the application-defined value sent in interaction payloads.
public readonly string $value;
$accessibilityLabel
Sets the label read by screen readers in place of the visible text.
public readonly ?string $accessibilityLabel;
__construct
Construct a validated immutable value.
public function __construct(PlainText|string $text, string $value, ?string $accessibilityLabel = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
text | PlainText|string — Sets the button label. |
value | string — Sets the application-defined value sent in interaction payloads. |
accessibilityLabel | string|null — Sets the label read by screen readers in place of the visible text. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, PlainText
InputParameter
A named value passed to a workflow trigger. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$name
Sets the workflow input parameter name.
public readonly string $name;
$value
Sets the value passed to the workflow input.
public readonly string $value;
__construct
Construct a validated immutable value.
public function __construct(string $name, string $value, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
name | string — Sets the workflow input parameter name. |
value | string — Sets the value passed to the workflow input. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
LineChart
A line chart for a data visualization block. Every series needs exactly one data point for each axis category. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$series
Adds data series in display order. Series names must be unique.
/** @var list<DataSeries> */
public readonly array $series;
Related types: DataSeries
$axisConfig
Sets the axis categories and labels. Every series needs exactly one point per category.
public readonly AxisConfig $axisConfig;
Related types: AxisConfig
__construct
Construct a validated immutable value.
public function __construct(array $series, AxisConfig $axisConfig, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
series | list<DataSeries> — Adds data series in display order. Series names must be unique. |
axisConfig | AxisConfig — Sets the axis categories and labels. Every series needs exactly one point per category. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: AxisConfig, JsonObject
MarkdownText
A mrkdwn text composition object. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$text
Sets the mrkdwn-formatted text content.
public readonly string $text;
$verbatim
Sets whether Slack leaves URLs, mentions, and channel names unlinked.
public readonly ?bool $verbatim;
__construct
Construct a validated immutable value.
public function __construct(string $text, ?bool $verbatim = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
text | string — Sets the mrkdwn-formatted text content. |
verbatim | bool|null — Sets whether Slack leaves URLs, mentions, and channel names unlinked. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
getText
Returns the text content through the Text interface.
public function getText(): string
Option
A selectable option for menus, checkboxes, radio buttons, and overflow menus. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$text
Sets the option label shown to users.
public readonly Text $text;
Related types: Text
$value
Sets the value sent in interaction payloads when this option is chosen.
public readonly string $value;
$description
Sets supporting text shown below the label. Only rendered by checkboxes and radio buttons.
public readonly ?Text $description;
Related types: Text
$url
Sets a URL loaded in the user's browser when an overflow menu option is chosen.
public readonly ?string $url;
__construct
Construct a validated immutable value.
public function __construct(Text|string $text, string $value, Text|string|null $description = NULL, ?string $url = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
text | Text|string — Sets the option label shown to users. |
value | string — Sets the value sent in interaction payloads when this option is chosen. |
description | Text|string|null — Sets supporting text shown below the label. Only rendered by checkboxes and radio buttons. |
url | string|null — Sets a URL loaded in the user's browser when an overflow menu option is chosen. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, Text
OptionGroup
A labelled group of options in a static select menu. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$label
Sets the group heading.
public readonly PlainText $label;
Related types: PlainText
$options
Adds selectable options in display order.
/** @var list<Option> */
public readonly array $options;
Related types: Option
__construct
Construct a validated immutable value.
public function __construct(PlainText|string $label, array $options, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
label | PlainText|string — Sets the group heading. |
options | list<Option> — Adds selectable options in display order. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, PlainText
PieChart
A pie chart for a data visualization block. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$segments
Adds pie segments in display order.
/** @var list<ChartSegment> */
public readonly array $segments;
Related types: ChartSegment
__construct
Construct a validated immutable value.
public function __construct(array $segments, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
segments | list<ChartSegment> — Adds pie segments in display order. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
PlainText
A plain-text composition object. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$text
Sets the text content.
public readonly string $text;
$emoji
Sets whether emoji shortcodes such as 🎉 are rendered as emoji.
public readonly ?bool $emoji;
__construct
Construct a validated immutable value.
public function __construct(string $text, ?bool $emoji = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
text | string — Sets the text content. |
emoji | bool|null — Sets whether emoji shortcodes such as 🎉 are rendered as emoji. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
getText
Returns the text content through the Text interface.
public function getText(): string
RawNumber
A numeric data table cell with display text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$value
Sets the numeric value used for sorting.
public readonly int|float $value;
$text
Sets the formatted text displayed for the number, such as 1,234.5.
public readonly string $text;
__construct
Construct a validated immutable value.
public function __construct(int|float $value, string $text, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
value | int|float — Sets the numeric value used for sorting. |
text | string — Sets the formatted text displayed for the number, such as 1,234.5. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
RawText
An unformatted table cell. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$text
Sets the cell text.
public readonly string $text;
__construct
Construct a validated immutable value.
public function __construct(string $text, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
text | string — Sets the cell text. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
RichTextChannel
A channel mention inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$channelId
Sets the ID of the mentioned channel.
public readonly string $channelId;
$style
Sets the mention style.
public readonly ?RichTextStyle $style;
Related types: RichTextStyle
__construct
Construct a validated immutable value.
public function __construct(string $channelId, ?RichTextStyle $style = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
channelId | string — Sets the ID of the mentioned channel. |
style | RichTextStyle|null — Sets the mention style. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, RichTextStyle
RichTextCodeBlock
A preformatted code block inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$elements
Adds inline rich text elements in display order.
/** @var list<RichTextSectionElement> */
public readonly array $elements;
Related types: RichTextSectionElement
$border
Sets the width of the left border, in pixels.
public readonly ?int $border;
__construct
Construct a validated immutable value.
public function __construct(array $elements, ?int $border = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
elements | list<RichTextSectionElement> — Adds inline rich text elements in display order. |
border | int|null — Sets the width of the left border, in pixels. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
RichTextEmoji
An emoji inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$name
Sets the emoji shortcode name, without colons.
public readonly string $name;
$skinTone
Sets the emoji skin tone, from 1 to 6.
public readonly ?int $skinTone;
__construct
Construct a validated immutable value.
public function __construct(string $name, ?int $skinTone = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
name | string — Sets the emoji shortcode name, without colons. |
skinTone | int|null — Sets the emoji skin tone, from 1 to 6. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
RichTextLink
A hyperlink inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$url
Sets the link target.
public readonly string $url;
$text
Sets the visible link text. Slack shows the URL when omitted.
public readonly ?string $text;
$style
Sets the visual style.
public readonly ?RichTextStyle $style;
Related types: RichTextStyle
$unsafe
Sets whether Slack treats the link as unsafe.
public readonly ?bool $unsafe;
__construct
Construct a validated immutable value.
public function __construct(string $url, ?string $text = NULL, ?RichTextStyle $style = NULL, ?bool $unsafe = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
url | string — Sets the link target. |
text | string|null — Sets the visible link text. Slack shows the URL when omitted. |
style | RichTextStyle|null — Sets the visual style. |
unsafe | bool|null — Sets whether Slack treats the link as unsafe. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, RichTextStyle
RichTextList
A bulleted or numbered list inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$style
Sets whether the list is bulleted or numbered.
public readonly RichTextListStyle $style;
Related types: RichTextListStyle
$elements
Adds list items, one rich text section per item.
/** @var list<RichTextSection> */
public readonly array $elements;
Related types: RichTextSection
$indent
Sets the list's indentation level.
public readonly ?int $indent;
$offset
Sets the number of items to skip when numbering an ordered list.
public readonly ?int $offset;
$border
Sets the width of the left border, in pixels.
public readonly ?int $border;
__construct
Construct a validated immutable value.
public function __construct(RichTextListStyle $style, array $elements, ?int $indent = NULL, ?int $offset = NULL, ?int $border = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
style | RichTextListStyle — Sets whether the list is bulleted or numbered. |
elements | list<RichTextSection> — Adds list items, one rich text section per item. |
indent | int|null — Sets the list's indentation level. |
offset | int|null — Sets the number of items to skip when numbering an ordered list. |
border | int|null — Sets the width of the left border, in pixels. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, RichTextListStyle
RichTextQuote
A quotation inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$elements
Adds inline rich text elements in display order.
/** @var list<RichTextSectionElement> */
public readonly array $elements;
Related types: RichTextSectionElement
$border
Sets the width of the left border, in pixels.
public readonly ?int $border;
__construct
Construct a validated immutable value.
public function __construct(array $elements, ?int $border = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
elements | list<RichTextSectionElement> — Adds inline rich text elements in display order. |
border | int|null — Sets the width of the left border, in pixels. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
RichTextSection
A paragraph of inline rich text elements. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$elements
Adds inline rich text elements in display order.
/** @var list<RichTextSectionElement> */
public readonly array $elements;
Related types: RichTextSectionElement
__construct
Construct a validated immutable value.
public function __construct(array $elements, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
elements | list<RichTextSectionElement> — Adds inline rich text elements in display order. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
RichTextText
A run of optionally styled text inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$text
Sets the text content.
public readonly string $text;
$style
Sets the visual style.
public readonly ?RichTextStyle $style;
Related types: RichTextStyle
__construct
Construct a validated immutable value.
public function __construct(string $text, ?RichTextStyle $style = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
text | string — Sets the text content. |
style | RichTextStyle|null — Sets the visual style. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, RichTextStyle
RichTextUser
A user mention inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$userId
Sets the ID of the mentioned user.
public readonly string $userId;
$style
Sets the visual style.
public readonly ?RichTextStyle $style;
Related types: RichTextStyle
__construct
Construct a validated immutable value.
public function __construct(string $userId, ?RichTextStyle $style = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
userId | string — Sets the ID of the mentioned user. |
style | RichTextStyle|null — Sets the visual style. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, RichTextStyle
RichTextUserGroup
A user group mention inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$userGroupId
Sets the ID of the mentioned user group.
public readonly string $userGroupId;
$style
Sets the visual style.
public readonly ?RichTextStyle $style;
Related types: RichTextStyle
__construct
Construct a validated immutable value.
public function __construct(string $userGroupId, ?RichTextStyle $style = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
userGroupId | string — Sets the ID of the mentioned user group. |
style | RichTextStyle|null — Sets the visual style. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, RichTextStyle
SlackFile
A reference to an image file hosted in Slack. Provide exactly one of an ID or a URL. An ID must match ^F[A-Z0-9]{8,}$. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$id
Sets the ID of a file previously uploaded to Slack. Cannot be combined with a URL.
public readonly ?string $id;
$url
Sets the URL of a file hosted in Slack. Cannot be combined with an ID.
public readonly ?string $url;
__construct
Construct a validated immutable value.
public function __construct(?string $id = NULL, ?string $url = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
id | string|null — Sets the ID of a file previously uploaded to Slack. Cannot be combined with a URL. |
url | string|null — Sets the URL of a file hosted in Slack. Cannot be combined with an ID. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
SlackIcon
A Slack-provided icon, referenced by name. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$name
Sets the name of the Slack-provided icon, such as rocket.
public readonly string $name;
__construct
Construct a validated immutable value.
public function __construct(string $name, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
name | string — Sets the name of the Slack-provided icon, such as rocket. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
Trigger
A link trigger that starts a workflow. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$url
Sets the link trigger URL.
public readonly string $url;
$customizableInputParameters
Adds the input values passed to the workflow's trigger.
/** @var list<InputParameter>|null */
public readonly ?array $customizableInputParameters;
Related types: InputParameter
__construct
Construct a validated immutable value.
public function __construct(string $url, ?array $customizableInputParameters = NULL, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
url | string — Sets the link trigger URL. |
customizableInputParameters | list<InputParameter>|null — Adds the input values passed to the workflow's trigger. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
UrlSource
A linked source cited by a task card. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$url
Sets the source URL.
public readonly string $url;
$text
Sets the source link text.
public readonly string $text;
__construct
Construct a validated immutable value.
public function __construct(string $url, string $text, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
url | string — Sets the source URL. |
text | string — Sets the source link text. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject
Workflow
The workflow started by a workflow button. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().
See the Slack reference.
$trigger
Sets the link trigger that starts the workflow.
public readonly Trigger $trigger;
Related types: Trigger
__construct
Construct a validated immutable value.
public function __construct(Trigger $trigger, ?JsonObject $extensions = NULL)
| Parameter | Description |
|---|---|
trigger | Trigger — Sets the link trigger that starts the workflow. |
extensions | JsonObject|null — Additional JSON fields; modeled names and type are reserved. |
| Throws | When |
|---|---|
ValidationError | A content or contextual rule fails. PHP rejects incompatible call signatures with native errors. |
Related types: JsonObject, Trigger
fromUrl
Builds a workflow trigger from a Slack workflow URL.
public static function fromUrl(string $url, array $parameters = []): self
| Parameter | Description |
|---|---|
url | string — Slack workflow trigger URL. |
parameters | list<InputParameter> — Ordered customizable workflow inputs; an empty list is omitted. |
Returns: self Workflow containing the validated trigger and supplied inputs.
| Throws | When |
|---|---|
ValidationError | The URL or customizable inputs are invalid. |