Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:entwickler:plugin_manager [2025/08/21 18:16] – [Plugin Manager] mightymcoderen:entwickler:plugin_manager [2025/08/21 18:22] (current) – [Make your plugin compatible with the Plugin Manager (Admidio 5)] mightymcoder
Line 9: Line 9:
 plugins in Admidio. plugins in Admidio.
  
-======= Make your plugin compatible with the Plugin Manager (Admidio 5) =======+======== Make your plugin compatible with the Plugin Manager (Admidio 5) ========
 To make your plugin compatible with the Plugin Manager certain requirements must first be met. These include: To make your plugin compatible with the Plugin Manager certain requirements must first be met. These include:
   * [[en:entwickler:plugin_manager#naming_conventions|Naming conventions]]   * [[en:entwickler:plugin_manager#naming_conventions|Naming conventions]]
   * A consistent [[en:entwickler:plugin_manager#folder_structure|folder structure]]   * A consistent [[en:entwickler:plugin_manager#folder_structure|folder structure]]
   * Use of the new plugin namespace //Plugins//   * Use of the new plugin namespace //Plugins//
-  * A [[en:entwickler:plugin_manager#plugin_preferences_class|preference presenter class]]+  * A [[en:entwickler:plugin_manager#plugin_preferences_class|preference presenter class]] with a [[en:entwickler:plugin_manager#single_formpresenter_element|single FormPresenter element]] or with [[en:entwickler:plugin_manager#multiple_formpresenter_elements|multiple FormPresenter elements]]
   * A [[en:entwickler:plugin_manager#plugin_class|plugin class]]   * A [[en:entwickler:plugin_manager#plugin_class|plugin class]]
   * A JSON [[en:entwickler:plugin_manager#configuration_file|configuration file]]   * A JSON [[en:entwickler:plugin_manager#configuration_file|configuration file]]
  
-====== Naming conventions ======+======= Naming conventions =======
 To use the new plugin namespace //Plugins// some naming conventions must be observed: To use the new plugin namespace //Plugins// some naming conventions must be observed:
   - No plugin folder or file may contain delimiters such as //"-"// or //"_"// especially if it will be used via a class import. For consistency only the optional folder //db_scripts// (see: [[en:entwickler:plugin_manager#folder_structure|folder structure]]) is exempt from this rule.   - No plugin folder or file may contain delimiters such as //"-"// or //"_"// especially if it will be used via a class import. For consistency only the optional folder //db_scripts// (see: [[en:entwickler:plugin_manager#folder_structure|folder structure]]) is exempt from this rule.
   - For better readability file and folder names containing multiple words should follow CamelCase notation.   - For better readability file and folder names containing multiple words should follow CamelCase notation.
  
-====== Folder structure ======+======= Folder structure =======
 The basic folder structure of any plugin is shown below using the "Birthday" overview plugin as an example: The basic folder structure of any plugin is shown below using the "Birthday" overview plugin as an example:
 {{:en:entwickler:folder_structure_birthday.png?direct&400|}} {{:en:entwickler:folder_structure_birthday.png?direct&400|}}
  
-===== classes folder ===== +====== classes folder ====== 
-==== Presenter classes ==== +===== Presenter classes ===== 
-=== Plugin-specific classes ===+==== Plugin-specific classes ====
 Inside the //Presenter// folder all necessary //PagePresenter// classes of the plugin are placed. These should be similar to the module-specific //PagePresenter// classes. Inside the //Presenter// folder all necessary //PagePresenter// classes of the plugin are placed. These should be similar to the module-specific //PagePresenter// classes.
  
-=== Plugin preferences class === +==== Plugin preferences class ==== 
-== Single FormPresenter element ==+=== Single FormPresenter element ===
 If the plugin provides preferences there should be a class //"[PluginName]**PreferencesPresenter**"//. This class contains a single static preference method following the naming conventions of Admidio's //Preferences// class. If the plugin provides preferences there should be a class //"[PluginName]**PreferencesPresenter**"//. This class contains a single static preference method following the naming conventions of Admidio's //Preferences// class.
  
Line 94: Line 94:
  
  
-== Multiple FormPresenter elements ==+=== Multiple FormPresenter elements ===
 With Admidio 5 the preference page has been redesigned. It is now possible to display multiple "subcards" on one preference panel. To use this feature from a plugin the **//hasSubcards//** configuration flag must be set to //true// With Admidio 5 the preference page has been redesigned. It is now possible to display multiple "subcards" on one preference panel. To use this feature from a plugin the **//hasSubcards//** configuration flag must be set to //true//
  
Line 239: Line 239:
 This makes it possible to show seperate forms on the same page. There are no limits to the display options whether as cards (as in the example), tabs, or accordions. With this approach each available Bootstrap/HTML display is possible through the smarty templates. This makes it possible to show seperate forms on the same page. There are no limits to the display options whether as cards (as in the example), tabs, or accordions. With this approach each available Bootstrap/HTML display is possible through the smarty templates.
  
-==== Entity, Service and ValueObjects classes ====+===== Entity, Service and ValueObjects classes =====
 If the plugin has specific //Entity//, //Service//, or //ValueObjects// classes these should be placed in the corresponding subfolders as is done with the Admidio modules. If the plugin has specific //Entity//, //Service//, or //ValueObjects// classes these should be placed in the corresponding subfolders as is done with the Admidio modules.
  
-==== Main plugin class ====+===== Main plugin class =====
 The main [[en:entwickler:plugin_manager#plugin_class|plugin class]] (e.g.: //Birthday//) must be placed directly in the //classes// folder. The main [[en:entwickler:plugin_manager#plugin_class|plugin class]] (e.g.: //Birthday//) must be placed directly in the //classes// folder.
  
-===== db_scripts folder =====+====== db_scripts folder ======
 This folder is optional and is used to place plugin-specific database scripts used when installing (//db-install.sql//) or uninstalling (//db-uninstall.sql//) the plugin. This folder is optional and is used to place plugin-specific database scripts used when installing (//db-install.sql//) or uninstalling (//db-uninstall.sql//) the plugin.
  
Line 280: Line 280:
 </code> </code>
  
-===== languages folder =====+====== languages folder ======
 This folder contains the plugin-specific translation files. This folder contains the plugin-specific translation files.
  
-===== templates folder =====+====== templates folder ======
 To move away from the deprecated //HtmlPage// and //HtmlTable// classes plugins should exclusively use the Smarty template engine with files stored in this folder. To move away from the deprecated //HtmlPage// and //HtmlTable// classes plugins should exclusively use the Smarty template engine with files stored in this folder.
  
-===== Root plugin folder =====+====== Root plugin folder ======
        
      
-==== Main plugin file ====+===== Main plugin file =====
 Inside the root plugin folder a main plugin file is required. This file can contain plugin-specific logic (similar to Admidio’s module entry files) or simply initialize the [[en:entwickler:plugin_manager#plugin_class|plugin class]] as in the following example: Inside the root plugin folder a main plugin file is required. This file can contain plugin-specific logic (similar to Admidio’s module entry files) or simply initialize the [[en:entwickler:plugin_manager#plugin_class|plugin class]] as in the following example:
 <code php> <code php>
Line 318: Line 318:
 </code> </code>
  
-==== Plugin configuration file ====+===== Plugin configuration file =====
 Each plugin must provide a JSON configuration file containing basic plugin information and configuration (see: [[en:entwickler:plugin_manager#configuration_file|Configuration file]]). Each plugin must provide a JSON configuration file containing basic plugin information and configuration (see: [[en:entwickler:plugin_manager#configuration_file|Configuration file]]).
  
  
-====== Configuration file ======+======= Configuration file =======
 Each plugin has to provide a JSON configuration file. The following table gives an overview of all keys currently available: Each plugin has to provide a JSON configuration file. The following table gives an overview of all keys currently available:
  
Line 436: Line 436:
 </code> </code>
  
-====== Plugin class ======+======= Plugin class =======
 The //Plugin// class extends the basic functionality provided by the abstract class //PluginAbstract// and implements the //doRender// method. The //Plugin// class extends the basic functionality provided by the abstract class //PluginAbstract// and implements the //doRender// method.
  
Line 474: Line 474:
 </code> </code>
  
-======= PluginAbstract class =======+======== PluginAbstract class ========
 <WRAP center round todo 60%> <WRAP center round todo 60%>
 methods documentation methods documentation
 </WRAP> </WRAP>
  • en/entwickler/plugin_manager.1755793010.txt.gz
  • Last modified: 2025/08/21 18:16
  • by mightymcoder