$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
Exceptions
Type | Description |
---|---|
Kirby\Exception\InvalidArgumentException |
If an invalid status is being passed |