mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-27 10:00:41 +00:00
fix formatting
This commit is contained in:
parent
fc8d01df6b
commit
17e73dd494
|
|
@ -1,12 +1,11 @@
|
||||||
Extensions in SeedDMS
|
# Extensions in SeedDMS
|
||||||
=====================
|
|
||||||
|
|
||||||
Since verson 5.0.0 SeedDMS can be extended by extensions. Extensions
|
Since verson 5.0.0 SeedDMS can be extended by extensions. Extensions
|
||||||
can hook up functions into certain operations, e.g.
|
can hook up functions into certain operations, e.g.
|
||||||
uploading, removing or displaying a document. They can also be
|
uploading, removing or displaying a document. They can also be
|
||||||
used to modify some of the internal variables like the list of
|
used to modify some of the internal variables like the list of
|
||||||
translations and they can even replace classes in the core of
|
translations and they can even replace classes in the core of
|
||||||
seeddms and hook up functions into certain operations in the core.
|
SeedDMS and hook up functions into certain operations in the core.
|
||||||
|
|
||||||
All extensions are located in the folder 'ext'. Each extension
|
All extensions are located in the folder 'ext'. Each extension
|
||||||
has its own folder named by the name of the extension. The central
|
has its own folder named by the name of the extension. The central
|
||||||
|
|
@ -19,12 +18,13 @@ the extension manager if it was changed.
|
||||||
|
|
||||||
The integration into SeedDMS is done by hooks, class and file
|
The integration into SeedDMS is done by hooks, class and file
|
||||||
overloading. SeedDMS manages
|
overloading. SeedDMS manages
|
||||||
a globally available array of hooks ($GLOBALS['SEEDDMS_HOOKS']).
|
a globally available array of hooks (`$GLOBALS['SEEDDMS_HOOKS']`).
|
||||||
This array has the elements 'view' and 'controller'. All entries
|
This array has the elements `view` and `controller`. All entries
|
||||||
in those array elements contain instances of self defined classes
|
in those array elements contain instances of self defined classes
|
||||||
containing the hook methods. For setting up the hooks in the view
|
containing the hook methods. For setting up the hooks in the view
|
||||||
'viewFolder' the following code is needed.
|
`viewFolder` the following code is needed.
|
||||||
|
|
||||||
|
```
|
||||||
$GLOBALS['SEEDDMS_HOOKS']['view']['viewFolder'][] = new SeedDMS_ExtExample_ViewFolder;
|
$GLOBALS['SEEDDMS_HOOKS']['view']['viewFolder'][] = new SeedDMS_ExtExample_ViewFolder;
|
||||||
|
|
||||||
class SeedDMS_ExtExample_ViewFolder {
|
class SeedDMS_ExtExample_ViewFolder {
|
||||||
|
|
@ -39,15 +39,16 @@ $GLOBALS['SEEDDMS_HOOKS']['controller']['removeFolder'][] = new SeedDMS_ExtExamp
|
||||||
class SeedDMS_ExtExample_RemoveFolder {
|
class SeedDMS_ExtExample_RemoveFolder {
|
||||||
...
|
...
|
||||||
};
|
};
|
||||||
|
```
|
||||||
|
|
||||||
Based on these two variants of adding hooks to the seeddms application code,
|
Based on these two variants of adding hooks to the SeedDMS application code,
|
||||||
the seeddms core can be extended by implementing the controller hook 'initDMS'
|
the SeedDMS core can be extended by implementing the controller hook 'initDMS'
|
||||||
which is called right after the class SeedDMS_Core_DMS has been initiated.
|
which is called right after the class SeedDMS_Core_DMS has been initiated.
|
||||||
|
|
||||||
Beside hooks and callbacks another way of modifying seeddms is given
|
Beside hooks and callbacks another way of modifying SeedDMS is given
|
||||||
by overloading the files in the directory 'views' and 'controllers'. Both
|
by overloading the files in the directory 'views' and 'controllers'. Both
|
||||||
directories contain class files with a single class for either running
|
directories contain class files with a single class for either running
|
||||||
controller or view code. If an extension provides those file in its
|
controller or view code. If an extension provides those file in its
|
||||||
own extension dir, they will be used instead of the files shipped with
|
own extension dir, they will be used instead of the files shipped with
|
||||||
seeddms.
|
SeedDMS.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user