• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/userfield/htmlbuilder.php
  • Класс: BitrixMainUserFieldHtmlBuilder
  • Вызов: HtmlBuilder::buildTagAttributes
public function buildTagAttributes(?array $attributes, bool $encode = true): ?string
{
	$s = '';
	if($attributes)
	{
		foreach($attributes as $attribute => $value)
		{
			if($encode)
			{
				$s .= htmlspecialcharsbx($attribute) . '="' . htmlspecialcharsbx($value) . '" ';
			}
			else
			{
				$s .= $attribute . '="' . $value . '" ';
			}
		}
	}

	return $s;
}