mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 04:56:06 +00:00
added initial class for hooks
This commit is contained in:
parent
08c0961a16
commit
424c518ff7
|
@ -37,10 +37,26 @@ class SeedDMS_ExtExample extends SeedDMS_ExtBase {
|
||||||
* Initialization
|
* Initialization
|
||||||
*/
|
*/
|
||||||
function init() { /* {{{ */
|
function init() { /* {{{ */
|
||||||
|
$GLOBALS['SEEDDMS_HOOKS']['addDocument'][] = new SeedDMS_ExtExample_AddDocument;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function main() { /* {{{ */
|
function main() { /* {{{ */
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class SeedDMS_ExtExample_AddDocument {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook before adding a new document
|
||||||
|
*/
|
||||||
|
function preAddDocument($params) { /* {{{ */
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook after successfully adding a new document
|
||||||
|
*/
|
||||||
|
function postAddDocument($document) { /* {{{ */
|
||||||
|
} /* }}} */
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user