PHP Класс Spatie\SlashCommand\Attachment

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$authorIcon string Optional author icon for the attachment.
$authorLink string Optional author link for the attachment.
$authorName 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 Illuminate\Support\Collection The fields of the attachment.
$footer string The text to use for the attachment footer.
$footerIcon string The icon to use for the attachment footer.
$imageUrl string Optional image that should appear within the attachment.
$preText string Optional text that should appear above the formatted data.
$text string Optional text that should appear within the attachment.
$thumbUrl 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.
$titleLink string Optional title link for the attachment.

Открытые методы

Метод Описание
__construct ( )
addField ( AttachmentField | array $field ) Add a field to the attachment.
addFields ( array $fields ) Add the fields for the attachment.
clearFields ( ) Clear all fields for this attachment.
create ( )
setAuthorIcon ( string $authorIcon ) Set the author icon to use for the attachment.
setAuthorLink ( string $authorLink ) Set the auhtor link to use for the attachment.
setAuthorName ( string $authorName ) 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 $imageUrl ) Set the optional image to appear within the attachment.
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 $thumbUrl ) 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 $titleLink ) Set the title link to use for the attachment.
toArray ( ) : array Convert this attachment to its array representation.

Описание методов

__construct() публичный Метод

public __construct ( )

addField() публичный Метод

Add a field to the attachment.
public addField ( AttachmentField | array $field )
$field AttachmentField | array

addFields() публичный Метод

Add the fields for the attachment.
public addFields ( array $fields )
$fields array

clearFields() публичный Метод

Clear all fields for this attachment.
public clearFields ( )

create() публичный статический Метод

public static create ( )

setAuthorIcon() публичный Метод

Set the author icon to use for the attachment.
public setAuthorIcon ( string $authorIcon )
$authorIcon string

setAuthorName() публичный Метод

Set the author name to use for the attachment.
public setAuthorName ( string $authorName )
$authorName string

setColor() публичный Метод

Set the color to use for the attachment.
public setColor ( string $color )
$color string

setFallback() публичный Метод

Set the fallback text.
public setFallback ( string $fallback )
$fallback string

setFields() публичный Метод

Set the fields for the attachment.
public setFields ( array $fields )
$fields array

setFooter() публичный Метод

Set the footer text to use for the attachment.
public setFooter ( string $footer )
$footer string

setFooterIcon() публичный Метод

Set the footer icon to use for the attachment.
public setFooterIcon ( string $footerIcon )
$footerIcon string

setImageUrl() публичный Метод

Set the optional image to appear within the attachment.
public setImageUrl ( string $imageUrl )
$imageUrl string

setPreText() публичный Метод

Set the text that should appear above the formatted data.
public setPreText ( string $preText )
$preText string

setText() публичный Метод

Set the optional text to appear within the attachment.
public setText ( string $text )
$text string

setThumbUrl() публичный Метод

Set the optional thumbnail to appear within the attachment.
public setThumbUrl ( string $thumbUrl )
$thumbUrl string

setTimestamp() публичный Метод

Set the timestamp to use for the attachment.
public setTimestamp ( DateTime $timestamp )
$timestamp DateTime

setTitle() публичный Метод

Set the title to use for the attachment.
public setTitle ( string $title )
$title string

toArray() публичный Метод

Convert this attachment to its array representation.
public toArray ( ) : array
Результат array

Описание свойств

$authorIcon защищенное свойство

Optional author icon for the attachment.
protected string $authorIcon
Результат string

$authorName защищенное свойство

Optional author name for the attachment.
protected string $authorName
Результат string

$color защищенное свойство

The color to use for the attachment.
protected string $color
Результат string

$fallback защищенное свойство

The fallback text to use for clients that don't support attachments.
protected string $fallback
Результат string

$fields защищенное свойство

The fields of the attachment.
protected Collection,Illuminate\Support $fields
Результат Illuminate\Support\Collection

$footerIcon защищенное свойство

The icon to use for the attachment footer.
protected string $footerIcon
Результат string

$imageUrl защищенное свойство

Optional image that should appear within the attachment.
protected string $imageUrl
Результат string

$preText защищенное свойство

Optional text that should appear above the formatted data.
protected string $preText
Результат string

$text защищенное свойство

Optional text that should appear within the attachment.
protected string $text
Результат string

$thumbUrl защищенное свойство

Optional thumbnail that should appear within the attachment.
protected string $thumbUrl
Результат string

$timestamp защищенное свойство

The timestamp to use for the attachment.
protected DateTime $timestamp
Результат DateTime

$title защищенное свойство

Optional title for the attachment.
protected string $title
Результат string