• Модуль: imconnector
  • Путь к файлу: ~/bitrix/modules/imconnector/lib/emoji/client.php
  • Класс: BitrixImConnectorEmojiClient
  • Вызов: Client::asciiToImageCallback
public function asciiToImageCallback($m)
{
	if ((!is_array($m)) || (!isset($m[3])) || (empty($m[3])))
	{
		return $m[0];
	}
	else
	{
		$ruleset = $this->getRuleset();
		$asciiReplace = $ruleset->getAsciiReplace();

		$shortname = html_entity_decode($m[3]);
		$unicode = $asciiReplace[$shortname];

		// unicode char or shortname for the alt tag? (unicode is better for copying and pasting the resulting text)
		if ($this->unicodeAlt)
		{
			$alt = $this->convert($unicode);
		}
		else
		{
			$alt = htmlspecialcharsbx($shortname);
		}

		return $m[2] . '[ICON=' . $this->imagePathSVG . $unicode . '.svg'.$this->cacheBustParam . ' title=' . $alt . ']';
	}
}