Update README for Modules
This commit is contained in:
parent
a4c2de7a0b
commit
a338c75c9f
|
@ -3,6 +3,21 @@
|
||||||
The Module namespace contains the different modules of Friendica.
|
The Module namespace contains the different modules of Friendica.
|
||||||
Each module is loaded through the [`App`](https://github.com/friendica/friendica/blob/develop/src/App.php).
|
Each module is loaded through the [`App`](https://github.com/friendica/friendica/blob/develop/src/App.php).
|
||||||
|
|
||||||
|
There are mainly two types of modules:
|
||||||
|
- frontend modules to interact with users
|
||||||
|
- backend modules to interact with machine requests
|
||||||
|
|
||||||
|
### Frontend modules
|
||||||
|
|
||||||
|
This type of modules mainly needs a template, which are generally located at
|
||||||
|
[view/templates/](https://github.com/friendica/friendica/tree/develop/view/templates).
|
||||||
|
|
||||||
|
A frontend module should extend the [`BaseModule`](https://github.com/friendica/friendica/blob/develop/src/BaseModule.php), especially the `content()` method.
|
||||||
|
|
||||||
|
### Backend modules
|
||||||
|
|
||||||
|
This type of modules mainly responds either with `XML` or with `JSON`.
|
||||||
|
|
||||||
Rules for Modules:
|
Rules for Modules:
|
||||||
- Named like the call (i.e. https://friendica.test/contact => `Contact`)
|
- Named like the call (i.e. https://friendica.test/contact => `Contact`)
|
||||||
- Start with capitals and are **not** camelCased.
|
- Start with capitals and are **not** camelCased.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user