OXID eShop CE
6.1.5
|
Public Member Functions | |
__construct ($systemRequirementsInfo=[]) | |
getModuleStateMap () | |
setModuleStateHtmlClassConvertFunction ($function) | |
setModuleNameTranslateFunction ($function) | |
setModuleGroupNameTranslateFunction ($function) | |
Public Attributes | |
const | MODULE_ID_KEY = 'module' |
const | MODULE_STATE_KEY = 'state' |
const | MODULE_NAME_KEY = 'modulename' |
const | MODULE_STATE_HTML_CLASS_KEY = 'class' |
Private Member Functions | |
convertFromSystemRequirementsInfo () | |
applyModuleStateHtmlClassConvertFunction ($moduleStateMap) | |
applyModuleNameTranslateFunction ($moduleStateMap) | |
applyModuleGroupNameTranslateFunction ($moduleStateMap) | |
iterateThroughModuleStateMapByGroup ($moduleStateMap) | |
iterateThroughModuleStateMap ($moduleStateMap) | |
applyModuleStateMapFilterFunction ($moduleStateMap, $helpFunction, $moduleStateMapUpdateFunction) | |
validateClosure ($object) | |
Private Attributes | |
$systemRequirementsInfo = [] | |
$moduleStateHtmlClassConvertFunction = null | |
$moduleNameTranslateFunction = null | |
$moduleGroupNameTranslateFunction = null | |
Class ModuleStateMapGenerator.
Accepts SystemRequirementsInfo as primary source of data and converts it to be compatible with setup's view component which displays the system requirements (Used in Controller).
It also accepts the following custom functions to help and deal with:
OxidEsales\EshopCommunity\Setup\Controller\ModuleStateMapGenerator::__construct | ( | $systemRequirementsInfo = [] | ) |
ModuleStateMapGenerator constructor.
array | $systemRequirementsInfo |
|
private |
Apply function which translates module group id into module group name.
array | $moduleStateMap | An array of format described in getModuleStateMap . |
getModuleStateMap
.
|
private |
Apply function which translates module id into module name.
array | $moduleStateMap | An array of format described in getModuleStateMap . |
getModuleStateMap
.
|
private |
Apply function which converts module state into HTML class of given state.
array | $moduleStateMap | An array of format described in getModuleStateMap . |
getModuleStateMap
.
|
private |
Apply filter function to update the contents of module state map.
array | $moduleStateMap | An array of format described in getModuleStateMap . |
\Closure | $helpFunction | Help function which will be passed to moduleStateMapUpdateFunction as 2nd argument. |
\Closure | $moduleStateMapUpdateFunction | Function which will be used to modify contents of module state map. |
getModuleStateMap
.
|
private |
Convert a raw array taken from SystemRequirements::getSystemInfo
into a format described in getModuleStateMap
.
OxidEsales\EshopCommunity\Setup\Controller\ModuleStateMapGenerator::getModuleStateMap | ( | ) |
Returns module state map with all applied external functions.
In case a function is not set it will be just skipped.
|
private |
Yield with [groupId, moduleIndex of module_info_array, module_info_array] by iterating through given module state map.
array | $moduleStateMap | An array of format described in getModuleStateMap . |
|
private |
Yield with [groupId, module_info_array] by iterating through given module state map.
array | $moduleStateMap | An array of format described in getModuleStateMap . |
OxidEsales\EshopCommunity\Setup\Controller\ModuleStateMapGenerator::setModuleGroupNameTranslateFunction | ( | $function | ) |
Sets function which defines how module group name should be translated.
Single argument is given to the provided function as the module group id.
\Closure | $function |
OxidEsales\EshopCommunity\Setup\Controller\ModuleStateMapGenerator::setModuleNameTranslateFunction | ( | $function | ) |
Sets function which defines how module name should be translated.
Single argument is given to the provided function as the module id.
\Closure | $function |
OxidEsales\EshopCommunity\Setup\Controller\ModuleStateMapGenerator::setModuleStateHtmlClassConvertFunction | ( | $function | ) |
Sets function which knows how to convert given module state to Html class.
Single argument is given to the provided function as the state of module.
\Closure | $function |
|
private |
Validate input to check if it's a Closure.
\Closure | $object | Given input argument to check. |
|
private |
|
private |
|
private |
|
private |
const OxidEsales\EshopCommunity\Setup\Controller\ModuleStateMapGenerator::MODULE_ID_KEY = 'module' |
const OxidEsales\EshopCommunity\Setup\Controller\ModuleStateMapGenerator::MODULE_NAME_KEY = 'modulename' |
const OxidEsales\EshopCommunity\Setup\Controller\ModuleStateMapGenerator::MODULE_STATE_HTML_CLASS_KEY = 'class' |
const OxidEsales\EshopCommunity\Setup\Controller\ModuleStateMapGenerator::MODULE_STATE_KEY = 'state' |