OXID eShop CE  4.8.11
 All Classes Files Functions Variables Pages
oxModule Class Reference
+ Inheritance diagram for oxModule:
+ Collaboration diagram for oxModule:

Public Member Functions

 setModuleData ($aModule)
 load ($sModuleId)
 loadByDir ($sModuleDir)
 loadModule ($sModuleId)
 loadLegacyModule ($sModuleId)
 loadUnregisteredModule ($sModuleId)
 getDescription ()
 getTitle ()
 getId ()
 getExtensions ()
 getIdByPath ($sModule)
 getInfo ($sName, $iLang=null)
 isActive ()
 isExtended ()
 hasExtendClass ()
 isLegacy ()
 isRegistered ()
 hasMetadata ()
 isFile ()
 activate ()
 deactivate ($sModuleId=null)
 buildModuleChains ($aModuleArray)
 mergeModuleArrays ($aAllModuleArray, $aAddModuleArray)
 filterModuleArray ($aModules, $sModuleId)
 getModulePath ($sModuleId=null)
 getModuleFullPath ($sModuleId)
 getAllModules ()
 getLegacyModules ()
 getDisabledModules ()
 getModulePaths ()
 getModuleTemplates ()
 getModuleFiles ()
 getModuleVersions ()
 getModuleEvents ()
 getTemplates ($sModuleId=null)
 saveLegacyModule ($sModuleId, $sModuleName, $aModuleInfo=null)
 updateModuleIds ($sModuleLegacyId, $sModuleId)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _callEvent ($sEvent, $sModuleId)
 _changeBlockStatus ($sModule, $iStatus=0)
 _deleteBlock ($sModule)
 _resetCache ()
 _hasInstalledTemplateBlocks ($sModuleId)
 _addTemplateBlocks ($aModuleBlocks, $sModuleId=null)
 _addTemplateFiles ($aModuleTemplates, $sModuleId=null)
 _addModuleVersion ($sModuleVersion, $sModuleId=null)
 _addModuleEvents ($aModuleEvents, $sModuleId=null)
 _addModuleFiles ($aModuleFiles, $sModuleId=null)
 _addModuleSettings ($aModuleSettings, $sModuleId=null)
 _clearApcCache ()
 _removeFromDisabledList ()
 _addExtensions ()
 _addToDisabledList ($sModuleId)
 _removeNotUsedExtensions ($aInstalledExtensions)
 _getModuleExtensionsGarbage ($aModuleMetaDataExtensions, $aModuleInstalledExtensions)
 _removeGarbage ($aInstalledExtensions, $aGarbage)
 _countActivatedExtensions ($aModuleExtensions, $aInstalledExtensions)
 _countExtensions ($aModuleExtensions)
 _isExtensionsActive ()
 _isInDisabledList ($sId)

Protected Attributes

 $_aModule = array()
 $_blMetadata = false
 $_blRegistered = false
 $_blFile = false
 $_blLegacy = false

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Class handling shop modules

Definition at line 7 of file oxmodule.php.

Member Function Documentation

oxModule::_addExtensions ( )
protected

Add extension to module

Definition at line 1041 of file oxmodule.php.

oxModule::_addModuleEvents (   $aModuleEvents,
  $sModuleId = null 
)
protected

Add module events to config.

Parameters
array$aModuleEventsModule events
string$sModuleIdModule id
Returns
null

Definition at line 824 of file oxmodule.php.

oxModule::_addModuleFiles (   $aModuleFiles,
  $sModuleId = null 
)
protected

Add module files to config for auto loader.

Parameters
array$aModuleFilesModule files array
string$sModuleIdModule id
Returns
null

Definition at line 848 of file oxmodule.php.

oxModule::_addModuleSettings (   $aModuleSettings,
  $sModuleId = null 
)
protected

Add module settings to database.

Parameters
array$aModuleSettingsModule settings array
string$sModuleIdModule id
Returns
null

Definition at line 872 of file oxmodule.php.

oxModule::_addModuleVersion (   $sModuleVersion,
  $sModuleId = null 
)
protected

Add module version to config.

Parameters
string$sModuleVersionModule version
string$sModuleIdModule id
Returns
null

Definition at line 800 of file oxmodule.php.

oxModule::_addTemplateBlocks (   $aModuleBlocks,
  $sModuleId = null 
)
protected

Add module templates to database.

Parameters
array$aModuleBlocksModule blocks array
string$sModuleIdModule id
Returns
null

Definition at line 741 of file oxmodule.php.

oxModule::_addTemplateFiles (   $aModuleTemplates,
  $sModuleId = null 
)
protected

Add module template files to config for smarty.

Parameters
array$aModuleTemplatesModule templates array
string$sModuleIdModule id
Returns
null

Definition at line 776 of file oxmodule.php.

oxModule::_addToDisabledList (   $sModuleId)
protected

Add module to disable list

Definition at line 1059 of file oxmodule.php.

oxModule::_callEvent (   $sEvent,
  $sModuleId 
)
protected

Call module event.

