Skip to content

Instantly share code, notes, and snippets.

@ercanozkaya
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ercanozkaya/3cb561bfb2ea2a162651 to your computer and use it in GitHub Desktop.
Save ercanozkaya/3cb561bfb2ea2a162651 to your computer and use it in GitHub Desktop.
$document_details = array(
'title' => 'document title',
'docman_category_id' => 1,
'storage_type' => 'file',
'storage_path' => 'path/to/the/file' // part of the path that comes after joomlatools-files/docman-files/
);
$result = KObjectManager::getInstance()->getObject('com://site/docman.controller.document', array(
'request' => KObjectManager::getInstance()->getObject('request')
))->add($document_details);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment