Свойство | Type | Description | |
---|---|---|---|
$actions | array | A maximum of 5 actions may be provided. | |
$author_icon | string | Optional author icon for the attachment. | |
$author_link | string | Optional author link for the attachment. | |
$author_name | string | Optional author name for the attachment. | |
$color | string | The color to use for the attachment. | |
$fallback | string | The fallback text to use for clients that don't support attachments. | |
$fields | array | The fields of the attachment. | |
$footer | string | The text to use for the attachment footer. | |
$footer_icon | string | The icon to use for the attachment footer. | |
$image_url | string | Optional image that should appear within the attachment. | |
$markdown_fields | array | The fields of the attachment that Slack should interpret with its Markdown-like language. | |
$pretext | string | Optional text that should appear above the formatted data. | |
$text | string | Optional text that should appear within the attachment. | |
$thumb_url | string | Optional thumbnail that should appear within the attachment. | |
$timestamp | DateTime | The timestamp to use for the attachment. | |
$title | string | Optional title for the attachment. | |
$title_link | string | Optional title link for the attachment. |
Méthode | Description | |
---|---|---|
__construct ( array $attributes ) : void | Instantiate a new Attachment. | |
addAction ( mixed $action ) | Add an action to the attachment. | |
addField ( mixed $field ) | Add a field to the attachment. | |
clearActions ( ) | Clear the actions for the attachment. | |
clearFields ( ) | Clear the fields for the attachment. | |
getActions ( ) : |
Get the collection of actions (buttons) to include in the attachment. | |
getAuthorIcon ( ) : string | Get the author icon to use for the attachment. | |
getAuthorLink ( ) : string | Get the author link to use for the attachment. | |
getAuthorName ( ) : string | Get the author name to use for the attachment. | |
getColor ( ) : string | Get the color to use for the attachment. | |
getFallback ( ) : string | Get the fallback text. | |
getFields ( ) : array | Get the fields for the attachment. | |
getFooter ( ) : string | Get the footer to use for the attachment. | |
getFooterIcon ( ) : string | Get the footer icon to use for the attachment. | |
getImageUrl ( ) : string | Get the optional image to appear within the attachment. | |
getMarkdownFields ( ) : array | Get the fields Slack should interpret in its Markdown-like language. | |
getPretext ( ) : string | Get the text that should appear above the formatted data. | |
getText ( ) : string | Get the optional text to appear within the attachment. | |
getThumbUrl ( ) : string | Get the optional thumbnail to appear within the attachment. | |
getTimestamp ( ) : DateTime | Get the timestamp to use for the attachment. | |
getTitle ( ) : string | Get the title to use for the attachment. | |
getTitleLink ( ) : string | Get the title link to use for the attachment. | |
setActions ( array $actions ) : |
Set the collection of actions (buttons) to include in the attachment. | |
setAuthorIcon ( string $author_icon ) | Set the author icon to use for the attachment. | |
setAuthorLink ( string $author_link ) | Set the auhtor link to use for the attachment. | |
setAuthorName ( string $author_name ) | Set the author name to use for the attachment. | |
setColor ( string $color ) | Set the color to use for the attachment. | |
setFallback ( string $fallback ) | Set the fallback text. | |
setFields ( array $fields ) | Set the fields for the attachment. | |
setFooter ( string $footer ) | Set the footer text to use for the attachment. | |
setFooterIcon ( string $footerIcon ) | Set the footer icon to use for the attachment. | |
setImageUrl ( string $image_url ) | Set the optional image to appear within the attachment. | |
setMarkdownFields ( array $fields ) | Set the fields Slack should interpret in its Markdown-like language. | |
setPretext ( string $pretext ) | Set the text that should appear above the formatted data. | |
setText ( string $text ) | Set the optional text to appear within the attachment. | |
setThumbUrl ( string $thumb_url ) | Set the optional thumbnail to appear within the attachment. | |
setTimestamp ( DateTime $timestamp ) | Set the timestamp to use for the attachment. | |
setTitle ( string $title ) | Set the title to use for the attachment. | |
setTitleLink ( string $title_link ) | Set the title link to use for the attachment. | |
toArray ( ) : array | Convert this attachment to its array representation. |
Méthode | Description | |
---|---|---|
getActionsAsArrays ( ) : array | Iterates over all actions in this attachment and returns them in their array form. | |
getFieldsAsArrays ( ) : array | Iterates over all fields in this attachment and returns them in their array form. |
public __construct ( array $attributes ) : void | ||
$attributes | array | |
Résultat | void |
public getActions ( ) : |
||
Résultat |
protected getActionsAsArrays ( ) : array | ||
Résultat | array |
public getAuthorIcon ( ) : string | ||
Résultat | string |
public getAuthorLink ( ) : string | ||
Résultat | string |
public getAuthorName ( ) : string | ||
Résultat | string |
protected getFieldsAsArrays ( ) : array | ||
Résultat | array |
public getImageUrl ( ) : string | ||
Résultat | string |
public getMarkdownFields ( ) : array | ||
Résultat | array |
public getPretext ( ) : string | ||
Résultat | string |
public getThumbUrl ( ) : string | ||
Résultat | string |
public getTimestamp ( ) : DateTime | ||
Résultat | DateTime |
public getTitleLink ( ) : string | ||
Résultat | string |
public setActions ( array $actions ) : |
||
$actions | array | |
Résultat |
public setAuthorIcon ( string $author_icon ) | ||
$author_icon | string |
public setAuthorLink ( string $author_link ) | ||
$author_link | string |
public setAuthorName ( string $author_name ) | ||
$author_name | string |
public setFallback ( string $fallback ) | ||
$fallback | string |
public setImageUrl ( string $image_url ) | ||
$image_url | string |
public setMarkdownFields ( array $fields ) | ||
$fields | array |
public setPretext ( string $pretext ) | ||
$pretext | string |
public setThumbUrl ( string $thumb_url ) | ||
$thumb_url | string |
public setTimestamp ( DateTime $timestamp ) | ||
$timestamp | DateTime |
public setTitleLink ( string $title_link ) | ||
$title_link | string |
protected array $actions | ||
Résultat | array |
protected string $author_icon | ||
Résultat | string |
protected string $author_link | ||
Résultat | string |
protected string $author_name | ||
Résultat | string |
protected string $color | ||
Résultat | string |
protected string $fallback | ||
Résultat | string |
protected string $image_url | ||
Résultat | string |
protected array $markdown_fields | ||
Résultat | array |
protected string $pretext | ||
Résultat | string |
protected string $text | ||
Résultat | string |
protected string $thumb_url | ||
Résultat | string |
protected DateTime $timestamp | ||
Résultat | DateTime |
protected string $title | ||
Résultat | string |
protected string $title_link | ||
Résultat | string |