Methods |
public addAction( $action) Add an action to the attachment.
|
public addField( $field) Add a field to the block/attachment.
|
public clearActions() Clear the actions for the attachment.
|
public clearFields() Clear the fields for the block/attachment.
|
public getActions() Get the collection of actions (buttons) to include in the attachment.
|
public getAuthorIcon() Get the author icon to use for the attachment.
|
public getAuthorLink() Get the author link to use for the attachment.
|
public getAuthorName() Get the author name to use for the attachment.
|
public getCallbackId() Get the callback id for use with interactivity.
|
public getColor() Get the color to use for the attachment.
|
public getFallback() Get the fallback text.
|
public getFields() Get the fields for the block/attachment.
|
public getFooter() Get the footer to use for the attachment.
|
public getFooterIcon() Get the footer icon to use for the attachment.
|
public getImageUrl() Get the optional image to appear within the attachment.
|
public getMarkdownFields() Get the fields Slack should interpret in its Markdown-like language.
|
public getPretext() Get the text that should appear above the formatted data.
|
public getText() Get the optional text to appear within the attachment.
|
public getThumbUrl() Get the optional thumbnail to appear within the attachment.
|
public getTimestamp() Get the timestamp to use for the attachment.
|
public getTitle() Get the title to use for the attachment.
|
public getTitleLink() Get the title link to use for the attachment.
|
public setActions( $actions) Set the collection of actions (buttons) to include in the attachment.
|
public setAuthorIcon( $author_icon) Set the author icon to use for the attachment.
|
public setAuthorLink( $author_link) Set the author link to use for the attachment.
|
public setAuthorName( $author_name) Set the author name to use for the attachment.
|
public setCallbackId( $callback_id) Set the callback id to use with interactivity.
|
public setColor( $color) Set the color to use for the attachment.
|
public setFallback( $fallback) Set the fallback text.
|
public setFields(array $fields) Set the fields for the block/attachment.
|
public setFooter( $footer) Set the footer text to use for the attachment.
|
public setFooterIcon( $footerIcon) Set the footer icon to use for the attachment.
|
public setImageUrl( $image_url) Set the optional image to appear within the attachment.
|
public setMarkdownFields(array $fields) Set the fields Slack should interpret in its Markdown-like language.
|
public setPretext( $pretext) Set the text that should appear above the formatted data.
|
public setText( $text) Set the optional text to appear within the attachment.
|
public setThumbUrl( $thumb_url) Set the optional thumbnail to appear within the attachment.
|
public setTimestamp( $timestamp) Set the timestamp to use for the attachment.
|
public setTitle( $title) Set the title to use for the attachment.
|
public setTitleLink( $title_link) Set the title link to use for the attachment.
|
public toArray() Convert this attachment to its array representation.
|
Properties |
protected $actions = [] A collection of actions (buttons) to include in the attachment. A maximum of 5 actions may be provided.
|
protected $author_icon = NULL Optional author icon for the attachment.
|
protected $author_link = NULL Optional author link for the attachment.
|
protected $author_name = NULL Optional author name for the attachment.
|
protected static $availableAttributes = ['fallback' => 'fallback', 'text' => 'text', 'image_url' => 'image_url', 'thumb_url' => 'thumb_url', 'pretext' => 'pretext', 'color' => 'color', 'footer' => 'footer', 'footer_icon' => 'footer_icon', 'timestamp' => 'timestamp', 'fields' => 'fields', 'mrkdwn_in' => 'markdown_fields', 'title' => 'title', 'title_link' => 'title_link', 'author_name' => 'author_name', 'author_link' => 'author_link', 'author_icon' => 'author_icon', 'callback_id' => 'callback_id', 'actions' => 'actions'] Internal attribute to property map.
|
protected $callback_id = NULL Optional provide callback_id used to provide interactivity callback information on the request.
|
protected $color = 'good' The color to use for the attachment.
|
protected $fallback = NULL The fallback text to use for clients that don't support attachments.
|
protected $fields = [] The fields of the block/attachment.
|
protected $footer = NULL The text to use for the attachment footer.
|
protected $footer_icon = NULL The icon to use for the attachment footer.
|
protected $image_url = NULL Optional image that should appear within the attachment.
|
protected $markdown_fields = [] The fields of the attachment that Slack should interpret with its Markdown-like language.
|
protected $pretext = NULL Optional text that should appear above the formatted data.
|
protected $text = NULL Optional text that should appear within the attachment.
|
protected $thumb_url = NULL Optional thumbnail that should appear within the attachment.
|
protected $timestamp = NULL The timestamp to use for the attachment.
|
protected $title = NULL Optional title for the attachment.
|
protected $title_link = NULL Optional title link for the attachment.
|
Methods |
protected getActionsAsArrays() Iterates over all actions in this attachment and returns them in their array form.
|
protected getFieldClass() Get the class name of valid fields.
|
protected getFieldsAsArrays() Iterates over all fields in this block/attachment and returns them in their array form.
|
Properties |
protected static $availableAttributes = ['fallback' => 'fallback', 'text' => 'text', 'image_url' => 'image_url', 'thumb_url' => 'thumb_url', 'pretext' => 'pretext', 'color' => 'color', 'footer' => 'footer', 'footer_icon' => 'footer_icon', 'timestamp' => 'timestamp', 'fields' => 'fields', 'mrkdwn_in' => 'markdown_fields', 'title' => 'title', 'title_link' => 'title_link', 'author_name' => 'author_name', 'author_link' => 'author_link', 'author_icon' => 'author_icon', 'callback_id' => 'callback_id', 'actions' => 'actions'] Internal attribute to property map.
|