}
-
-
+
}
// should delete old events that have not occurred...
$n->delete(DB_DATAOBJECT_WHEREADD_ONLY);
}
+
+ function toRooArray($request)
+ {
+ $ret = $this->toArray();
+
+ if(!empty($ret['keyword_filters'])){
+ $keywords = array_unique(array_filter(explode(',', $ret['keyword_filters'])));
+
+ $clipping_keywords = DB_DataObject::factory('clipping_keywords');
+ $clipping_keywords->whereAddIn('id', $keywords, 'int');
+
+ $ret['keywords'] = array();
+
+ foreach ($clipping_keywords->fetchAll('id', 'keyword') as $k => $v){
+ $ret['keywords'][] = array(
+ 'id' => $k,
+ 'keyword' => $v
+ );
+ }
+ }
+
+ print_R($ret);exit;
+
+ return $ret;
+ }
}