Skip to content

Kirby 5.0.4

$languages->prepend()

Prepends an element to the data array

$languages->prepend(string|Kirby\Cms\Language ...$args): Kirby\Cms\Languages

Parameters

Name Type Default
...$args stringorKirby\Cms\Language no default value

Return type

Kirby\Cms\Languages

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

Parent class

Kirby\Cms\Languages inherited from Kirby\Cms\Collection

Examples

$collection->prepend($object);
$collection->prepend('key', $object);