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:
@@ -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' => '',
|
||||
|
Reference in New Issue
Block a user