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

		$shortname = $m[1];

		if (!isset($shortcodeReplace[$shortname]))
		{
			return $m[0];
		}


		$unicode = $shortcodeReplace[$shortname];
		$filename = $unicode;

		if ($this->unicodeAlt)
		{
			$alt = $this->convert($unicode);
		}
		else
		{
			$alt = $shortname;
		}

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