PagesEditor::editor method
Update page modified/created/published time to now (or given time)
Usage
// basic usage
$bool = $pages->editor->touch($pages);
// usage with all arguments
$bool = $pages->editor->touch($pages, $options = null, string $type = 'modified');
Arguments
Name | Type(s) | Description |
---|---|---|
$pages | Page PageArray array | May be Page, PageArray or array of page IDs (integers) |
$options (optional) | null int string array | Omit (null) to update to now, or unix timestamp or strtotime() recognized time string, or if you do not need this argument, you may optionally substitute the $type argument here, or in 3.0.183+ you can also specify array of options here instead:
|
$type (optional) | string | Date type to update, one of 'modified', 'created' or 'published' Default:'modified' Added 3.0.147 Skip this argument if using options array for previous argument or if using the default type 'modified'. |
Return value
bool
True on success, false on fail
Exceptions
Method can throw exceptions on error:
WireException
or\PDOException
- if given invalid format for $modified argument or failed database query
$pages->editor methods and properties
API reference based on ProcessWire core version 3.0.252