diff --git a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php index 4bda10f905..09b2ed46c8 100644 --- a/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php +++ b/src/Symfony/Component/Notifier/Bridge/Slack/Block/SlackSectionBlock.php @@ -34,6 +34,19 @@ final class SlackSectionBlock extends AbstractSlackBlock return $this; } + /** + * @return $this + */ + public function field(string $text, bool $markdown = true): self + { + $this->options['fields'][] = [ + 'type' => $markdown ? 'mrkdwn' : 'plain_text', + 'text' => $text, + ]; + + return $this; + } + /** * @return $this */