# $listItems->data()

> Getter and setter for the data

- Source: `src/Toolkit/Collection.php#L194` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Toolkit/Collection.php#L194>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

```php
$listItems->data(null|array $data = null): array|$this
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$data` | `null\|array` | `null` |

## Return type

`array|$this`

## Parent class

`Wagnerwagner\Merx\ListItems` inherited from `Kirby\Toolkit\Collection`
