DataObjects/Core_templatestr.php
authorleon <leon@roojs.com>
Wed, 2 Aug 2023 05:09:42 +0000 (13:09 +0800)
committerleon <leon@roojs.com>
Wed, 2 Aug 2023 05:09:42 +0000 (13:09 +0800)
DataObjects/Core_templatestr.php

index c9524b9..efcff9c 100644 (file)
@@ -748,4 +748,37 @@ class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject
 
         return $ret;
     }
+
+    function postListFilter($ar, $au, $req)
+    {
+        var_dump($ar);
+        die('test');
+
+        // if (empty($req['query']['collapse_translation'])) {
+        //     return $ar;
+        // }
+
+        // $parent_ids = array();
+        // $ret = array();
+
+        // foreach($ar as &$v) {
+        //     array_push($parent_ids, $v['id']);
+        //     $v['children'] = array();
+        //     $ret[$v['id']] = &$v;
+        // }
+
+        // $pe = DB_DataObject::factory('pressrelease_entry');
+        // $pe->whereAddIn('parent_id', $parent_ids, 'int');
+        // $pe->selectAddAllExcept(array('content', 'word_text'));
+        // if (!empty($req['query']['with_distr_summary'])) {
+        //     $pe->selectAddDistSummary();
+        // }
+        // $pe->find();
+        // while($pe->fetch()) {
+        //     $ret[$pe->parent_id]['children'][] = $pe->toArray();
+        // }
+
+        return $ar;
+
+    }
 }