1
0
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:
Ryan Cramer
2019-06-07 12:17:27 -04:00
parent 50a6f3585e
commit 204335e2d3
4 changed files with 431 additions and 3 deletions

View File

@@ -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);