Stud.IP  4.2 Revision
StudIPPlugin Class Reference
Collaboration diagram for StudIPPlugin:
Collaboration graph

Public Member Functions

 __construct ()
 
 getPluginId ()
 
 getPluginName ()
 
 getPluginPath ()
 
 getPluginURL ()
 
 getMetadata ()
 
 isCorePlugin ()
 
 isActivated ($context=null, $type='sem')
 
 isActivatableForContext (Range $context)
 
 perform ($unconsumed_path)
 

Static Public Member Functions

static onEnable ($plugin_id)
 
static onDisable ($plugin_id)
 

Protected Member Functions

 addStylesheet ($filename, $variables=[], $link_attr=[])
 

Protected Attributes

 $plugin_info
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

plugin constructor TODO bindtextdomain()

Here is the call graph for this function:

Member Function Documentation

◆ addStylesheet()

addStylesheet (   $filename,
  $variables = [],
  $link_attr = [] 
)
protected

Includes given stylesheet in page, compiles less if neccessary

Parameters
String$filenameName of the stylesheet (css or less) to include (relative to plugin directory)
Array$variablesOptional array of variables to pass to the LESS compiler
Array$link_attrAttributes to pass to the link element
Here is the call graph for this function:

◆ getMetadata()

getMetadata ( )

Return metadata stored in the manifest of this plugin.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPluginId()

getPluginId ( )

Return the ID of this plugin.

Here is the caller graph for this function:

◆ getPluginName()

getPluginName ( )

Return the name of this plugin.

◆ getPluginPath()

getPluginPath ( )

Return the filesystem path to this plugin.

Here is the caller graph for this function:

◆ getPluginURL()

getPluginURL ( )

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
Here is the call graph for this function:

◆ isCorePlugin()

isCorePlugin ( )

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

Returns
boolean

◆ 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
Here is the call graph for this function:

Field Documentation

◆ $plugin_info

$plugin_info
protected

plugin meta data


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