DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:struct:devel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
plugin:struct:devel [2017-03-28 10:15] andiplugin:struct:devel [2020-08-21 11:36] Klap-in
Line 32: Line 32:
 Please refer to the existing types' source code to see how to implement your own type. Please refer to the existing types' source code to see how to implement your own type.
  
-Examples of plugins implenting this are: [[plugin:structstatus|structstatus Plugin]]+Examples of plugins implementing this are: [[plugin:structstatus|structstatus Plugin]], [[plugin:structgroup|structgroup Plugin]], [[plugin:structjoin|structjoin Plugin]], [[plugin:structcombolookup|structcombolookup Plugin]]
  
 ===== Allow Additional Config Keys ===== ===== Allow Additional Config Keys =====
Line 38: Line 38:
 When you write a plugin doing it's own aggregation, you might want to reuse the ConfigParser class. By default this class will throw an Exception when a config key is encountered that it does not understand. You can handle the ''PLUGIN_STRUCT_CONFIGPARSER_UNKNOWNKEY'' event and prevent the default (of throwing the exception). You can add your own config to the ''config'' array in the event. When you write a plugin doing it's own aggregation, you might want to reuse the ConfigParser class. By default this class will throw an Exception when a config key is encountered that it does not understand. You can handle the ''PLUGIN_STRUCT_CONFIGPARSER_UNKNOWNKEY'' event and prevent the default (of throwing the exception). You can add your own config to the ''config'' array in the event.
  
-<code>+<code php>
 array( array(
   'config' => &$this->config,   'config' => &$this->config,
Line 46: Line 46:
 </code> </code>
  
-Examples of plugins implenting this are: [[plugin:structgantt|structgantt Plugin]]+Examples of plugins implementing this are: [[plugin:structgantt|structgantt Plugin]], [[plugin:structodt|structodt Plugin]] 
 + 
 + 
 +===== Modify row rendering in AggregationTable ===== 
 + 
 +The ''PLUGIN_STRUCT_AGGREGATIONTABLE_RENDERRESULTROW'' event is called every time when the AggregationTable renders a row in a [[aggregation|struct table]]. You can use the ''BEFORE'' hook to change the default rendering procedure or ''AFTER'' to make some modifications to rendered row.  
 + 
 +<code php> 
 +array( 
 +  'id' => $this->id, 
 +  'mode' => $this->mode, 
 +  'renderer' => $this->renderer, 
 +  'searchConfig' => $this->searchConfig, 
 +  'data' => $this->data, 
 +  'rownum' => &$rownum, 
 +  'row' => &$row, 
 +
 +</code> 
 + 
 +Examples of plugins implementing this are: [[plugin:structrowcolor|structrowcolor Plugin]]
  
plugin/struct/devel.txt · Last modified: 2022-07-23 01:36 by Matt2

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki