DataObjects/Events.php
authorAlan Knowles <alan@roojs.com>
Mon, 6 Jul 2015 03:45:51 +0000 (11:45 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 6 Jul 2015 03:45:51 +0000 (11:45 +0800)
DataObjects/Events.php

index 20cc591..c0276cb 100644 (file)
@@ -517,6 +517,17 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
     {
         $ret = $this->toArray();
         
+        // fill toEventString.
+        if (!empty($q['_with_obj_summary'])) {
+            $obj = $this->object();
+            if ($obj && method_exists($obj,'toEventString')) {
+                $es = $obj->toEventString();
+                if (strpos($this->remarks, $es) < 0) {
+                    $ret['remarks'] = $es . ' ' . $this->remarks;
+                }
+            }
+        }
+        
         if(empty($q['_retrieve_source'])){
             return $ret;
         }