VirtueMart  3.2.14.9808
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
vmPlugin Class Reference
Inheritance diagram for vmPlugin:
Inheritance graph
[legend]
Collaboration diagram for vmPlugin:
Collaboration graph
[legend]

Public Member Functions

 __construct (&$subject, $config)
 
 setConvertDecimal ($toConvert)
 
 convertDec (&$data)
 
 loadJLangThis ($fname, $type=0, $name=0)
 
 setPluginLoggable ($set=TRUE)
 
 setCryptedFields ($fieldNames)
 
 getOwnUrl ()
 
 display3rdInfo ($intro, $developer, $contactlink, $manlink)
 
 selectedThisByMethodId ($id= 'type')
 
 onStoreInstallPluginTable ($psType, $name=FALSE)
 
 getTableSQLLoggablefields ()
 
 getTableSQLFields ()
 
 setConfigParameterable ($paramsFieldName, $varsToPushParam)
 
 renderByLayout ($layout= 'default', $viewData=NULL, $name=NULL, $psType=NULL)
 
 getTemplatePath ($pluginName, $group, $layout= 'default')
 

Static Public Member Functions

static loadJLang ($fname, $type, $name)
 
static getVarsToPushFromForm ($form)
 
static getVarsToPushByXML ($xmlFile, $name)
 

Protected Member Functions

 selectedThis ($psType, $name=0, $jid=null)
 
 selectedThisByJPluginId ($jplugin_id= 'type')
 
 getJoomlaPluginId ()
 
 createTableSQL ($tableComment, $tablesFields=0)
 
 getTablePluginParams ($psType, $name, $id, &$xParams, &$varsToPush)
 
 setOnTablePluginParams ($name, $id, &$table)
 
 declarePluginParams ($psType, &$data, $blind=0, $blind2=0)
 
 getVmPluginMethod ($int, $cache=true)
 
 storePluginInternalData (&$values, $primaryKey=0, $id=0, $preload=FALSE)
 
 getPluginInternalData ($id, $primaryKey=0)
 
 createPluginTableObject ($tableName, $tableFields, $primaryKey, $tableId, $loggable=FALSE)
 
 removePluginInternalData ($id, $primaryKey=0)
 

Protected Attributes

 $_psType = 0
 
 $_jid = 0
 
 $_vmpItable = 0
 
 $_tablename = 0
 
 $_tableId = 'id'
 
 $_tablepkey = 0
 
 $_vmpCtable = 0
 
 $_configTable = 0
 
 $_configTableFileName = 0
 
 $_configTableClassName = 0
 
 $_xParams = 0
 
 $_varsToPushParam = array()
 
 $_idName = 0
 
 $_configTableFieldName = 0
 
 $_debug = FALSE
 
 $_loggable = FALSE
 
 $_cryptedFields = false
 
 $_toConvertDec = false
 

Private Member Functions

 _getLayoutPath ($pluginName, $group, $layout= 'default')
 

Constructor & Destructor Documentation

vmPlugin::__construct ( $subject,
  $config 
)

Constructor

Parameters
object$subjectThe object to observe
array$configAn array that holds the plugin configuration
Since
1.5

Member Function Documentation

vmPlugin::_getLayoutPath (   $pluginName,
  $group,
  $layout = 'default' 
)
private

Note: We have 2 subfolders for versions > J15 for 3rd parties developers, to avoid 2 installers Note: from Version 2.12: it is possible to have the tmpl folder directly in $pluginName folder

Author
Max Milbers, Valérie Isaksen
vmPlugin::convertDec ( $data)
vmPlugin::createPluginTableObject (   $tableName,
  $tableFields,
  $primaryKey,
  $tableId,
  $loggable = FALSE 
)
protected
Parameters
$tableName
$tableFields
$primaryKey
$tableId
bool$loggable
Returns
VmTableData
vmPlugin::createTableSQL (   $tableComment,
  $tablesFields = 0 
)
protected
Parameters
$tableComment
Returns
string
vmPlugin::declarePluginParams (   $psType,
$data,
  $blind = 0,
  $blind2 = 0 
)
protected

Does VmTable::bindParameterable and setCryptedFields $name, $id, $data

Parameters
$psType
$data
Returns
bool
vmPlugin::display3rdInfo (   $intro,
  $developer,
  $contactlink,
  $manlink 
)
vmPlugin::getJoomlaPluginId ( )
finalprotected

Gets the id of the joomla table where the plugin is registered

Author
Max Milbers
vmPlugin::getOwnUrl ( )
vmPlugin::getPluginInternalData (   $id,
  $primaryKey = 0 
)
protected

This loads the data stored by the plugin before, NOT the configuration of the method, this function should never be triggered only called from triggered functions.

