3namespace Bitrix\UI\EntitySelector;
5use Bitrix\Main\Type\Dictionary;
7class Item implements \JsonSerializable
63 if ((is_string(
$id) &&
$id !==
'') || is_int(
$id))
80 $this->
addTab($options[
'tabs'] ??
null);
82 $this->
setTitle($options[
'title'] ??
null);
85 $this->
setCaption($options[
'caption'] ??
null);
87 if (isset(
$options[
'captionOptions']) && is_array(
$options[
'captionOptions']))
109 $this->
setLink($options[
'link']);
119 if (isset(
$options[
'badgesOptions']) && is_array(
$options[
'badgesOptions']))
151 $this->
setSort($options[
'sort']);
154 if (isset(
$options[
'availableInRecentTab']) && is_bool(
$options[
'availableInRecentTab']))
199 $this->entityType =
$type;
297 if ($this->captionOptions ===
null)
332 if ($this->avatarOptions ===
null)
399 if (is_array($badge) && !empty($badge))
401 $this->badges[] = $badge;
428 if ($this->badgesOptions ===
null)
443 if (is_string($tabId) && !empty($tabId))
445 $this->tabs[] = $tabId;
447 else if (is_array($tabId))
449 $this->tabs = array_merge($this->tabs, $tabId);
457 if ($this->children ===
null)
469 unset($childOptions[
'tabs']);
471 $child =
new Item($childOptions);
483 $this->
getDialog()->handleItemAdd($item);
498 if ($this->nodeOptions ===
null)
515 if ($this->tagOptions ===
null)
542 $this->searchable = $flag;
554 $this->saveable = $flag;
566 $this->deselectable = $flag;
578 $this->hidden = $flag;
590 $this->availableInRecentTab = $flag;
607 if ($this->customData ===
null)
629 $this->contextSort =
$sort;
641 $this->globalSort =
$sort;
665 return $this->serializeRecursive($this);
668 private function serializeRecursive(
$data)
670 if (
$data instanceof \JsonSerializable)
675 if (is_array(
$data) ||
$data instanceof \Traversable)
679 $data[
$key] = $this->serializeRecursive($item);
689 'id' => $this->
getId(),
716 $json[
'selected'] =
true;
721 $json[
'searchable'] =
false;
726 $json[
'saveable'] =
false;
731 $json[
'deselectable'] =
false;
736 $json[
'hidden'] =
true;
776 $json[
'tabs'] = $this->
getTabs();
794 if ($this->{
'get'.$field}() !==
null)
796 $json[$field] = $this->{
'get'.$field}();
setSaveable(bool $flag=true)
__construct(array $options)
setNodeOptions(array $nodeOptions)
setDeselectable(bool $flag=true)
setEntityType(string $type)
setDialog(Dialog $dialog)
setTextColor(?string $textColor)
setBadgesOptions(array $badgesOptions)
setHidden(bool $flag=true)
setAvatarOptions(array $avatarOptions)
setSupertitle($supertitle)
setCaptionOptions(array $captionOptions)
setSearchable(bool $flag=true)
addChildren(array $children)
setSelected(bool $flag=true)
setContextSort(?int $sort)
setGlobalSort(?int $sort)
setAvailableInRecentTab(bool $flag=true)
setAvatar(?string $avatar)
setCustomData(array $customData)
setTagOptions(array $nodeOptions)
static isValidText($text)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
<? endif;?> window document title
if(empty($signedUserToken)) $key
</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."%"