1
0
Fork 0

changed to this:

---------------------
function bla (App &$a) {
$a->bla = 'stuff';
}
---------------------

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-12-20 10:59:11 +01:00
parent fb817b18ad
commit 34fcaeb209
4 changed files with 10 additions and 10 deletions

View file

@ -77,9 +77,9 @@ This will include:
$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
---

View file

@ -68,7 +68,7 @@ The code will be something like:
file: mod/network.php
<?php
function network_content(&$a) {
function network_content(App &$a) {
$itemsmanager = new \Friendica\ItemsManager();
$items = $itemsmanager->getAll();

View file

@ -67,9 +67,9 @@ So würde http://example.com/plugin/arg1/arg2 nach einem Modul "plugin" suchen u
$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

View file

@ -122,7 +122,7 @@ the 1st part of the line is the name of the CSS file (without the .css) the 2nd
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;
@ -167,7 +167,7 @@ The content of this file should be something like
<?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'.
);
@ -250,7 +250,7 @@ Next crucial part of the theme.php file is a definition of an init function.
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');
}