Documentation

Structure

Directory & Files

Plugin files are stored in a sub-directory of the /plugins directory. The sub-directory represents what type the plugin belongs to. This allows for plugins of the same name but for different types. For example, one could have a plugin named example for both the /system and /search types.

Specific plugin files are contained within a directory of the same name as the plugin. While a plugin may contain any number of files and sub-directories, it must contain at least two files: the entry point (PHP file of the same name as the plugin) and a XML manifest.

Note: plugins will always be within a type sub-directory and will never be found in the top-level /plugins directory.

/app
.. /plugins
.. .. /{PluginType}
.. .. .. /{PluginName}
.. .. .. .. {PluginName}.php
.. .. .. .. {PluginName}.xml

From the structure detailed above, a "system" plugin called "foo" would have the following file structure:

/app
.. /plugins
.. .. /system
.. .. .. /foo
.. .. .. .. foo.php
.. .. .. .. foo.xml

There are few restrictions on the file name for the plugin but it is recommended to stick with alpha-numeric characters and underscores only.

Entry Point

Plugins are required to have a file with the same name as the plugin. This is the primary entry point and will typically contain the plugin class that is to be executed.

Last modified:

  • Copyright © 2022 Hubzero
  • Powered by Hubzero®