• Модуль: ui
  • Путь к файлу: ~/bitrix/modules/ui/lib/buttons/buttonattributes.php
  • Класс: BitrixUIButtonsButtonAttributes
  • Вызов: ButtonAttributes::__toString
public function __toString()
{
	$string = '';
	foreach ($this as $key => $value)
	{
		if (is_int($key))
		{
			$string .= "{$value} ";
		}
		else
		{
			if ($key === 'class')
			{
				$value = self::convertClassesToString($value);
			}
			elseif ($key === 'style')
			{
				$value = self::convertStylesToString($value);
			}
			elseif ($key === self::JSON_OPTIONS_DATA_ATTR)
			{
				$value = Json::encode($this->getJsonOptions());
			}

			$value = htmlspecialcharsbx($value);
			$string .= "{$key}="{$value}" ";
		}
	}

	return $string;
}