Last active
November 2, 2015 19:34
-
-
Save kochen/75d22e17b5181e21123b to your computer and use it in GitHub Desktop.
DOCman 2.0 Stable - get list of documents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$catid = 2; //could also be an array(1,2,3,4) | |
/** | |
* returns a KModelEntityRowset, where each item is a KModelEntityRow. | |
* in the case of documents it returns a special document entity (the Rowset is filtered by the requested category. | |
* | |
* the document entity has (among other things): | |
* - $document->title (text) | |
* - $document->category (category entity object) | |
* - $document->storage_path (path entity to the file) | |
*/ | |
$documents = KObjectManager::getInstance()->getObject('com://admin/docman.model.documents') | |
->category($catid)->fetch(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment