/** * translates an Id to an Alias * * @param array $cfg * @param int $value * @return string alias */ protected function id2alias($cfg, $value) { if (!$value) { return 0; } // is allready an Alias Cached then return it $lookupResult = $this->lookUp_idToUniqAlias($cfg, $value, 0); if ($lookupResult) { return $lookupResult; } // get Extension Config $conf = tx_fbmagento_tools::getExtConfig(); // do Soap Call try { $soapClient = new tx_fbmagento_soapinterface($conf['url'], $conf['username'], $conf['password']); $soapClient->enableCache(isset($cfg['cache']) ? $cfg['cache'] : null); switch ($cfg['type']) { case 'idList': $result = $soapClient->call($cfg['table']); $newValue = $result[$value]; break; default: $result = $soapClient->call($cfg['table'], array($value)); $newValue = $result[$cfg['alias_field']]; break; } } catch (Exception $e) { if ($this->getRealurlRef()->enableDevLog) { t3lib_div::devLog('Typogento Soap Error: ' . $e->getMessage(), 'realurl', -1); } return $value; } return $this->lookUp_newAlias($cfg, $newValue, $value, 0); }