CWIS Developer Documentation
Protected Member Functions | List of all members
CWPlugin Class Reference

This class extends the base Plugin class with CWIS-specific functionality. More...

Inheritance diagram for CWPlugin:
Inheritance graph
[legend]
Collaboration diagram for CWPlugin:
Collaboration graph
[legend]

Protected Member Functions

 AddMetadataFieldsFromXml ($Schema)
 Load fields into metadata schema from XML file. More...
 
 DeleteMetadataFields ($SchemaId)
 Delete any metadata fields owned by plugin from specified schema. More...
 
- Protected Member Functions inherited from Plugin
 CreateTables ($Tables, $DB=NULL)
 Create database tables. More...
 
 CreateMissingTables ($Tables)
 Create missing database tables. More...
 
 DropTables ($Tables)
 Drop database tables. More...
 

Additional Inherited Members

- Public Member Functions inherited from Plugin
 Register ()
 Set the plugin attributes. More...
 
 SetUpConfigOptions ()
 Set up plugin configuration options. More...
 
 Initialize ()
 Initialize the plugin. More...
 
 HookEvents ()
 Hook methods to be called when specific events occur. More...
 
 DeclareEvents ()
 Declare events defined by this plugin. More...
 
 Install ()
 Perform any work needed when the plugin is first installed (for example, creating database tables). More...
 
 Upgrade ($PreviousVersion)
 Perform any work needed when the plugin is upgraded to a new version (for example, adding fields to database tables). More...
 
 Uninstall ()
 Perform any work needed when the plugin is uninstalled. More...
 
 GetAttributes ()
 Retrieve plugin information. More...
 
 GetBaseName ()
 Get plugin base name. More...
 
 ConfigSetting ($SettingName, $NewValue=NULL)
 Get/set plugin configuration setting. More...
 
 GetSavedConfigSetting ($SettingName)
 Get plugin configuration setting, ignoring any override value. More...
 
 GetConfigSettingType ($SettingName)
 Get type of a plugin configuration setting. More...
 
 GetConfigSettingParameters ($SettingName)
 Get plugin configuration setting parameters. More...
 
 ConfigSettingOverride ($SettingName, $Value)
 Set override for configuration setting, that will be returned regardless of the current saved configuration setting value. More...
 
 IsReady ($NewValue=NULL)
 Get/set whether the plugin is ready for use. More...
 
 IsEnabled ($NewValue=NULL, $Persistent=TRUE)
 Get/set whether the plugin is enabled. More...
 
 IsInstalled ($NewValue=NULL)
 Get/set whether the plugin is installed. More...
 
 InstalledVersion ($NewValue=NULL)
 Get/set the last version recorded as installed. More...
 
 GetName ()
 Get full name of plugin. More...
 
 GetDependencies ()
 Get list of plugins upon which this plugin depends (if any). More...
 
 __construct ()
 Class constructor – FOR PLUGIN MANAGER USE ONLY. More...
 
- Static Public Member Functions inherited from Plugin
static SetApplicationFramework ($AF)
 Set the application framework to be referenced within plugins. More...
 
- Protected Attributes inherited from Plugin
 $Author = NULL
 Name of the plugin's author. More...
 
 $Description = NULL
 Text description of the plugin. More...
 
 $Email = NULL
 Contact email for the plugin's author. More...
 
 $EnabledByDefault = FALSE
 Whether the plugin should be enabled by default when installed. More...
 
 $InitializeBefore = array()
 Plugins that should be initialized after us. More...
 
 $InitializeAfter = array()
 Plugins that should be initialized before us. More...
 
 $Instructions = NULL
 Instructions for configuring the plugin (displayed on the automatically-generated configuration page if configuration values are supplied). More...
 
 $Name = NULL
 Proper (human-readable) name of plugin. More...
 
 $Version = NULL
 Version number of plugin in the format X.X.X (for example: 1.2.12). More...
 
 $Url = NULL
 Web address for more information about the plugin. More...
 
 $Requires = array()
 Array with plugin base (class) names for the index and minimum version numbers for the values. More...
 
 $CfgSetup = array()
 Associative array describing the configuration values for the plugin. More...
 
 $CfgPage = NULL
 Name of configuration page for plugin. More...
 
- Static Protected Attributes inherited from Plugin
static $AF
 Application framework. More...
 

Detailed Description

This class extends the base Plugin class with CWIS-specific functionality.

Definition at line 13 of file CWPlugin.php.

Member Function Documentation

CWPlugin::AddMetadataFieldsFromXml (   $Schema)
protected

Load fields into metadata schema from XML file.

The XML file is assumed to be in install/MetadataSchema–SCHEMANAME.xml under the plugin's directory.

Parameters
mixed$SchemaSchema or ID of schema to load fields into.
Returns
string Error message or NULL if load succeeded.
Exceptions
ExceptionIf no XML file found.

Definition at line 28 of file CWPlugin.php.

References StdLib\Pluralize(), and StdLib\Singularize().

CWPlugin::DeleteMetadataFields (   $SchemaId)
protected

Delete any metadata fields owned by plugin from specified schema.

Parameters
int$SchemaIdID of schema to drop fields from.
Returns
string Error message or NULL if drop succeeded.

Definition at line 77 of file CWPlugin.php.


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