From 4b06aa3e393466a5963a2dc9fc649bdba49bcef9 Mon Sep 17 00:00:00 2001 From: Awilum Date: Thu, 7 Feb 2019 16:20:15 +0300 Subject: [PATCH] Flextype Core: Entries - new method has() - added. --- flextype/Entries.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/flextype/Entries.php b/flextype/Entries.php index f1626f34..b64ae20c 100755 --- a/flextype/Entries.php +++ b/flextype/Entries.php @@ -281,4 +281,15 @@ class Entries return $_entry; } } + + /** + * Check whether entry exists. + * + * @param string $entry Entry to find + * @return bool + */ + public static function has(string $entry) : bool + { + return Filesystem::has(PATH['entries'] . '/' . $entry . '/entry.html'); + } }