Skip to content

Kirby 5.1.2

$assets->nth()

Returns the nth element from the collection

$assets->nth(int $n): Kirby\Plugin\Asset|null

Parameters

Name Type Default
$nrequired int no default value

Return types

Kirby\Plugin\Assetornull

This method modifies the existing $assets object it is applied to and returns it again.

Parent class

Kirby\Plugin\Assets inherited from Kirby\Toolkit\Collection