Read the Framework internals guide to get the absolute most out of this tutorial. We build on concepts that are covered in that guide.
- A complete script
DOCman comes with a built-in PHP API. Here you can find our tutorials and code samples for the API:
You can create a new document by calling the add method of the document controller with document details.
You can find a complete list of document fields in our JSON API documentation.
Editing a document is done by passing the ID of the document to the controller and then calling the edit action:
Deleting is done by passing the ID of the document to the controller and then calling the delete action:
For fetching documents, we set permission values for the current user, limit the results to 50 documents, and optionally filter by category as well:
Find the documents for a specific file
Here we set permission values for the current user, filter by storage path of the document, and then call the browse event:
You can create a new category by calling the add method of the category controller:
For fetching categories, we set permission values for the current user, limit the results to 50 categories, and call the browse event.
A complete script
Below script boots Joomla and Joomlatools framework, and then runs your custom code. Save its contents into a PHP file and run it from the browser or the command line:
Let our developers personally assist you. You can ask development related questions in our Support Center. Only for Business or Agency subscribers.