From 8d5b16f0c84c7334da61712000a8f4dc752e1265 Mon Sep 17 00:00:00 2001 From: Nicolaas Date: Tue, 20 Aug 2019 21:59:21 +1200 Subject: [PATCH] Update DMSDocument.php --- src/Model/DMSDocument.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Model/DMSDocument.php b/src/Model/DMSDocument.php index c730057a..6201ba89 100644 --- a/src/Model/DMSDocument.php +++ b/src/Model/DMSDocument.php @@ -83,6 +83,8 @@ */ class DMSDocument extends File implements DMSDocumentInterface { + + private static $singular_name = 'Document'; private static $plural_name = 'Documents'; @@ -130,6 +132,10 @@ class DMSDocument extends File implements DMSDocumentInterface 'getRelatedPages.count' => 'Page Use', ]; + private static $casting = [ + 'IdAndTitle' => 'Varchar' + ]; + private static $do_not_copy = [ 'ID', 'ClassName', @@ -466,6 +472,10 @@ public function getExtension() } + public function getIdAndTitle() : string + { + return $this->ID . ' - ' . $this->Title; + } /** * @return FieldList