Parameters
int$id
string$primaryKey
vmPlugin::getTablePluginParams (   $psType,
  $name,
  $id,
$xParams,
$varsToPush 
)
protected
Parameters
$psType
$name
$id
$xParams
$varsToPush
Returns
bool
vmPlugin::getTableSQLFields ( )
Returns
array
vmPlugin::getTableSQLLoggablefields ( )

adds loggable fields to the table

Returns
array
vmPlugin::getTemplatePath (   $pluginName,
  $group,
  $layout = 'default' 
)
Parameters
$pluginName
$group
string$layout
Returns
mixed
Author
Valérie Isaksen
static vmPlugin::getVarsToPushByXML (   $xmlFile,
  $name 
)
static

This function gets the parameters of a plugin by an xml file. This is used for the configuration GUI in the BE. Attention: the xml Params must be always a subset of the varsToPushParams declared in the constructor

Parameters
$xmlFile
$name
Returns
array
static vmPlugin::getVarsToPushFromForm (   $form)
static

This function gets the parameters of a plugin from the given JForm $form. This is used for the configuration GUI in the BE. Attention: the xml Params must be always a subset of the varsToPushParams declared in the constructor

Parameters
$form
Returns
array
vmPlugin::getVmPluginMethod (   $int,
  $cache = true 
)
protected
Parameters
$int
Returns
mixed
static vmPlugin::loadJLang (   $fname,
  $type,
  $name 
)
static
vmPlugin::loadJLangThis (   $fname,
  $type = 0,
  $name = 0 
)
vmPlugin::onStoreInstallPluginTable (   $psType,
  $name = FALSE 
)

Create the table for this plugin if it does not yet exist. Or updates the table, if it exists. Please be aware that this function is slowing and is only called storing a method or installing/udpating a plugin.

Parameters
string$psTypeshipment,payment,custom
Author
Valérie Isaksen
Max Milbers
vmPlugin::removePluginInternalData (   $id,
  $primaryKey = 0 
)
protected
Parameters
$id
int$primaryKey
Returns
mixed
vmPlugin::renderByLayout (   $layout = 'default',
  $viewData = NULL,
  $name = NULL,
  $psType = NULL 
)
Parameters
string$layout
null$viewData
null$name
null$psType
Returns
string
Author
Patrick Kohl, Valérie Isaksen, Max Milbers
vmPlugin::selectedThis (   $psType,
  $name = 0,
  $jid = null 
)
protected

Checks if this plugin should be active by the trigger

Author
Max Milbers
Parameters
string$psTypeshipment,payment,custom
stringthe name of the plugin for example textinput, paypal
int/array$jid the registered plugin id(s) of the joomla table
vmPlugin::selectedThisByJPluginId (   $jplugin_id = 'type')
protected

Checks if this plugin should be active by the trigger

Author
Max Milbers
Valérie Isaksen
Parameters
int/array$jplugin_id the registered plugin id(s) of the joomla table
vmPlugin::selectedThisByMethodId (   $id = 'type')

Checks if this plugin should be active by the trigger

We should avoid this function, is expensive

Author
Max Milbers
Valérie Isaksen
Parameters
int/array$id the registered plugin id(s) of the joomla table
vmPlugin::setConfigParameterable (   $paramsFieldName,
  $varsToPushParam 
)

Set with this function the provided plugin parameters

Parameters
string$paramsFieldName
array$varsToPushParam
vmPlugin::setConvertDecimal (   $toConvert)
vmPlugin::setCryptedFields (   $fieldNames)
vmPlugin::setOnTablePluginParams (   $name,
  $id,
$table 
)
protected
Parameters
$name
$id
$table
Returns
bool
vmPlugin::setPluginLoggable (   $set = TRUE)
vmPlugin::storePluginInternalData ( $values,
  $primaryKey = 0,
  $id = 0,
  $preload = FALSE 
)
protected

This stores the data of the plugin, attention NOT the configuration of the pluginmethod, this function should never be triggered only called from triggered functions.

Author
Max Milbers
Parameters
array$valuesarray or object with the data to store
int | string$primaryKey
int | string$id
boolean$preload
Returns
array

Member Data Documentation

vmPlugin::$_configTable = 0
protected
vmPlugin::$_configTableClassName = 0
protected
vmPlugin::$_configTableFieldName = 0
protected
vmPlugin::$_configTableFileName = 0
protected
vmPlugin::$_cryptedFields = false
protected
vmPlugin::$_debug = FALSE
protected
vmPlugin::$_idName = 0
protected
vmPlugin::$_jid = 0
protected
vmPlugin::$_loggable = FALSE
protected
vmPlugin::$_psType = 0
protected
vmPlugin::$_tableId = 'id'
protected
vmPlugin::$_tablename = 0
protected
vmPlugin::$_tablepkey = 0
protected
vmPlugin::$_toConvertDec = false
protected
vmPlugin::$_varsToPushParam = array()
protected
vmPlugin::$_vmpCtable = 0
protected
vmPlugin::$_vmpItable = 0
protected
vmPlugin::$_xParams = 0
protected

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