PagesEditor::editor method
Is the given page in a state where it can be saved from the API?
Usage
// basic usage
$bool = $pages->editor->isSaveable(Page $page, string $reason);
// usage with all arguments
$bool = $pages->editor->isSaveable(Page $page, string $reason, $fieldName = '', array $options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
$page | Page | |
$reason | string | Text containing the reason why it can't be saved (assuming it's not saveable) |
$fieldName (optional) | string Field | Optional fieldname to limit check to. |
$options (optional) | array | Options array given to the original save method (optional) |
Return value
bool
True if saveable, False if not
$pages->editor methods and properties
API reference based on ProcessWire core version 3.0.252