public function SetTitle($className, $forHint = false) { if (!self::$optUse) { return false; } $arCodes = self::$codes->GetCodeByClassName($className); if (!is_array($arCodes)) { return false; } $retHtml = ""; foreach ($arCodes as $arCode) { if (!$arCode["TITLE_OBJ"]) { continue; } $arHK = $this->GetByCodeID($arCode["ID"]); $space = $forHint ? " " : " "; if (!is_array($arHK)) { continue; } $retHtml .= "<script type='text/javascript'> var d = BX('" . $arCode["TITLE_OBJ"] . "'); if (!d) d=BX.findChild(document, {attribute: {'name': '" . $arCode["TITLE_OBJ"] . "'}}, true ); if(d) d.title+=' (" . $space . Cutil::JSEscape($this->ShowHKAsChar($arHK["KEYS_STRING"])) . $space . ") ';</script>"; } return $retHtml; }