$a->argc = 3
$a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2');
-Your module functions will often contain the function plugin_name_content(&$a), which defines and returns the page body content.
-They may also contain plugin_name_post(&$a) which is called before the _content function and typically handles the results of POST forms.
-You may also have plugin_name_init(&$a) which is called very early on and often does module initialisation.
+Your module functions will often contain the function plugin_name_content(App &$a), which defines and returns the page body content.
+They may also contain plugin_name_post(App &$a) which is called before the _content function and typically handles the results of POST forms.
+You may also have plugin_name_init(App &$a) which is called very early on and often does module initialisation.
Templates
---
file: mod/network.php\r
<?php\r
\r
- function network_content(&$a) {\r
+ function network_content(App &$a) {\r
$itemsmanager = new \Friendica\ItemsManager();\r
$items = $itemsmanager->getAll();\r
\r
$a->argc = 3
$a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2');
-Deine Modulfunktionen umfassen oft die Funktion plugin_name_content(&$a), welche den Seiteninhalt definiert und zurückgibt.
-Sie können auch plugin_name_post(&$a) umfassen, welches vor der content-Funktion aufgerufen wird und normalerweise die Resultate der POST-Formulare handhabt.
-Du kannst ebenso plugin_name_init(&$a) nutzen, was oft frühzeitig aufgerufen wird und das Modul initialisert.
+Deine Modulfunktionen umfassen oft die Funktion plugin_name_content(App &$a), welche den Seiteninhalt definiert und zurückgibt.
+Sie können auch plugin_name_post(App &$a) umfassen, welches vor der content-Funktion aufgerufen wird und normalerweise die Resultate der POST-Formulare handhabt.
+Du kannst ebenso plugin_name_init(App &$a) nutzen, was oft frühzeitig aufgerufen wird und das Modul initialisert.
Derzeitige Hooks
Calling the t() function with the common name makes the string translateable.
The selected 1st part will be saved in the database by the theme_post function.
- function theme_post(&$a){
+ function theme_post(App &$a){
// non local users shall not pass
if(! local_user())
return;
<?php
/* meta informations for the theme, see below */
- function duepuntozero_lr_init(&$a) {
+ function duepuntozero_lr_init(App &$a) {
$a-> theme_info = array(
'extends' => 'duepuntozero'.
);
The name of the function is <theme-name>_init.
So in the case of quattro it is
- function quattro_init(&$a) {
+ function quattro_init(App &$a) {
$a->theme_info = array();
set_template_engine($a, 'smarty3');
}