Maknz\Slack\Message::setAllowMarkdown PHP Method

setAllowMarkdown() public method

Set whether message text should be formatted with Slack's Markdown-like language.
public setAllowMarkdown ( boolean $value ) : void
$value boolean
return void
    public function setAllowMarkdown($value)
    {
        $this->allow_markdown = (bool) $value;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * Create a new message with defaults.
  *
  * @return \Maknz\Slack\Message
  */
 public function createMessage()
 {
     $message = new Message($this);
     $message->setChannel($this->getDefaultChannel());
     $message->setUsername($this->getDefaultUsername());
     $message->setIcon($this->getDefaultIcon());
     $message->setAllowMarkdown($this->getAllowMarkdown());
     $message->setMarkdownInAttachments($this->getMarkdownInAttachments());
     return $message;
 }