# danog\MadelineProto\EventHandler\Message\Rich\ListItem: 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.


[Back to index](../../../../../index.html)

> 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:
* [`__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)`](#__construct)
* [`getLabel(): string`](#getLabel)

## Methods:
### <a name="__construct"></a> `__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: 
* [`\danog\MadelineProto\EventHandler\Message\Rich\Block`: A block of a [rich message](https://core.telegram.org/bots/api#richblock): a heading, a paragraph, a list, a table, a media and so on.](../../../../../danog/MadelineProto/EventHandler/Message/Rich/Block.html)
* [`\danog\MadelineProto\EventHandler\Message\Rich\RichText`: Styled text of a [rich message](https://core.telegram.org/bots/api#richtext): a tree of plain texts, styles, links and so on.](../../../../../danog/MadelineProto/EventHandler/Message/Rich/RichText.html)
* [`\danog\MadelineProto\EventHandler\Message\Rich\ListLabelType`: Type of the labels of the items of an ordered list.](../../../../../danog/MadelineProto/EventHandler/Message/Rich/ListLabelType.html)




### <a name="getLabel"></a> `getLabel(): string`

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



---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
