Returns help icon for the message code if defined.

@param string $msgcode
@return \help_icon|false
488589
public function message_help_icon($msgcode) {

        $stringman = get_string_manager();

        if ($stringman->string_exists('validationmsg_'.$msgcode.'_help', 'core_plugin')) {
            return new help_icon('validationmsg_'.$msgcode, 'core_plugin');
        }

        return false;
    }
634084
private function getGifDir($statusCode)
    {
        if (\array_key_exists($statusCode, $this->gifs) && \count($this->gifs[$statusCode]) > 0) {
            return $statusCode;
        }

        return 'other';
    }
53499
public function confirm($code = '')
    {
        if (!$this->confirmationAttribute || !$this->validateConfirmationCode($code)) {
            return false;
        }
        $this->confirmation = static::$confirmTrue;
        return $this->save();
    }
540989
public function getHelp()
    {
        $msg = $this->opts->getUsageMessage();
        // Amend the auto-generated help message:
        $options = "[ options ] [ target ]\n"
            . "Where [ target ] is the name of a section of the configuration\n"
            . "specified by the ini option, or a directory to harvest into if\n"
            . "no .ini file is used. If [ target ] is omitted, all .ini sections\n"
            . "will be processed. [ options ] may be selected from those below,\n"
            . "and will override .ini settings where applicable.";
        $this->write(str_replace('[ options ]', $options, $msg));
    }
122655
public function getGitHooksDir(): string
    {
        $gitPath = $this->getGitDir();
        $absoluteGitPath = $this->getAbsolutePath($gitPath);
        $gitRepoPath = $absoluteGitPath.'/.git';

        if (is_file($gitRepoPath)) {
            $fileContent = $this->fileSystem->readFromFileInfo(new SplFileInfo($gitRepoPath));
            if (preg_match('/gitdir:\s+(\S+)/', $fileContent, $matches)) {
                $relativePath = $this->getRelativePath($matches[1]);
                return $this->getRelativePath($gitPath.$relativePath.'/hooks/');
            }
        }

        return $gitPath.'.git/hooks/';
    }
742593
public static function info($msg)
    {
        $msg = 'Info: ' . $msg;
        $space = strlen($msg) + 4;
        $out  = static::colorize(str_pad(' ', $space), Color::FG_WHITE, Color::AT_BOLD, Color::BG_BLUE) . PHP_EOL;
        $out .= static::colorize('  ' . $msg . '  ', Color::FG_WHITE, Color::AT_BOLD, Color::BG_BLUE) . PHP_EOL;
        $out .= static::colorize(str_pad(' ', $space), Color::FG_WHITE, Color::AT_BOLD, Color::BG_BLUE) . PHP_EOL;

        return $out;
    }
452849
public function icon() {
		$url = $this->_stub['website'];
		if (!$url) {
			return null;
		}

		$pieces = parse_url($url);
		$url = $pieces['host'];

		$icon = 'http://www.google.com/s2/favicons?domain=';
		$icon .= $url;

		$context = stream_context_create(
			['http' => ['header' => 'Connection: close']]);
		// E.g. http://www.google.com/s2/favicons?domain=xyz.com
		$file = file_get_contents($icon, false, $context);
		if ($file === false) {
			return null;
		}
		// TODO: transform into 16x16 png
		return $file;
	}
298416
function (msgid) {
  var message = this.$i18n.getLocaleMessage(this.$i18n.activeLocale)['$$NOCONTEXT'][msgid];

  if (!message) {
    return msgid
  } else {
    return message.msgstr[0] || message.msgid
  }
}
431722
public function getGroup($code) {
        $groupId = is_numeric($code) ? $code : \CGroup::GetIDByCode($code);

        if (empty($groupId)) {
            return false;
        }

        /* extract SECURITY_POLICY */
        $item = \CGroup::GetByID($groupId)->Fetch();
        if (empty($item)) {
            return false;
        }

        if (!empty($item['SECURITY_POLICY'])) {
            $item['SECURITY_POLICY'] = unserialize($item['SECURITY_POLICY']);
        }

        if ($item['ID'] == 1) {
            $item['STRING_ID'] = 'administrators';
        } elseif ($item['ID'] == 2) {
            $item['STRING_ID'] = 'everyone';
        }

        return $item;

    }
961610
public function getByIsoCode($sCode)
    {
        if (array_key_exists($sCode, $this->aSupportedCurrencies)) {
            return $this->aSupportedCurrencies[$sCode];
        } else {
            throw new CurrencyException('"' . $sCode . '" is not a valid currency code.');
        }
    }
63902
protected function getStatusMessage($code)
    {
        return (
            isset($this->statusMessages[$code])
                ? $this->statusMessages[$code] : $this->statusMessages[500]
        );
    }
1218293
private static function getAnsiCon()
    {
        if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
            // extract [w, H] from "wxh (WxH)"
            // or [w, h] from "wxh"
            return [
                (int) $matches[1],
                isset($matches[4]) ? (int) $matches[4] : (int) $matches[2],
            ];
        }

        return [];
    }
1147015
private String getMessageFromCode(final int messageCode) {
        String res = "";
        switch (messageCode) {
            case 100:
                res = "Initializing";
                break;
            case 200:
                res = "";// Provisioned for custom pre-init task
                break;
            case 300:
                res = "";// Provisioned for custom pre-init task
                break;
            case 400:
                res = "Loading Messages Properties";
                break;
            case 500:
                res = "Loading Parameters Properties";
                break;
            case 600:
                res = "Preparing Core Engine";
                break;
            case 700:
                res = "Preloading Resources";
                break;
            case 800:
                res = "Preloading Modules";
                break;
            case 900:
                res = "";// Provisioned for custom post-init task
                break;
            case 1000:
                res = "Starting";
                break;
            default:
        }
        return res;
    }
58341
protected function getPasswordHelper()
	{
		if( $this->helper ) {
			return $this->helper;
		}

		$classname = \Aimeos\MShop\Common\Helper\Password\Typo3::class;

		if( class_exists( $classname ) === false ) {
			throw new \Aimeos\MShop\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
		}

		$context = $this->getContext();
		$object = ( method_exists( $context, 'getHasherTypo3' ) ? $context->getHasherTypo3() : null );

		$helper = new $classname( array( 'object' => $object ) );

		return $this->helper = self::checkClass( \Aimeos\MShop\Common\Helper\Password\Iface::class, $helper );
	}
1316611
public function get_code_image($code=''){
		if ($code=='') $code = $this->_logincode;
		if (!$code) return false;
		return 'http://login.weixin.qq.com/qrcode/'.$this->_logincode.'?t=webwx';
	}
1166759
private function codeMessage($code)
    {
        // 在控制器中定义code属性后，会优先使用业务定义的代码，否则使用系统定义码
        $codes = $this->code;
        if (isset($codes::$msg[$code])) {
            return $codes::$msg[$code];
        }

        if (isset(Code::$msg[$code])) {
            return Code::$msg[$code];
        }

        return $this->codeMessage(Code::UNDEFINED_ERROR);
    }
1015595
protected function simpleCommand($type, $msgid = 0)
    {
        $msgobj = $this->getMessageObject($type);

        if ($msgid) {
            $msgobj->setMsgID($msgid);
        }

        return $this->message_write($msgobj);
    }