@param $tradeName

@return string The id of the tradename
358960
public static function addTradeName($tradeName)
    {
        $api = new Api\AddTrademark();
        $api->setTrademark($tradeName);
        $result = $api->doRequest();
        if (!isset($result['result'])) {
            throw new Error('Unexpected response');
        }
        return $result['result'];
    }
728580
public function getUserIdFromLogin(string $username): int
    {
        return (int) $this->getDriver()->user->get($username, ['by' => 'login'])->ID;
    }
1249928
public function getId($suffix = null)
    {
        $id = 'column';

        $id .= '-'.$this->columnName;

        if ($suffix) {
            $id .= '-'.$suffix;
        }

        return HtmlHelper::nameToId($id);
    }
922427
public function getIdPrivilegeByName(string $name): string
    {
        if (isset($this->privilege[$name])) {
            return (string) $this->privilege[$name]['id'];
        }
        return '';
    }
340504
public function getIdFromUsername($username)
    {
        $id = $this->load('uname2uid', $username);

        return ($id === 0) ? null : (int) $id;
    }
1036388
private function getStockId($websiteId)
    {
        if (!isset($this->stockIdByWebsite[$websiteId])) {
            $stockId = $this->stockRegistry->getStock($websiteId)->getStockId();
            $this->stockIdByWebsite[$websiteId] = $stockId;
        }

        return $this->stockIdByWebsite[$websiteId];
    }
1177389
protected function _getCacheId($name)
    {
        $oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        return $name . '_' . $oConfig->getShopId() . '_' . Registry::getLang()->getBaseLanguage() . '_' . (int) $oConfig->getShopCurrency();
    }
1202681
public function getLanguageIdByName($sName)
    {
        return array_search($sName, \OxidEsales\Eshop\Core\Registry::getLang()->getLanguageNames());
    }
741189
public function get_id_by_bit(string $id): ?string
  {
    if ( \bbn\str::is_uid($id) && ($p = $this->get_by_bit($id)) ){
      return $p[$this->fields['id']];
    }
    return null;
  }
1057867
public function close(string $tradeNo)
    {
        $params = [
            'appid' => $this->app['config']->app_id,
            'out_trade_no' => $tradeNo,
        ];

        return $this->request($this->wrap('pay/closeorder'), $params);
    }
1044633
protected function _getEmosPageId($sTplName)
    {
        $sPageId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId() .
                   $this->_getEmosCl() .
            $sTplName .
            \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('cnid') .
            \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('anid') .
            \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('option');

        return md5($sPageId);
    }
429447
public static function getNameForValue($value)
    {
        foreach (self::getConstants() as $constant) {
            if ($constant['value'] === $value) {
                return $constant['name'];
            }
        }
        return false;
    }
42116
public function getIdByUserName($userName)
    {
        $shopId = Registry::getConfig()->getShopId();
        $userId = DatabaseProvider::getDb()
            ->getOne(
                'SELECT `OXID` FROM `oxuser` WHERE `OXUSERNAME` = ? AND `OXSHOPID` = ?',
                [
                    $userName,
                    $shopId
                ]
            );

        return $userId;
    }
571619
public function getTrackingId()
    {
        $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        $charactersLength = strlen($characters);
        $trackingId = '';
        for ($i = 0; $i < 10; $i++) {
            $trackingId .= $characters[rand(0, $charactersLength - 1)];
        }
        return $trackingId;
    }
168393
public static function getIdentifier(string $name) : string
    {
        static $salt;

        $salt   = $salt ?? $salt = self::loadBaseHashSalt();
        $suffix = substr(sha1($name . $salt), 0, 5);

        if (! preg_match(self::VALID_IDENTIFIER_FORMAT, $name)) {
            return self::DEFAULT_IDENTIFIER . $suffix;
        }

        return $name . $suffix;
    }
1072198
public function getID()
    {
        if ($this->datos===null) {
            $this->datos = $this->toArray();
        }
        return !empty($this->datos['LibroCompraVenta']['EnvioLibro']['@attributes']['ID']) ? $this->datos['LibroCompraVenta']['EnvioLibro']['@attributes']['ID'] : false;
    }
1313858
public function getIdByClassName($className)
    {
        $classId = $this->getClassIdFromShopMap($className);

        if (empty($classId)) {
            $classId = $this->getClassIdFromModuleMap($className);
        }
        return $classId;
    }