PagesEditor::editor method

Save just a field from the given page

This is the method used by by the $page->save($field) method.

This function is public, but the preferred manner to call it is with $page->save($field)

Usage

// basic usage
$bool = $pages->editor->saveField(Page $page, $field);

// usage with all arguments
$bool = $pages->editor->saveField(Page $page, $field, $options = []);

Arguments

NameType(s)Description
$pagePage
$fieldstring Field

Field object or name (string)

$options (optional)array string

Specify options:

  • quiet (bool): Specify true to bypass updating of modified_users_id and modified time Default:false
  • noHooks (bool): Specify true to bypass calling of before/after save hooks Default:false

Return value

bool

True on success

Exceptions

Method can throw exceptions on error:

  • WireException

See Also


$pages->editor methods and properties

API reference based on ProcessWire core version 3.0.252