# $productList->prepend()

> Prepends an element to the data array

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

```php
$productList->prepend(string|TValue ...$args): Kirby\Toolkit\Collection
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `...$args` | `string\|TValue` | `–` |

## Return type

`Kirby\Toolkit\Collection`

## Description

```php
$collection->prepend('key', $value);
$collection->prepend($value);
```

## Parent class

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