Skip to content

Kirby 5.1.0

$blocks->join()

Joins the collection elements into a string, optionally using a Closure to transform the elements

$blocks->join(string $separator = ', ', Closure|null $as = null): string

Parameters

Name Type Default
$separator string ', '
$as Closureornull null

Return type

string

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

Parent class

Kirby\Cms\Blocks inherited from Kirby\Toolkit\Collection