Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:plugins:general_information
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
vufind2:general_plugin_information [2015/12/09 19:41] – ↷ Links adapted because of a move operation demiankatz | development:plugins:general_information [2020/03/03 17:48] – ↷ Links adapted because of a move operation demiankatz | ||
---|---|---|---|
Line 3: | Line 3: | ||
A Zend plugin is any class that is determined at runtime. | A Zend plugin is any class that is determined at runtime. | ||
- | Although VuFind 2.0 provides | + | Although VuFind |
* Each family of plugins has a common interface and/or base class. | * Each family of plugins has a common interface and/or base class. | ||
- | * Each family of plugins is loaded with the help of a [[Zend Framework | + | * Each family of plugins is loaded with the help of a [[development: |
- | * Each plugin-specific service locator can be configured through its own section of module.config.php inside VuFind' | + | * Each plugin-specific service locator can be configured through its own section of module.config.php inside VuFind' |
* Each family of plugins lives in its own namespace, but VuFind can be configured to load custom plugins from other places. | * Each family of plugins lives in its own namespace, but VuFind can be configured to load custom plugins from other places. | ||
All of the specific details for each plugin type can be found in the [[: | All of the specific details for each plugin type can be found in the [[: | ||
+ | :!: In some cases [[development: | ||
===== Creating a New Plugin ===== | ===== Creating a New Plugin ===== | ||
Line 18: | Line 19: | ||
1.) Create a class implementing the appropriate plugin interface and/or extending the appropriate plugin base class. | 1.) Create a class implementing the appropriate plugin interface and/or extending the appropriate plugin base class. | ||
- | 2a.) If you are using a [[customizing_vufind_2.0# | + | 2a.) If you are using a [[development: |
2b.) If you are modifying core VuFind code, put the new class in the standard namespace for its plugin type, and modify the main config/ | 2b.) If you are modifying core VuFind code, put the new class in the standard namespace for its plugin type, and modify the main config/ | ||
Line 26: | Line 27: | ||
If you want to modify or replace the functionality of an existing plugin, follow these steps: | If you want to modify or replace the functionality of an existing plugin, follow these steps: | ||
- | 1.) If you do not already have one, create a [[customizing_vufind_2.0# | + | 1.) If you do not already have one, create a [[development: |
2.) Create a new class in your custom module which replaces the core plugin. | 2.) Create a new class in your custom module which replaces the core plugin. | ||
Line 32: | Line 33: | ||
3.) Edit your module' | 3.) Edit your module' | ||
- | Starting with VuFind 2.4, you can use [[code generators]] to automate this process in many cases. | + | Starting with VuFind 2.4, you can use [[development: |
===== Using a Plugin ===== | ===== Using a Plugin ===== | ||
- | Most plugins are configured through [[..: | + | Most plugins are configured through [[configuration: |
===== Accessing Other Plugins / Services ===== | ===== Accessing Other Plugins / Services ===== | ||
Line 42: | Line 43: | ||
If you implement the [[https:// | If you implement the [[https:// | ||
- | If your plugin depends on other components, it is often preferable to inject dependencies into the constructor in a factory in the service manager configuration rather than overusing the ServiceLocatorAwareInterface. | + | If your plugin depends on other components, it is often preferable to inject dependencies into the constructor in a factory in the service manager configuration rather than overusing the ServiceLocatorAwareInterface. |
---- struct data ---- | ---- struct data ---- | ||
---- | ---- | ||
development/plugins/general_information.txt · Last modified: 2020/03/03 20:08 by demiankatz