50 public function load($sModuleId)
53 $sMetadataPath = $sModulePath .
"/metadata.php";
55 if ($sModulePath && file_exists($sMetadataPath) && is_readable($sMetadataPath)) {
57 include $sMetadataPath;
59 $this->_blRegistered =
true;
60 $this->_blMetadata =
true;
61 $this->_aModule[
'active'] = $this->
isActive();
81 if (is_array($aModulePaths)) {
82 $sModuleId = array_search($sModuleDir, $aModulePaths);
87 $sModuleId = $sModuleDir;
90 return $this->
load($sModuleId);
102 return $this->
getInfo(
"description", $iLang);
114 return $this->
getInfo(
"title", $iLang);
124 return $this->_aModule[
'id'];
134 return isset($this->_aModule[
'extend']) ? $this->_aModule[
'extend'] : array();
144 return isset($this->_aModule[
'files']) ? $this->_aModule[
'files'] : array();
157 $aModulePaths =
$myConfig->getConfigParam(
'aModulePaths');
159 if (is_array($aModulePaths)) {
160 foreach ($aModulePaths as $sId => $sPath) {
161 if (strpos($sModule, $sPath .
"/") === 0) {
167 $sModuleId = substr($sModule, 0, strpos($sModule,
"/"));
170 $sModuleId = $sModule;
185 public function getInfo($sName, $iLang = null)
187 if (isset($this->_aModule[$sName])) {
189 if ($iLang !== null && is_array($this->_aModule[$sName])) {
194 if (!empty($this->_aModule[$sName])) {
195 if (!empty($this->_aModule[$sName][$sLang])) {
196 $sValue = $this->_aModule[$sName][$sLang];
197 } elseif (!empty($this->_aModule[
'lang'])) {
199 $sValue = $this->_aModule[$sName][$this->_aModule[
'lang']];
202 $sValue = reset($this->_aModule[$sName]);
208 return $this->_aModule[$sName];
221 $sId = $this->
getId();
222 if (!is_null($sId)) {
241 return isset($aExtensions)
242 && is_array($aExtensions)
243 && !empty($aExtensions);
274 if (substr($sModulePath, -1) != DIRECTORY_SEPARATOR) {
275 $sModulePath .= DIRECTORY_SEPARATOR;
278 return $sModulePath .
'metadata.php';
291 $sModuleId = $this->
getId();
295 $sModulePath = $aModulePaths[$sModuleId];
298 if (!$sModulePath && is_dir($this->
getConfig()->getModulesDir() . $sModuleId)) {
299 $sModulePath = $sModuleId;
315 $sModuleId = $this->
getId();
319 return $this->
getConfig()->getModulesDir() . $sModuleDir;
332 return $this->
getConfig()->getConfigParam(
'aModulePaths');
344 if (is_null($sModuleId)) {
345 $sModuleId = $this->
getId();
352 $sShopId = $this->
getConfig()->getShopId();
354 $aTemplates =
oxDb::getDb()->getCol(
"SELECT oxtemplate FROM oxtplblocks WHERE oxmodule = '$sModuleId' AND oxshopid = '$sShopId'");
370 foreach ($aModuleExtensions as $sClass => $mExtension) {
371 if (is_array($mExtension)) {
372 foreach ($mExtension as $sExtension) {
373 if ((isset($aInstalledExtensions[$sClass]) && in_array($sExtension, $aInstalledExtensions[$sClass]))) {
377 } elseif ((isset($aInstalledExtensions[$sClass]) && in_array($mExtension, $aInstalledExtensions[$sClass]))) {
395 foreach ($aModuleExtensions as $mExtensions) {
396 if (is_array($mExtensions)) {
397 $iCount += count($mExtensions);
415 $aInstalledExtensions = $this->
getConfig()->getModulesWithExtendedClass();
418 $blActive = $iModuleExtensionsCount > 0 && $iActivatedModuleExtensionsCount == $iModuleExtensionsCount;
432 $blInDisabledList =
false;
434 $aDisabledModules = (array) $this->
getConfig()->getConfigParam(
'aDisabledModules');
435 if (in_array($sId, $aDisabledModules)) {
436 $blInDisabledList =
true;
439 return $blInDisabledList;