Reference documentation and code samples for the Google Apps Chat V1 Client class Section.
A section contains a collection of widgets that are rendered vertically in the order that they're specified.
Google Workspace Add-ons and Chat apps :
Generated from protobuf message google.apps.card.v1.Card.Section
Namespace
Google \ Apps \ Card \ V1 \ CardMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ header
string
Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons .
↳ widgets
array< Google\Apps\Card\V1\Widget
>
All the widgets in the section. Must contain at least one widget.
↳ collapsible
bool
Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking Show more. Users can hide the widgets again by clicking Show less. To determine which widgets are hidden, specify uncollapsibleWidgetsCount
.
↳ uncollapsible_widgets_count
int
The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the uncollapsibleWidgetsCount
is set to 2
, the first two widgets are always shown and the last three are collapsed by default. The uncollapsibleWidgetsCount
is taken into account only when collapsible
is true
.
getHeader
Text that appears at the top of a section.
Supports simple HTML formatted text. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons .
string
setHeader
Text that appears at the top of a section.
Supports simple HTML formatted text. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons .
var
string
$this
getWidgets
All the widgets in the section.
Must contain at least one widget.
setWidgets
All the widgets in the section.
Must contain at least one widget.
$this
getCollapsible
Indicates whether this section is collapsible.
Collapsible sections hide some or all widgets, but users can expand the
section to reveal the hidden widgets by clicking Show more. Users
can hide the widgets again by clicking Show less.
To determine which widgets are hidden, specify uncollapsibleWidgetsCount
.
bool
setCollapsible
Indicates whether this section is collapsible.
Collapsible sections hide some or all widgets, but users can expand the
section to reveal the hidden widgets by clicking Show more. Users
can hide the widgets again by clicking Show less.
To determine which widgets are hidden, specify uncollapsibleWidgetsCount
.
var
bool
$this
getUncollapsibleWidgetsCount
The number of uncollapsible widgets which remain visible even when a section is collapsed.
For example, when a section
contains five widgets and the uncollapsibleWidgetsCount
is set to 2
,
the first two widgets are always shown and the last three are collapsed
by default. The uncollapsibleWidgetsCount
is taken into account only
when collapsible
is true
.
int
setUncollapsibleWidgetsCount
The number of uncollapsible widgets which remain visible even when a section is collapsed.
For example, when a section
contains five widgets and the uncollapsibleWidgetsCount
is set to 2
,
the first two widgets are always shown and the last three are collapsed
by default. The uncollapsibleWidgetsCount
is taken into account only
when collapsible
is true
.
var
int
$this