From be0b2f9902a494b4e6e74a237125f00187a3b928 Mon Sep 17 00:00:00 2001 From: Marcus Nyeholt Date: Tue, 9 Apr 2019 21:41:58 +1000 Subject: [PATCH] minor(InternalNotification) Swapped field used for displaying Context --- src/Model/InternalNotification.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Model/InternalNotification.php b/src/Model/InternalNotification.php index 2618a67..b5de019 100644 --- a/src/Model/InternalNotification.php +++ b/src/Model/InternalNotification.php @@ -6,7 +6,7 @@ use SilverStripe\Security\Member; use SilverStripe\Security\Security; use Symbiote\MultiValueField\ORM\FieldType\MultiValueField; - +use Symbiote\MultiValueField\Fields\KeyValueField; class InternalNotification extends DataObject { private static $table_name = 'InternalNotification'; @@ -31,6 +31,14 @@ class InternalNotification extends DataObject { private static $default_sort = 'ID DESC'; + public function getCMSFields() + { + $fields = parent::getCMSFields(); + + $fields->replaceField('Context', KeyValueField::create('Context')); + return $fields; + } + public function canView($member = null) { $member = $member ?: Security::getCurrentUser(); if (!$member) {