Reference

Guide

$page->changeStatus()

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

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

Parameters

Name Type Default Description
$status string

"draft", "listed" or "unlisted"

$position int null

Optional sorting number

Return type

Kirby\Cms\Page

Details

Source code

kirby/src/Cms/PageActions.php#L166