Google Apps Chat V1 Client - Class Card (0.6.1)

Reference documentation and code samples for the Google Apps Chat V1 Client class Card.

A card is a UI element that can contain UI widgets such as text and images.

Generated from protobuf message google.chat.v1.ContextualAddOnMarkup.Card

Namespace

Google \ Apps \ Chat \ V1 \ ContextualAddOnMarkup

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ header Card\CardHeader

The header of the card. A header usually contains a title and an image.

↳ sections array<Card\Section>

Sections are separated by a line divider.

↳ card_actions array<Card\CardAction>

The actions of this card.

↳ name string

Name of the card.

getHeader

The header of the card. A header usually contains a title and an image.

Returns
Type Description
Card\CardHeader|null

hasHeader

clearHeader

setHeader

The header of the card. A header usually contains a title and an image.

Parameter
Name Description
var Card\CardHeader
Returns
Type Description
$this

getSections

Sections are separated by a line divider.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setSections

Sections are separated by a line divider.

Parameter
Name Description
var array<Card\Section>
Returns
Type Description
$this

getCardActions

The actions of this card.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setCardActions

The actions of this card.

Parameter
Name Description
var array<Card\CardAction>
Returns
Type Description
$this

getName

Name of the card.

Returns
Type Description
string

setName

Name of the card.

Parameter
Name Description
var string
Returns
Type Description
$this