Get translated string bt the translation code.

@param string  $sCode
@param boolean $blUseModulePrefix User module translations prefix or not.

@return string
500153
public function translate( $sCode, $blUseModulePrefix = true )
    {
        if ( $blUseModulePrefix ) {
            $sCode = 'PAYMORROW_' . $sCode;
        }

        return oxRegistry::getLang()->translateString( $sCode, oxRegistry::getLang()->getBaseLanguage(), false );
    }
1068992
public static function encodeUtf8($strValue = '', $strEncoding = 'iso-8859-1', $booSafemode = false)
    {
        return encode_utf8($strValue = '', $strEncoding = 'iso-8859-1', $booSafemode = false);
    }
1266844
public function getNodeFor(HasNodeInterface $hasNode)
    {
        /* @var NodeVersion $nodeVersion */
        $nodeVersion = $this->getEntityManager()->getRepository(
            'KunstmaanNodeBundle:NodeVersion'
        )->getNodeVersionFor(
            $hasNode
        );
        if (!is_null($nodeVersion)) {
            /* @var NodeTranslation $nodeTranslation */
            $nodeTranslation = $nodeVersion->getNodeTranslation();
            if (!is_null($nodeTranslation)) {
                return $nodeTranslation->getNode();
            }
        }

        return null;
    }
8471
protected String getExpressionTextForLanguage(DmnExpressionImpl expression, String expressionLanguage) {
    String expressionText = expression.getExpression();
    if (expressionText != null) {
      if (isJuelExpression(expressionLanguage) && !StringUtil.isExpression(expressionText)) {
        return "${" + expressionText + "}";
      } else {
        return expressionText;
      }
    } else {
      return null;
    }
  }
450158
public static function getExtConf()
    {
        $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('ke_search');

        // Set the "tagChar"
        // sphinx has problems with # in query string.
        // so you we need to change the default char # against something else.
        // MySQL has problems also with #
        // but we wrap # with " and it works.
        $keSearchPremiumIsLoaded = ExtensionManagementUtility::isLoaded('ke_search_premium');
        if ($keSearchPremiumIsLoaded) {
            $extConfPremium = SearchHelper::getExtConfPremium();
            $extConf['prePostTagChar'] = $extConfPremium['prePostTagChar'];
        } else {
            $extConf['prePostTagChar'] = '#';
        }
        $extConf['multiplyValueToTitle'] = ($extConf['multiplyValueToTitle']) ? $extConf['multiplyValueToTitle'] : 1;
        $extConf['searchWordLength'] = ($extConf['searchWordLength']) ? $extConf['searchWordLength'] : 4;

        // override extConf with TS Setup
        if (is_array($GLOBALS['TSFE']->tmpl->setup['ke_search.']['extconf.']['override.'])
            && count($GLOBALS['TSFE']->tmpl->setup['ke_search.']['extconf.']['override.'])) {
            foreach ($GLOBALS['TSFE']->tmpl->setup['ke_search.']['extconf.']['override.'] as $key => $value) {
                $extConf[$key] = $value;
            }
        }

        return $extConf;
    }
739204
public function getByCode($sCode)
    {
        $aCountries = $this->getAll();

        return ! empty($aCountries[$sCode]) ? $aCountries[$sCode] : false;
    }
403314
protected function _getModuleDir($sVendor, $sModuleName)
    {
        $sModuleDir = $this->_sModuleDir;
        if ($sVendor) {
            $sModuleDir .= strtolower($sVendor) . DIRECTORY_SEPARATOR;
        }

        return $sModuleDir . strtolower($sModuleName) . DIRECTORY_SEPARATOR;
    }
844593
public function decode(string $toDecode): string
    {
        return (string) base64_decode(
            $this->addPadding($this->toBase64($toDecode)),
            true
        );
    }
786237
public function getCountryCode()
    {
        return (string) \OxidEsales\Eshop\Core\Str::getStr()->strtoupper(\OxidEsales\Eshop\Core\Str::getStr()->substr($this->_cleanUp($this->_sCompanyVatNumber), 0, 2));
    }
967632
public function getSetting( $sModuleSettingName, $blUseModulePrefix = true )
    {
        if ( $blUseModulePrefix ) {
            $sModuleSettingName = 'paymorrow' . (string) $sModuleSettingName;
        }

        return oxRegistry::getConfig()->getConfigParam( (string) $sModuleSettingName );
    }
357904
public function getNodeTranslationFor(HasNodeInterface $hasNode)
    {
        /* @var NodeVersion $nodeVersion */
        $nodeVersion = $this->getEntityManager()
            ->getRepository('KunstmaanNodeBundle:NodeVersion')
            ->getNodeVersionFor($hasNode);

        if (!is_null($nodeVersion)) {
            return $nodeVersion->getNodeTranslation();
        }

        return null;
    }
250049
private function createLocale($localeCode)
    {
        /** @var LocaleInterface $locale */
        $locale = $this->localeFactory->createNew();
        $locale->setCode($localeCode);

        return $locale;
    }
