Added fields on Slack Section block
This commit is contained in:
parent
cc73b1eafa
commit
faad197e85
@ -34,6 +34,19 @@ final class SlackSectionBlock extends AbstractSlackBlock
|
|||||||
return $this;
|
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
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user