Added fields on Slack Section block

This commit is contained in:
Daniel STANCU 2020-03-21 09:46:58 +02:00
parent cc73b1eafa
commit faad197e85
1 changed files with 13 additions and 0 deletions

View File

@ -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
*/