$page→removeStatus()
Remove the specified status from this page
This is the preferred way to remove a status from a page. There is also a corresponding Page::addStatus() method.
Example
// Remove hidden status from the page using status name
$page->removeStatus('hidden');
// Remove hidden status from the page using status constant
$page->removeStatus(Page::statusHidden);Usage
$page->removeStatus($statusFlag);Arguments
| Name | Type(s) | Description |
|---|---|---|
$statusFlag | int string | Status flag constant or string representation (hidden, locked, unpublished, etc.) |
Return value
$thisObject instance it was called from (method supports fluent interface).
Exceptions
Method can throw exceptions on error:
WireException- If you attempt to removePage::statusSystemorPage::statusSystemIDstatuses without first addingPage::statusSystemOverridestatus.
See Also
API reference based on ProcessWire core version 3.0.252