setMarkdownFields() public method

Set the fields Slack should interpret in its Markdown-like language.
public setMarkdownFields ( array $fields )
$fields array
Beispiel #1
0
 /**
  * Add an attachment to the message.
  *
  * @param mixed $attachment
  * @return $this
  */
 public function attach($attachment)
 {
     if ($attachment instanceof Attachment) {
         $this->attachments[] = $attachment;
         return $this;
     } elseif (is_array($attachment)) {
         $attachmentObject = new Attachment($attachment);
         if (!isset($attachment['mrkdwn_in'])) {
             $attachmentObject->setMarkdownFields($this->getMarkdownInAttachments());
         }
         $this->attachments[] = $attachmentObject;
         return $this;
     }
     throw new InvalidArgumentException('Attachment must be an instance of Maknz\\Slack\\Attachment or a keyed array');
 }