X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/f15cc5bdfad7ce729e61abbd14ebc2807d7bb651..refs/pull/494/head:/app/PageRevision.php diff --git a/app/PageRevision.php b/app/PageRevision.php index ff469f0ed..0a9764729 100644 --- a/app/PageRevision.php +++ b/app/PageRevision.php @@ -47,4 +47,16 @@ class PageRevision extends Model return null; } + /** + * Allows checking of the exact class, Used to check entity type. + * Included here to align with entities in similar use cases. + * (Yup, Bit of an awkward hack) + * @param $type + * @return bool + */ + public static function isA($type) + { + return $type === 'revision'; + } + }