Stud.IP  5.4
StudIPPlugin Class Reference

Public Member Functions

 __construct ()
 
 getPluginId ()
 
 isEnabled ()
 
 getPluginName ()
 
 getPluginPath ()
 
 getPluginURL ()
 
 getMetadata ()
 
 getPluginDescription ()
 
 getDescriptionMode ()
 
 isHighlighted ()
 
 getHighlightText ()
 
 getPluginVersion ()
 
 isCorePlugin ()
 
 isActivated ($context=null, $type='sem')
 
 isActivatableForContext (Range $context)
 
 perform ($unconsumed_path)
 

Static Public Member Functions

static onEnable ($plugin_id)
 
static onDisable ($plugin_id)
 
static onActivation ($plugin_id, $range_id)
 
static onDeactivation ($plugin_id, $range_id)
 

Protected Attributes

 $plugin_info
 
 $manifest = null
 

Detailed Description

StudIPPlugin.class.php - generic plugin base class

Author
Elmar Ludwig ludwi.nosp@m.g@uo.nosp@m.s.de

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

plugin constructor

Member Function Documentation

◆ getDescriptionMode()

getDescriptionMode ( )

◆ getHighlightText()

getHighlightText ( )

◆ getMetadata()

getMetadata ( )

Return metadata stored in the manifest of this plugin.

◆ getPluginDescription()

getPluginDescription ( )

Returns the description of the plugin either from plugins-table or from the manifest's descriptionlong or description attribute.

Returns
string|null

◆ getPluginId()

getPluginId ( )

Return the ID of this plugin.

◆ getPluginName()

getPluginName ( )

Return the name of this plugin.

◆ getPluginPath()

getPluginPath ( )

Return the filesystem path to this plugin.

◆ getPluginURL()

getPluginURL ( )

Return the URL of this plugin. Can be used to refer to resources (images, style sheets, etc.) inside the installed plugin package.

◆ getPluginVersion()

getPluginVersion ( )

Returns the version of this plugin as defined in manifest.

Returns
string

◆ isActivatableForContext()

isActivatableForContext ( Range  $context)

Returns whether the plugin may be activated in a certain context.

Parameters
Range$context
Returns
bool

◆ isActivated()

isActivated (   $context = null,
  $type = 'sem' 
)

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

Parameters
$contextcontext range id (optional)
$typetype of activation (optional), can be set to 'user' in order to point to a homepage plugin

◆ isCorePlugin()

isCorePlugin ( )

Checks if the plugin is a core-plugin. Returns true if this is the case.

Returns
boolean

◆ isEnabled()

isEnabled ( )

◆ isHighlighted()

isHighlighted ( )

◆ onActivation()

static onActivation (   $plugin_id,
  $range_id 
)
static

Callback function called after enabling a plugin. The plugin's ID is transmitted for convenience.

Parameters
$plugin_idstring The ID of the plugin just enabled.

◆ onDeactivation()

static onDeactivation (   $plugin_id,
  $range_id 
)
static

Callback function called after disabling a plugin. The plugin's ID is transmitted for convenience.

Parameters
$plugin_idstring The ID of the plugin just disabled.

◆ onDisable()

static onDisable (   $plugin_id)
static

Callback function called after disabling a plugin. The plugin's ID is transmitted for convenience.

Parameters
$plugin_idstring The ID of the plugin just disabled.

◆ onEnable()

static onEnable (   $plugin_id)
static

Callback function called after enabling a plugin. The plugin's ID is transmitted for convenience.

Parameters
$plugin_idstring The ID of the plugin just enabled.

◆ perform()

perform (   $unconsumed_path)

This method dispatches all actions.

Parameters
stringpart of the dispatch path that was not consumed
Returns
void

Field Documentation

◆ $manifest

$manifest = null
protected

Plugin manifest

◆ $plugin_info

$plugin_info
protected

plugin meta data


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