Skip to content

Kirby 3.6.6

$pageactions->changeStatus()

Change the status of the current page to either draft, listed or unlisted.

$pageactions->changeStatus(string $status, int $position = null): Kirby\Cms\PageActions

Parameters

Name Type Default Description
$status * string "draft", "listed" or "unlisted"
$position int null Optional sorting number

Return type

Kirby\Cms\PageActions

This method does not modify the existing $pageactions object but returns a new object with the changes applied. Learn more →

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException If an invalid status is being passed

Parent class

Kirby\Cms\PageActions