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 = $pageValues->removeStatus(Page $page, $statusFlag);
Arguments
Name | Type(s) | Description |
---|---|---|
page | Page | |
statusFlag | int, string | Status flag constant or string representation (hidden, locked, unpublished, etc.) |
Return value
Exceptions
Method can throw exceptions on error:
WireException
- If you attempt to removePage::statusSystem
orPage::statusSystemID
statuses without first addingPage::statusSystemOverride
status.
See Also
PageValues methods and properties
API reference based on ProcessWire core version 3.0.236