bootdesk/chat-sdk

WebProductCard extends Card
in package

Table of Contents

Properties

$actions  : array<string|int, mixed>|null
$badge  : string|null
$currency  : string
$price  : float
$title  : string
$url  : string

Methods

__construct()  : mixed
actions()  : self
divider()  : self
getButtons()  : array<string|int, Button>
getChildren()  : array<string|int, CardElement>
getFallbackText()  : string
getHeader()  : string|null
getImageAlt()  : string
getImages()  : array<string|int, Image>
getImageUrl()  : string|null
getLinkButtons()  : array<string|int, LinkButton>
getLinks()  : array<string|int, Link>
getSections()  : array<string|int, Section>
getTables()  : array<string|int, Table>
getTexts()  : array<string|int, Text>
header()  : self
image()  : self
imageUrl()  : self
link()  : self
linkButton()  : self
make()  : self
section()  : self
table()  : self
text()  : self
toArray()  : array<string|int, mixed>
Serialize the card to a JSON-serializable array for broadcasting.

Properties

$actions read-only

public array<string|int, mixed>|null $actions = null

Methods

__construct()

public __construct(string $url, string $title, float $price[, string $currency = 'USD' ][, string|null $badge = null ][, array<string|int, mixed>|null $actions = null ]) : mixed
Parameters
$url : string
$title : string
$price : float
$currency : string = 'USD'
$badge : string|null = null
$actions : array<string|int, mixed>|null = null

actions()

public actions(array<string|int, mixed> $buttons) : self
Parameters
$buttons : array<string|int, mixed>
Return values
self

divider()

public divider() : self
Return values
self

getButtons()

public getButtons() : array<string|int, Button>
Return values
array<string|int, Button>

getFallbackText()

public getFallbackText() : string
Return values
string

getHeader()

public getHeader() : string|null
Return values
string|null

getImageAlt()

public getImageAlt() : string
Return values
string

getImages()

public getImages() : array<string|int, Image>
Return values
array<string|int, Image>

getImageUrl()

public getImageUrl() : string|null
Return values
string|null
public getLinks() : array<string|int, Link>
Return values
array<string|int, Link>

getSections()

public getSections() : array<string|int, Section>
Return values
array<string|int, Section>

getTables()

public getTables() : array<string|int, Table>
Return values
array<string|int, Table>

getTexts()

public getTexts() : array<string|int, Text>
Return values
array<string|int, Text>

header()

public header(string $header) : self
Parameters
$header : string
Return values
self

image()

public image(string $url[, string $alt = '' ]) : self
Parameters
$url : string
$alt : string = ''
Return values
self

imageUrl()

public imageUrl(string $url[, string $alt = '' ]) : self
Parameters
$url : string
$alt : string = ''
Return values
self
public link(string $label, string $url) : self
Parameters
$label : string
$url : string
Return values
self

make()

public static make() : self
Return values
self

section()

public section(callable $builder) : self
Parameters
$builder : callable
Return values
self

table()

public table(array<string|int, mixed> $headers, array<string|int, mixed> $rows[, array<string|int, mixed> $align = [] ]) : self
Parameters
$headers : array<string|int, mixed>
$rows : array<string|int, mixed>
$align : array<string|int, mixed> = []
Return values
self

toArray()

Serialize the card to a JSON-serializable array for broadcasting.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>
On this page

Search results