mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
__getDocumentData() sets categories
This commit is contained in:
parent
2a2035cccf
commit
cab5f5bb2e
|
@ -44,13 +44,19 @@ class RestapiController { /* {{{ */
|
|||
} /* }}} */
|
||||
|
||||
protected function __getDocumentData($document) { /* {{{ */
|
||||
$cats = $document->getCategories();
|
||||
$tmp = [];
|
||||
foreach($cats as $cat) {
|
||||
$tmp[] = $this->__getCategoryData($cat);
|
||||
}
|
||||
$data = array(
|
||||
'type'=>'document',
|
||||
'id'=>(int)$document->getId(),
|
||||
'date'=>date('Y-m-d H:i:s', $document->getDate()),
|
||||
'name'=>$document->getName(),
|
||||
'comment'=>$document->getComment(),
|
||||
'keywords'=>$document->getKeywords()
|
||||
'keywords'=>$document->getKeywords(),
|
||||
'categories'=>$tmp
|
||||
);
|
||||
return $data;
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user