Skip to content

Kirby 5.1.1

$block->hasPrev()

Checks if there's a previous item in the collection

$block->hasPrev(Kirby\Cms\Blocks|null $collection = null): bool

Parameters

Name Type Default
$collection Kirby\Cms\Blocksornull null

Return type

bool

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

Parent class

Kirby\Cms\Block inherited from Kirby\Cms\Item