devel:common_plugin_functions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
devel:common_plugin_functions [2023-08-08 14:42] – 130.112.1.3 | devel:common_plugin_functions [2023-09-01 13:56] (current) – refactor examples Klap-in | ||
---|---|---|---|
Line 72: | Line 72: | ||
===== Instantiating ===== | ===== Instantiating ===== | ||
- | Default DokuWiki reuses instances of plugins. This can be prevented by adding the function | + | Default DokuWiki reuses instances of plugins. This can be prevented by adding the function [[xref> |
<code php> | <code php> | ||
/** | /** | ||
Line 86: | Line 86: | ||
=====Load Helper plugins===== | =====Load Helper plugins===== | ||
- | In all plugins Helper plugins can be loaded by $this->'' | + | In all plugins Helper plugins can be loaded by '' |
It loads a given helper plugin if the plugin is enabled. Details and examples in [[helper plugins]]. | It loads a given helper plugin if the plugin is enabled. Details and examples in [[helper plugins]]. | ||
Line 96: | Line 96: | ||
$tag = $this-> | $tag = $this-> | ||
- | if($tag) { | + | if($tag |
$entries = $tag-> | $entries = $tag-> | ||
} | } | ||
Line 112: | Line 112: | ||
<code php> | <code php> | ||
if(!plugin_isdisabled(' | if(!plugin_isdisabled(' | ||
- | $tag =& plugin_load(' | + | $tag = plugin_load(' |
- | if($tag) { | + | if($tag |
$entries = $tag-> | $entries = $tag-> | ||
} | } | ||
Line 122: | Line 122: | ||
<code php> | <code php> | ||
if(!plugin_isdisabled(' | if(!plugin_isdisabled(' | ||
- | $table =& plugin_load(' | + | $table = plugin_load(' |
- | if($table) { | + | if($table |
$hasfilter = $table-> | $hasfilter = $table-> | ||
} | } |
devel/common_plugin_functions.txt · Last modified: 2023-09-01 13:56 by Klap-in