1354563
public static function getValue($sCode, $sDefaultValue = null)
    {
        if (empty($sCode)) {
            return $sDefaultValue;
        }

        //Get settings object
        $obSettings = static::where('item', static::SETTINGS_CODE)->first();
        if (empty($obSettings)) {
            return static::get($sCode, $sDefaultValue);
        }

        $sValue = $obSettings->$sCode;
        if (empty($sValue)) {
            return $sDefaultValue;
        }

        return $sValue;
    }
988154
public function get_bbcodes()
	{
		$bbcode_end_length = utf8_strlen(':' . $this->bbcode_uid . ']');
		$quote_end_length = utf8_strlen('&quot;:' . $this->bbcode_uid . ']');

		$this->replace_square_brackets_in_smilies();

		$possible_bbcodes = explode('[', $this->message);
		$content_length = $this->get_content_length($possible_bbcodes[0]);
		if ($content_length >= $this->max_content_length)
		{
			$allowed_content_position = $this->get_content_position($possible_bbcodes[0], $this->max_content_length);
			$this->trim_position = $this->cur_position + $allowed_content_position;
			// As we did not touch any bbcodes yet, we can just skip all that.
			if (!$this->max_content_length || ($content_length > $this->max_content_length))
			{
				$this->is_trimmed = true;
			}
			return;
		}
		$this->cur_position += utf8_strlen($possible_bbcodes[0]) + 1;
		$this->cur_content_length += $content_length;

		// Skip the first one.
		array_shift($possible_bbcodes);
		$num_tested_bbcodes		= 0;

		$allow_close_quote = false;

		foreach ($possible_bbcodes as $part)
		{
			$num_tested_bbcodes++;
			$exploded_parts = explode(':' . $this->bbcode_uid . ']', $part);
			$num_parts = sizeof($exploded_parts);

			/**
			* One element means we do not match an end before the next opening:
			* String: [quote="[bbcode:uid]foobar[/bbcode:uid]":uid]
			* Keys:    ^^^^^^^ = 0
			*/
			if ($num_parts == 1)
			{
				// 1 means, we are in [quote="":uid] and found another bbcode here.
				if (utf8_strpos($exploded_parts[0], 'quote=&quot;') === 0)
				{
					$open_end_quote = utf8_strpos($this->message, '&quot;:' . $this->bbcode_uid . ']', $this->cur_position);
					if ($open_end_quote !== false)
					{
						$close_quote = utf8_strpos($this->message, '[/quote:' . $this->bbcode_uid . ']', $open_end_quote);
						if ($close_quote !== false)
						{
							$open_end_quote += $quote_end_length;
							$this->open_bbcode('quote', $this->cur_position);
							$this->bbcode_action('quote', 'open_end', $open_end_quote);
							$this->cur_position += utf8_strlen($exploded_parts[0]);

							// We allow the 3-keys special-case, when we have found a beginning before...
							$allow_close_quote = true;
						}
					}
				}
				// Or the user just used a normal [ in his post.
				else
				{
					$this->cur_content_length++;
					$content_length = $this->get_content_length($exploded_parts[0]);
					$max_content_allowed = ($this->max_content_length - $this->cur_content_length);
					if (($content_length >= $max_content_allowed) && !$this->trim_position)
					{
						$allowed_content_position = $this->get_content_position($exploded_parts[0], $max_content_allowed);
						$this->trim_position = $this->cur_position + $allowed_content_position;
					}
					$this->cur_content_length += $content_length;
					$this->cur_position += utf8_strlen($exploded_parts[0]);
				}
			}
			/**
			* Two element is the normal case:
			* String: [bbcode:uid]foobar
			* Keys:    ^^^^^^ = 0 ^^^^^^ = 1
			* String: [/bbcode:uid]foobar
			* Keys:    ^^^^^^^ = 0 ^^^^^^ = 1
			*/
			elseif ($num_parts == 2)
			{
				/**
				* We found an opening bracket in the quoted username which is not a bbcode
				* String: [quote="odd[name":uid]quote-text
				* Keys:               ^^^^^ = 0 ^^^^^^^^^^ = 1
				*/
				if ($allow_close_quote && (utf8_substr($exploded_parts[0], -6) == '&quot;'))
				{
					$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;

					$content_length = $this->get_content_length($exploded_parts[1]);
					$max_content_allowed = ($this->max_content_length - $this->cur_content_length);
					if (($content_length >= $max_content_allowed) && !$this->trim_position)
					{
						$allowed_content_position = $this->get_content_position($exploded_parts[1], $max_content_allowed);
						$this->trim_position = $this->cur_position + $allowed_content_position;
					}
					$this->cur_content_length += $content_length;
					$this->cur_position += utf8_strlen($exploded_parts[1]);
					$allow_close_quote = false;
				}
				// We matched something ;)
				else if ($exploded_parts[0][0] != '/')
				{
					// Open BBCode-tag
					$bbcode_tag = $this->filter_bbcode_tag($exploded_parts[0]);
					$bbcode_tag_extended = $this->filter_bbcode_tag($exploded_parts[0], false, false);
					if (in_array($bbcode_tag_extended, $this->sensitive_bbcodes))
					{
						$this->is_sensitive = true;
					}


					$this->open_bbcode($bbcode_tag, $this->cur_position);
					$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;
					$this->bbcode_action($bbcode_tag, 'open_end', $this->cur_position);

					if (!$allow_close_quote && !$this->is_sensitive)
					{
						// If we allow a closing quote, we are in the username.
						// We do not count that as content-length.
						$content_length = $this->get_content_length($exploded_parts[1]);
						$max_content_allowed = ($this->max_content_length - $this->cur_content_length);
						if (($content_length >= $max_content_allowed) && !$this->trim_position)
						{
							$allowed_content_position = $this->get_content_position($exploded_parts[1], $max_content_allowed);
							$this->trim_position = $this->cur_position + $allowed_content_position;
						}
						$this->cur_content_length += $content_length;
					}
					$this->cur_position += utf8_strlen($exploded_parts[1]);
				}
				else
				{
					// Close BBCode-tag
					$bbcode_tag = $this->filter_bbcode_tag($exploded_parts[0]);
					$bbcode_tag_extended = $this->filter_bbcode_tag($exploded_parts[0], false);
					if ($bbcode_tag_extended == $bbcode_tag)
					{
						$bbcode_tag_extended = '';
					}
					$this->is_sensitive = false;

					$this->bbcode_action($bbcode_tag, 'close_start', $this->cur_position);
					$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;
					$this->bbcode_action($bbcode_tag, 'close_end', $this->cur_position, $bbcode_tag_extended);

					if (!$allow_close_quote)
					{
						// If we allow a closing quote, we are in the username.
						// We do not count that as content-length.
						$content_length = $this->get_content_length($exploded_parts[1]);
						$max_content_allowed = ($this->max_content_length - $this->cur_content_length);
						if (($content_length >= $max_content_allowed) && !$this->trim_position)
						{
							$allowed_content_position = $this->get_content_position($exploded_parts[1], $max_content_allowed);
							$this->trim_position = $this->cur_position + $allowed_content_position;
						}
						$this->cur_content_length += $content_length;
					}
					$this->cur_position += utf8_strlen($exploded_parts[1]);
				}
			}
			/**
			* Three elements means we are closing the opening-quote and the BBCode from inside:
			* String: [quote="[bbcode:uid]foo[/bbcode:uid]bar":uid]quotehere
			* Keys:                           ^^^^^^^ = 0 ^^^^ = 1 ^^^^^^^^^ = 2
			*/
			elseif ($num_parts == 3)
			{
				if (($exploded_parts[0][0] == '/') && (utf8_substr($exploded_parts[1], -6) == '&quot;') && $allow_close_quote)
				{
					$bbcode_tag = $this->filter_bbcode_tag($exploded_parts[0]);

					$this->bbcode_action($bbcode_tag, 'close_start', $this->cur_position);
					$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;
					$this->bbcode_action($bbcode_tag, 'close_end', $this->cur_position);
					$this->cur_position += utf8_strlen($exploded_parts[1]) + $bbcode_end_length;

					$content_length = $this->get_content_length($exploded_parts[2]);
					$max_content_allowed = ($this->max_content_length - $this->cur_content_length);
					if (($content_length >= $max_content_allowed) && !$this->trim_position)
					{
						$allowed_content_position = $this->get_content_position($exploded_parts[2], $max_content_allowed);
						$this->trim_position = $this->cur_position + $allowed_content_position;
					}
					$this->cur_position += utf8_strlen($exploded_parts[2]);
					$this->cur_content_length += $content_length;

					$allow_close_quote = false;
				}
			}

			// Increase by one for the [ we explode on.
			$this->cur_position++;
		}

		if ($this->cur_content_length > $this->max_content_length)
		{
			$this->is_trimmed = true;
		}
	}
304395
protected function getModuleTranslationPathFinder()
    {
        if (is_null($this->moduleTranslationPathFinder)) {
            $this->moduleTranslationPathFinder = oxNew(\OxidEsales\Eshop\Core\Module\ModuleTranslationPathFinder::class);
        }

        return $this->moduleTranslationPathFinder;
    }
487074
protected static ModuleIdentifier getModuleIdentifier(final Element root) {
        return new ModuleIdentifier(root.getAttribute("name"), root.getAttribute("slot"), 
            Boolean.parseBoolean(root.getAttribute("optional")), Boolean.parseBoolean(root.getAttribute("export")));
    }
669639
public function getIdByCode($sCode)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        return $oDb->getOne("select oxid from oxcountry where oxisoalpha2 = " . $oDb->quote($sCode));
    }