Card
in package
implements
CardElement
Table of Contents
Interfaces
Properties
- $children : array<string|int, CardElement>
- $header : string|null
- $imageAlt : string|null
- $imageUrl : string|null
Methods
- 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
$children
private
array<string|int, CardElement>
$children
= []
$header
private
string|null
$header
= null
$imageAlt
private
string|null
$imageAlt
= null
$imageUrl
private
string|null
$imageUrl
= null
Methods
actions()
public
actions(array<string|int, mixed> $buttons) : self
Parameters
- $buttons : array<string|int, mixed>
Return values
selfdivider()
public
divider() : self
Return values
selfgetButtons()
public
getButtons() : array<string|int, Button>
Return values
array<string|int, Button>getChildren()
public
getChildren() : array<string|int, CardElement>
Return values
array<string|int, CardElement>getFallbackText()
public
getFallbackText() : string
Return values
stringgetHeader()
public
getHeader() : string|null
Return values
string|nullgetImageAlt()
public
getImageAlt() : string
Return values
stringgetImages()
public
getImages() : array<string|int, Image>
Return values
array<string|int, Image>getImageUrl()
public
getImageUrl() : string|null
Return values
string|nullgetLinkButtons()
public
getLinkButtons() : array<string|int, LinkButton>
Return values
array<string|int, LinkButton>getLinks()
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
selfimage()
public
image(string $url[, string $alt = '' ]) : self
Parameters
- $url : string
- $alt : string = ''
Return values
selfimageUrl()
public
imageUrl(string $url[, string $alt = '' ]) : self
Parameters
- $url : string
- $alt : string = ''
Return values
selflink()
public
link(string $label, string $url) : self
Parameters
- $label : string
- $url : string
Return values
selflinkButton()
public
linkButton(string $label, string $url[, ButtonStyle $style = ButtonStyle::Secondary ]) : self
Parameters
- $label : string
- $url : string
- $style : ButtonStyle = ButtonStyle::Secondary
Return values
selfmake()
public
static make() : self
Return values
selfsection()
public
section(callable $builder) : self
Parameters
- $builder : callable
Return values
selftable()
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
selftext()
public
text(string $content[, TextStyle $style = TextStyle::Plain ]) : self
Parameters
- $content : string
- $style : TextStyle = TextStyle::Plain
Return values
selftoArray()
Serialize the card to a JSON-serializable array for broadcasting.
public
toArray() : array<string|int, mixed>