OXID eShop CE
6.2.2
|
Public Member Functions | |
__construct ($moduleVariablesLocator) | |
createClassChain ($className, $classAlias=null) | |
getActiveChain ($className, $classAlias=null) | |
getFullChain ($className, $classAlias) | |
filterInactiveExtensions ($classChain) | |
cleanModuleFromClassChain ($moduleId, array $classChain) | |
getDisabledModuleIds () | |
getModuleDirectoryByModuleId ($moduleId) | |
disableModule ($modulePath) | |
getModuleVariablesLocator () | |
Protected Member Functions | |
createClassExtensions ($classChain, $baseClass) | |
createClassExtension ($parentClass, $moduleClass) | |
handleSpecialCases ($requestedClass) | |
onModuleExtensionCreationError ($moduleClass) | |
getClassExtensionChain (\OxidEsales\Eshop\Core\Module\ModuleVariablesLocator $variablesLocator) | |
isUnitTest () | |
Private Member Functions | |
backwardsCompatibleCreateClassExtension ($parentClass, $moduleClassPath) | |
getModuleActivationBridge () | |
getModuleConfigurationDaoBridge () | |
getShopConfigurationDaoBridge () | |
getModuleStateService () | |
getContainer () | |
Private Attributes | |
$moduleVariablesLocator | |
Generates class chains for extended classes by modules. IMPORTANT: Due to the way the shop is prepared for testing, you must not use Registry::getConfig() in this class. oxNew will enter in an endless loop, if you try to do that.
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::__construct | ( | $moduleVariablesLocator | ) |
\OxidEsales\Eshop\Core\Module\ModuleVariablesLocator | $moduleVariablesLocator |
|
private |
Backwards compatible self::createClassExtension
string | $parentClass | Name of the parent class |
string | $moduleClassPath | Path of the module class as it is defined in metadata.php 'extend' section. This is not a valid file system path |
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::cleanModuleFromClassChain | ( | $moduleId, | |
array | $classChain | ||
) |
Clean classes from chain for given module id. Classes might be in module chain by path (old way) or by module namespace(new way). This function removes all classes from class chain for classes inside a deactivated module's directory.
string | $moduleId | |
array | $classChain |
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::createClassChain | ( | $className, | |
$classAlias = null |
|||
) |
Creates given class chains.
string | $className | Class name. |
string | $classAlias | Class alias, used for searching module extensions. Class is used if no alias given. |
|
protected |
Checks, if a given class can be loaded and create an alias for _parent. If the class cannot be loaded, some error handling is done.
e.g. class suboutput1_parent extends oxoutput {} class suboutput2_parent extends suboutput1 {}
string | $parentClass | |
string | $moduleClass |
|
protected |
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::disableModule | ( | $modulePath | ) |
If the module is found in configuration, return value is always true. Independent if the module was in a active or inactive state previously.
string | $modulePath | Full module path |
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::filterInactiveExtensions | ( | $classChain | ) |
Checks if module is disabled, added to aDisabledModules config.
array | $classChain | Module names |
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::getActiveChain | ( | $className, | |
$classAlias = null |
|||
) |
Assembles class chains.
string | $className | Class name. |
string | $classAlias | Class alias, used for searching module extensions. Class is used if no alias given. |
|
protected |
Only classes of active modules are considered.
\OxidEsales\Eshop\Core\Module\ModuleVariablesLocator | $variablesLocator |
|
private |
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::getDisabledModuleIds | ( | ) |
Get Ids of all deactivated module. If none are deactivated, returns an empty array.
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::getFullChain | ( | $className, | |
$classAlias | |||
) |
Build full class chain.
string | $className | |
string | $classAlias |
|
private |
|
private |
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::getModuleDirectoryByModuleId | ( | $moduleId | ) |
Get module path relative to source/modules for given module id.
string | $moduleId |
|
private |
OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator::getModuleVariablesLocator | ( | ) |
Getter for ModuleVariablesLocator.
|
private |
|
protected |
Special case is when oxconfig class is extended: we cant call "_disableModule" as it requires valid config object but we can't create it as module class extending it does not exist. So we will use original oxConfig object instead.
string | $requestedClass | Class, for which extension chain was generated. |
|
protected |
Conveniance method for tests
|
protected |
Writes/logs an error on module extension creation problem
string | $moduleClass |
|
private |