Parameters
string$sEventEvent name
string$sModuleIdModule Id
Returns
null

Definition at line 466 of file oxmodule.php.

oxModule::_changeBlockStatus (   $sModule,
  $iStatus = 0 
)
protected

Deactivates or activates oxBlocks of a module

Parameters
string$sModuleModule name
integer$iStatus0 or 1 to (de)activate blocks
Returns
null

Definition at line 487 of file oxmodule.php.

oxModule::_clearApcCache ( )
protected

Cleans PHP APC cache

Definition at line 1015 of file oxmodule.php.

oxModule::_countActivatedExtensions (   $aModuleExtensions,
  $aInstalledExtensions 
)
protected

Counts activated module extensions.

Parameters
$aModuleExtensions
$aInstalledExtensions
Returns
int

Definition at line 1153 of file oxmodule.php.

oxModule::_countExtensions (   $aModuleExtensions)
protected

Counts module extensions.

Parameters
$aModuleExtensions
Returns
int

Definition at line 1177 of file oxmodule.php.

oxModule::_deleteBlock (   $sModule)
protected

Deactivates or activates oxBlocks of a module

Parameters
string$sModuleModule name
Returns
null

Definition at line 501 of file oxmodule.php.

oxModule::_getModuleExtensionsGarbage (   $aModuleMetaDataExtensions,
  $aModuleInstalledExtensions 
)
protected

Returns extension which is no longer in metadata - garbage

Parameters
$aModuleMetaDataExtensions- extensions defined in metadata.
$aModuleInstalledExtensions- extensions which are installed
Returns
array

Definition at line 1106 of file oxmodule.php.

oxModule::_hasInstalledTemplateBlocks (   $sModuleId)
protected

Checks if module has installed template blocks

Parameters
string$sModuleIdModule ID
Returns
bool

Definition at line 725 of file oxmodule.php.

oxModule::_isExtensionsActive ( )
protected

Checks if module extensions count is the same as in activated extensions list.

Returns
bool

Definition at line 1196 of file oxmodule.php.

oxModule::_isInDisabledList (   $sId)
protected

Checks if module is in disabled list.

Parameters
$sId
Returns
bool

Definition at line 1213 of file oxmodule.php.

oxModule::_removeFromDisabledList ( )
protected

Removes module from disabled module list

Definition at line 1025 of file oxmodule.php.

oxModule::_removeGarbage (   $aInstalledExtensions,
  $aGarbage 
)
protected

Removes garbage - not exiting module extensions, returns clean array of installed extensions

Parameters
$aInstalledExtensions- all installed extensions ( from all modules )
$aGarbage- extension which are not used and should be removed
Returns
array

Definition at line 1130 of file oxmodule.php.

oxModule::_removeNotUsedExtensions (   $aInstalledExtensions)
protected

Removes garbage ( module not used extensions ) from all installed extensions list

Parameters
$aInstalledExtensions
Returns
array

Definition at line 1081 of file oxmodule.php.

oxModule::_resetCache ( )
protected

Resets template, language and menu xml cache

Returns
null

Definition at line 514 of file oxmodule.php.

oxModule::activate ( )

Activate extension by merging module class inheritance information with shop module array

Returns
bool

Definition at line 390 of file oxmodule.php.

oxModule::buildModuleChains (   $aModuleArray)

Build module chains from nested array

Parameters
array$aModuleArrayModule array (nested format)
Returns
array

Definition at line 536 of file oxmodule.php.

oxModule::deactivate (   $sModuleId = null)

Deactivate extension by adding disable module class information to disabled module array

Parameters
string$sModuleIdModule Id
Returns
bool

Definition at line 435 of file oxmodule.php.

oxModule::filterModuleArray (   $aModules,
  $sModuleId 
)

Filter module array using module id

Parameters
array$aModulesModule array (nested format)
string$sModuleIdModule id/folder name
Returns
array

Definition at line 586 of file oxmodule.php.

oxModule::getAllModules ( )

Get parsed modules

Returns
array

Definition at line 643 of file oxmodule.php.

oxModule::getDescription ( )

Get module description

Returns
string

Definition at line 186 of file oxmodule.php.

oxModule::getDisabledModules ( )

Get disabled module id's

Returns
array

Definition at line 663 of file oxmodule.php.

oxModule::getExtensions ( )

Returns array of module extensions

Returns
array

Definition at line 220 of file oxmodule.php.

oxModule::getId ( )

Get module ID

Returns
string

Definition at line 210 of file oxmodule.php.

oxModule::getIdByPath (   $sModule)

Get module ID

Parameters
string$sModuleextension full path
Returns
string

Definition at line 232 of file oxmodule.php.

oxModule::getInfo (   $sName,
  $iLang = null 
)

Get module info item. If second param is passed, will try to get value according selected language.

Parameters
string$sNamename of info item to retrieve
string$iLanglanguage ID
Returns
mixed

Definition at line 262 of file oxmodule.php.

oxModule::getLegacyModules ( )

Get legacy modules list

Returns
array

