server/src/app/Models/DocumentBase.php
changeset 445 b1e5ad6b2a29
parent 326 226d5b17a119
child 502 74fba571487e
--- a/server/src/app/Models/DocumentBase.php	Wed Nov 23 13:49:00 2016 +0100
+++ b/server/src/app/Models/DocumentBase.php	Thu Nov 24 14:39:50 2016 +0100
@@ -150,6 +150,12 @@
         return $this->created;
     }
 
+    public function getCreatedValue() {
+        $created = $this->getCreated();
+        return is_null($created)?null:$created->getValue();
+    }
+
+
     public function getModified() {
         if($this->modified === false) {
             try {
@@ -201,7 +207,9 @@
                 'title' => $this->getTitleValue(),
                 'languages' => $this->getLanguagesValue(),
                 'modified' => $this->getModifiedValue(),
-                'issued' => $this->getIssuedValue()            ];
+                'issued' => $this->getIssuedValue(),
+                'created' => $this->getCreatedValue()
+            ];
 
             if($this->languagesResolved) {
                 $res['languages_resolved'] = $this->getLanguagesResolved();