FOSSology  4.4.0
Open Source License Compliance by Open Source Software
common-plugin.php File Reference

Core functions for user interface plugins. More...

Go to the source code of this file.

Functions

 plugin_cmp ($a, $b)
 Sort compare function. More...
 
 plugin_sort ()
 Sort the global $Plugins by dependencies. This way plugins get loaded in the correct order.
 
 plugin_find ($pluginName)
 Given the official name of a plugin, return the $Plugins object. More...
 
 plugin_load ()
 Load every module ui found in mods-enabled.
 
 getStringRepresentation ($vars, $classname)
 

Variables

global $Plugins = array()
 Global plugins array.
 

Detailed Description

Core functions for user interface plugins.

Definition in file common-plugin.php.

Function Documentation

◆ getStringRepresentation()

getStringRepresentation (   $vars,
  $classname 
)

Used to convert plugin to string representation by __toString()

Parameters
array$varsAssociative array of variable name => value
string$classnameName of the class of the object being represented
Returns
string String representation of the object

Definition at line 318 of file common-plugin.php.

◆ plugin_cmp()

plugin_cmp (   $a,
  $b 
)

Sort compare function.

Sorts by dependency relationship. If a and b are at the same dependency level, then sort by the plugin level.

Parameters
Plugina
Pluginb
Returns
int -1, 0, 1 for plugin a being <, =, or > than b

Definition at line 32 of file common-plugin.php.

◆ plugin_find()

plugin_find (   $pluginName)

Given the official name of a plugin, return the $Plugins object.

Only plugins in PLUGIN_STATE_READY are scanned.

Parameters
string$pluginNameName of the required plugin
Returns
Plugin|NULL The plugin or NULL if the plugin name isn't found.

Definition at line 197 of file common-plugin.php.