Skip to content

danog\MadelineProto\EventHandler\Message\Rich\ListItem: An item of a list block of a rich message.

Back to index

Author: Daniil Gentili daniil@daniil.it

An item of a list block of a rich message.

Items of ordered lists have a label type and a value; the items of a list must be either all ordered or all unordered.

Properties

  • $blocks: list<Block> Content of the item.
  • $hasCheckbox: bool Whether the item has a checkbox
  • $isChecked: bool Whether the checkbox of the item is checked
  • $type: ?danog\MadelineProto\EventHandler\Message\Rich\ListLabelType Label type of the item of an ordered list, null for unordered lists
  • $value: ?int Numeric value of the item of an ordered list
  • $label: ?string Label of the item of an ordered list as received from Telegram, if any: ignored when sending, since Telegram computes the labels from the values

Method list:

Methods:

__construct((list<\danog\MadelineProto\EventHandler\Message\Rich\Block>|\danog\MadelineProto\EventHandler\Message\Rich\RichText|string) $blocks, bool $hasCheckbox = false, bool $isChecked = false, ?\danog\MadelineProto\EventHandler\Message\Rich\ListLabelType $type = NULL, ?int $value = NULL, ?string $label = NULL)

Parameters:

  • $blocks: (list<\danog\MadelineProto\EventHandler\Message\Rich\Block>|\danog\MadelineProto\EventHandler\Message\Rich\RichText|string) Content of the item: blocks, or a text for a single paragraph
  • $hasCheckbox: bool
  • $isChecked: bool
  • $type: ?\danog\MadelineProto\EventHandler\Message\Rich\ListLabelType
  • $value: ?int
  • $label: ?string

See also:

getLabel(): string

Get the label of the item, as shown by Telegram clients (e.g. β€’, 3., iii.).


Generated by danog/phpdoc