From 6299b311bb626ca8216593f92adf8cf2fefec48e Mon Sep 17 00:00:00 2001 From: Awilum Date: Thu, 7 Feb 2019 17:59:34 +0300 Subject: [PATCH] Flextype Core: Entries - new method copy() - added. --- flextype/Entries.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flextype/Entries.php b/flextype/Entries.php index 0fdb2911..9ce78216 100755 --- a/flextype/Entries.php +++ b/flextype/Entries.php @@ -355,6 +355,19 @@ class Entries return Filesystem::delete(PATH['entries'] . '/' . $entry); } + /** + * Copy entry(s) + * + * @param string $entry Entry + * @param string $new_entry New entry + * @param bool $recursive Recursive copy entries. + * @return bool True on success, false on failure. + */ + public static function copy(string $entry, string $new_entry, bool $recursive = false) : bool + { + return Filesystem::copy($entry, $new_entry, $recursive); + } + /** * Check whether entry exists. *