]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Post/Collection.php
Check the edit date before storing history
[friendica.git] / src / Model / Post / Collection.php
index f7a1a996bbcaca58a50faefb06c17c3f44fb61b4..476e9d3b336802f68cf5d31a2bc32b6397de8965 100644 (file)
@@ -58,4 +58,17 @@ class Collection
 
                DBA::delete('post-collection', ['uri-id' => $uri_id, 'type' => $type]);
        }
+
+       /**
+        * Fetch collections for a given contact
+        *
+        * @param integer $cid
+        * @param [type] $type
+        * @param array $fields
+        * @return array
+        */
+       public static function selectToArrayForContact(int $cid, int $type = self::FEATURED, array $fields = []) 
+       {
+               return DBA::selectToArray('collection-view', $fields, ['cid' => $cid, 'type' => $type]);
+       }
 }