Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
PluginAdministration Class Reference

Public Member Functions

 installPlugin ($filename)
 
 installPluginFromURL ($plugin_url)
 
 installPluginByName ($pluginname)
 
 uninstallPlugin ($plugin)
 
 getPluginTypes ()
 
 getUpdateInfo ($plugins)
 
 getMigrationInfo ()
 
 migratePlugin ($plugin_id)
 
 scanPluginDirectory ()
 
 registerPlugin ($plugindir)
 

Detailed Description

Model code for plugin administration tasks.

Member Function Documentation

getMigrationInfo ( )

Fetch migration information plugins. This method returns for each plugin: current schema version and top migration version, if available.

Returns
array
getPluginTypes ( )

Get a list of the types of all installed plugins.

Returns
array list of plugin types
getUpdateInfo (   $plugins)

Fetch update information for a list of plugins. This method returns for each plugin: the plugin name, current version and meta data of the plugin update, if available.

Parameters
array$pluginsarray of plugin meta data
installPlugin (   $filename)

Install a new plugin. Extracts the contents of the uploaded file, checks the manifest, creates the new plugin directory und finally registers the plugin in the database.

Parameters
string$filenamepath to the uploaded file
installPluginByName (   $pluginname)

Download and install a plugin with the given name from the plugin repository.

Parameters
string$pluginnamename of the plugin to install
installPluginFromURL (   $plugin_url)

Download and install a new plugin from the given URL.

Parameters
string$plugin_urlthe URL of the plugin package
migratePlugin (   $plugin_id)

migrate plugin to top migration

Parameters
integer$plugin_id
Returns
string output from migrator
registerPlugin (   $plugindir)

registers plugin at given path in database

Parameters
string$plugindirpath to plugin
Exceptions
PluginInstallationException
scanPluginDirectory ( )

scans PLUGINS_PATH for plugin.manifest files belonging to not registered plugins

Returns
array with manifest meta data
uninstallPlugin (   $plugin)

Uninstall the given plugin from the system. It will remove the database schema and all the plugin's files.

Parameters
array$pluginmeta data of plugin

The documentation for this class was generated from the following file: