Stud.IP  2.0 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
PluginManager Class Reference
Collaboration diagram for PluginManager:
Collaboration graph

Public Member Functions

 setPluginEnabled ($id, $enabled)
 setPluginPosition ($id, $position)
 isPluginActivated ($id, $context)
 setPluginActivated ($id, $context, $active)
 getDefaultActivations ($id)
 setDefaultActivations ($id, $institutes)
 registerPlugin ($name, $class, $path, $depends=NULL)
 unregisterPlugin ($id)
 getPluginInfo ($class)
 getPluginInfoById ($id)
 getPluginInfos ($type=NULL)
 getPlugin ($class)
 getPluginById ($id)
 getPlugins ($type, $context=NULL)

Static Public Member Functions

static getInstance ()

Protected Member Functions

 checkUserAccess ($plugin, $user)
 getCachedPlugin ($plugin_info, $context=NULL)

Member Function Documentation

checkUserAccess (   $plugin,
  $user 
)
protected

Check user access permission for the given plugin.

Parameters
$pluginplugin meta data
$useruser id of user

Here is the caller graph for this function:

getCachedPlugin (   $plugin_info,
  $context = NULL 
)
protected

Get instance of the plugin specified by plugin meta data.

Parameters
$plugin_infoplugin meta data
$contextcontext range id (optional)

Here is the caller graph for this function:

getDefaultActivations (   $id)

Returns the list of institutes for which a specific plugin is enabled by default.

Parameters
$idid of the plugin

Here is the call graph for this function:

static getInstance ( )
static

Returns the PluginManager singleton instance.

Here is the caller graph for this function:

getPlugin (   $class)

Get instance of the plugin specified by plugin class name.

Parameters
$classclass name of plugin

Here is the call graph for this function:

getPluginById (   $id)

Get instance of the plugin specified by plugin id.

Parameters
$idid of the plugin

Here is the call graph for this function:

getPluginInfo (   $class)

Get meta data for the plugin specified by plugin class name.

Parameters
$classclass name of plugin

Here is the caller graph for this function:

getPluginInfoById (   $id)

Get meta data for the plugin specified by plugin id.

Parameters
$idid of the plugin

Here is the caller graph for this function:

getPluginInfos (   $type = NULL)

Get meta data for all plugins of the specified type. A type of NULL returns meta data for all installed plugins.

Parameters
$typeplugin type or NULL (all types)

Here is the caller graph for this function:

getPlugins (   $type,
  $context = NULL 
)

Get instances of all plugins of the specified type. A type of NULL returns all enabled plugins. The optional context parameter can be used to get only plugins that are activated in the given context.

Parameters
$typeplugin type or NULL (all types)
$contextcontext range id (optional)

Here is the call graph for this function:

isPluginActivated (   $id,
  $context 
)

Get the activation status of a plugin in the given context. This also checks the plugin default activations.

Parameters
$idid of the plugin
$contextcontext range id

Here is the call graph for this function:

Here is the caller graph for this function:

registerPlugin (   $name,
  $class,
  $path,
  $depends = NULL 
)

Register a new plugin or update an existing plugin entry in the data base. Returns the id of the new or updated plugin.

Parameters
$nameplugin name
$classplugin class name
$pathplugin relative path
$dependsid of plugin this plugin depends on

Here is the call graph for this function:

setDefaultActivations (   $id,
  $institutes 
)

Set the list of institutes for which a specific plugin should be enabled by default.

Parameters
$idid of the plugin
$institutesarray of institute ids

Here is the call graph for this function:

setPluginActivated (   $id,
  $context,
  $active 
)

Sets the activation status of a plugin in the given context.

Parameters
$idid of the plugin
$contextcontext range id
$activeplugin status (true or false)

Here is the call graph for this function:

setPluginEnabled (   $id,
  $enabled 
)

Set the enabled/disabled status of the given plugin.

Parameters
$idid of the plugin
$enabledplugin status (true or false)

Here is the call graph for this function:

setPluginPosition (   $id,
  $position 
)

Set the navigation position of the given plugin.

Parameters
$idid of the plugin
$positionplugin navigation position

Here is the call graph for this function:

unregisterPlugin (   $id)

Remove registration for the given plugin from the data base.

Parameters
$idid of the plugin

Here is the call graph for this function:


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