1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 01:04:16 +02:00

Add a new $page->cloneable() method that returns true if the user is allowed to clone the page. Or use $page->cloneable(true) if the user is allowed to clone the page and its children together. This moves the logic was was previously in the ProcessPageClone module into a method that can be more widely used where needed. Also updated the ProcessPageClone module to use it.

This commit is contained in:
Ryan Cramer
2024-05-10 11:52:41 -04:00
parent 4e2ef8f8fd
commit d77b23adbb
4 changed files with 72 additions and 22 deletions

View File

@@ -9,7 +9,7 @@
* Except where indicated, please treat these properties as private to the
* Page class.
*
* ProcessWire 3.x, Copyright 2021 by Ryan Cramer
* ProcessWire 3.x, Copyright 2024 by Ryan Cramer
* https://processwire.com
*
*/
@@ -75,6 +75,7 @@ abstract class PageProperties {
'addable' => 'm',
'child' => 'm',
'children' => 'm',
'cloneable' => 'm',
'created' => 's',
'createdStr' => '',
'createdUser' => '',