Definition at line 653 of file oxmodule.php.

oxModule::getModuleEvents ( )

Get module events

Returns
array

Definition at line 713 of file oxmodule.php.

oxModule::getModuleFiles ( )

Get module files

Returns
array

Definition at line 693 of file oxmodule.php.

oxModule::getModuleFullPath (   $sModuleId)

Returns full module path

Parameters
string$sModuleId
Returns
string

Definition at line 630 of file oxmodule.php.

oxModule::getModulePath (   $sModuleId = null)

Get module dir

Parameters
string$sModuleIdModule ID
Returns
string

Definition at line 606 of file oxmodule.php.

oxModule::getModulePaths ( )

Get module id's with path

Returns
array

Definition at line 673 of file oxmodule.php.

oxModule::getModuleTemplates ( )

Get module template files

Returns
array

Definition at line 683 of file oxmodule.php.

oxModule::getModuleVersions ( )

Get module versions

Returns
array

Definition at line 703 of file oxmodule.php.

oxModule::getTemplates (   $sModuleId = null)

Return templates affected by template blocks for given module id.

Parameters
string$sModuleIdModule id
Returns
array

Definition at line 921 of file oxmodule.php.

oxModule::getTitle ( )

Get module title

Returns
string

Definition at line 198 of file oxmodule.php.

oxModule::hasExtendClass ( )
Returns
bool

Definition at line 337 of file oxmodule.php.

oxModule::hasMetadata ( )

Checks if module has metadata

Returns
bool

Definition at line 370 of file oxmodule.php.

oxModule::isActive ( )

Check if extension is active

Returns
bool

Definition at line 295 of file oxmodule.php.

oxModule::isExtended ( )

Check if extension has any extended classes

Deprecated:

since v5.1.2 (2013-12-10); Naming changed use function hasExtendClass().

use together with hasMetadata if needed.

Returns
bool

Definition at line 325 of file oxmodule.php.

oxModule::isFile ( )

Checks if module is single file

Returns
bool

Definition at line 380 of file oxmodule.php.

oxModule::isLegacy ( )

Checks if module is defined as legacy module

Returns
bool

Definition at line 350 of file oxmodule.php.

oxModule::isRegistered ( )

Checks if module is registered in any way

Returns
bool

Definition at line 360 of file oxmodule.php.

oxModule::load (   $sModuleId)

Load module info

Parameters
string$sModuleIdModule ID
Returns
bool

Definition at line 63 of file oxmodule.php.

oxModule::loadByDir (   $sModuleDir)

Load module by dir name

Parameters
string$sModuleDirModule dir name
Returns
bool

Definition at line 81 of file oxmodule.php.

oxModule::loadLegacyModule (   $sModuleId)

Load Extension from legacy metadata

Parameters
string$sModuleIdModule ID
Returns
bool

Definition at line 131 of file oxmodule.php.

oxModule::loadModule (   $sModuleId)

Load Extension from metadata

Parameters
string$sModuleIdModule ID
Returns
bool

Definition at line 105 of file oxmodule.php.

oxModule::loadUnregisteredModule (   $sModuleId)

Load extension without any metadata

Parameters
string$sModuleIdModule ID
Returns
bool

Definition at line 156 of file oxmodule.php.

oxModule::mergeModuleArrays (   $aAllModuleArray,
  $aAddModuleArray 
)

Merge two nested module arrays together so that the values of $aAddModuleArray are appended to the end of the $aAllModuleArray

Parameters
array$aAllModuleArrayAll Module array (nested format)
array$aAddModuleArrayAdded Module array (nested format)
Returns
array

Definition at line 556 of file oxmodule.php.

oxModule::saveLegacyModule (   $sModuleId,
  $sModuleName,
  $aModuleInfo = null 
)

Enables modules, that don't have metadata file activation/deactivation. Writes to "aLegacyModules" config variable classes, that current module extends.

Parameters
string$sModuleIdModule id
string$sModuleNameModule name
string$aModuleInfoExtended classes
Returns
string module id

Definition at line 949 of file oxmodule.php.

oxModule::setModuleData (   $aModule)

Set passed module data

Parameters
array$aModulemodule data
Returns
null

Definition at line 51 of file oxmodule.php.

oxModule::updateModuleIds (   $sModuleLegacyId,
  $sModuleId 
)

Update module ID in modules config variables aModulePaths and aDisabledModules.

Parameters
string$sModuleLegacyIdOld module ID
string$sModuleIdNew module ID
Returns
null

Definition at line 982 of file oxmodule.php.

Member Data Documentation

oxModule::$_aModule = array()
protected

Definition at line 14 of file oxmodule.php.

oxModule::$_blFile = false
protected

Definition at line 35 of file oxmodule.php.

oxModule::$_blLegacy = false
protected

Definition at line 42 of file oxmodule.php.

oxModule::$_blMetadata = false
protected

Definition at line 21 of file oxmodule.php.

oxModule::$_blRegistered = false
protected

Definition at line 28 of file oxmodule.php.


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