3namespace Bitrix\UI\Buttons;
6use Bitrix\Main\ArgumentException;
7use Bitrix\Main\Localization\Loc;
8use Bitrix\Main\Security\Random;
9use Bitrix\Main\UI\Extension;
10use Bitrix\UI\Contract;
11use Bitrix\UI\counter\Counter;
12use Bitrix\UI\Counter\CounterColor;
13use Bitrix\UI\Counter\CounterStyle;
17Loc::loadLanguageFile(__FILE__);
46 $this->attributes->addDataAttribute(self::UNIQ_ID_DATA_ATTR, $this->
generateUniqid());
85 if (!empty(
$params[
'maxWidth']))
90 if (!empty(
$params[
'className']) && is_string(
$params[
'className']))
92 $params[
'classList'] = array_filter(explode(
' ',
$params[
'className']));
95 if (empty(
$params[
'classList']))
100 $params[
'classList'] = array_merge(
112 if (!empty(
$params[
'counter']))
137 if (!empty(
$params[
'onclick']))
163 return 'BX.UI.' . (new \ReflectionClass(get_called_class()))->getShortName();
181 $tagName = $this->
getTag();
191 $attributes[
'href'] = $this->
getLink();
195 $output =
"<{$tagName} {$attributes}>{$inner}</{$tagName}>";
208 $output =
"<{$tagName} {$attributes}/>";
217 $output .=
"<script>BX.ready(function(){ {$js} });</script>";
226 return 'uibtn-' . Random::getString(8);
236 return in_array($this->tag, [
248 $result =
'<span class="ui-btn-text">';
250 $result .=
'<span class="ui-btn-text-inner">';
263 style: CounterStyle::FILLED_ALERT,
267 $result .=
'<span class="ui-btn-right-counter">' .
$counter->render() .
'</span>';
285 return "BX.UI.ButtonManager.createFromNode(document.querySelector('{$selector}'));";
292 $uniqIdName =
"data-" . self::UNIQ_ID_DATA_ATTR;
294 return "{$tag}[{$uniqIdName}=\"{$uniqId}\"]";
365 if (in_array(
$counter, [0,
'0',
'',
null,
false],
true))
367 $this->counter =
null;
408 if (mb_strtolower(
$name) ===
'class')
410 throw new ArgumentException(
'Could not add "class" attribute. You should use ::addClass()',
'class');
474 return $this->attributes;
503 if (defined(
'AIR_SITE_TEMPLATE') ===
false)
508 $this->useAirDesign = $flag;
604 $this->events[$eventName] = $fn;
631 unset($this->events[$eventName]);
641 unset($this->events);
if($_SERVER $defaultValue['REQUEST_METHOD']==="GET" &&!empty($RestoreDefaults) && $bizprocPerms==="W" &&check_bitrix_sessid())
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']