$ordersPage->changeStatus()
Change the status of the current page to either draft, listed or unlisted. If changing to listed, you can pass a position for the page in the siblings collection. Siblings will be resorted.
$ordersPage->changeStatus(string $status, int|null $position = null): Kirby\Cms\Page
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$status |
string |
- |
"draft", "listed" or "unlisted" |
$position |
int or null |
null |
Optional sorting number |
Return type
Exceptions
| Type | Description |
|---|---|
InvalidArgumentException |
If an invalid status is being passed |
Parent class
Wagnerwagner\Merx\OrdersPage inherited from Kirby\Cms\Page