mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 00:06:55 +02:00
Add support for $page->meta() method for maintaining persistent meta data for pages independent of fields and the normal load/save process.
This commit is contained in:
@@ -1062,6 +1062,8 @@ class PagesEditor extends Wire {
|
||||
} catch(\Exception $e) {
|
||||
}
|
||||
|
||||
$page->meta()->removeAll();
|
||||
|
||||
/** @var PagesAccess $access */
|
||||
$access = $this->wire(new PagesAccess());
|
||||
$access->deletePage($page);
|
||||
@@ -1220,6 +1222,7 @@ class PagesEditor extends Wire {
|
||||
$copy->setQuietly('_cloning', null);
|
||||
$copy->of($of);
|
||||
$page->of($of);
|
||||
$page->meta()->copyTo($copy->id);
|
||||
$copy->resetTrackChanges();
|
||||
$this->pages->cloned($page, $copy);
|
||||
$this->pages->debugLog('clone', "page=$page, parent=$parent", $copy);
|
||||
|
Reference in New Issue
Block a user