Tab::jsonSerialize

  1. Bitrix24 API (v. 23.675.0)
  2. ui
  3. Tab
  4. jsonSerialize
  • Модуль: ui
  • Путь к файлу: ~/bitrix/modules/ui/lib/entityselector/tab.php
  • Класс: BitrixUIEntitySelectorTab
  • Вызов: Tab::jsonSerialize
public function jsonSerialize()
{
	$json = [
		'id' => $this->getId(),
		'title' => $this->getTitleNode() !== null ? $this->getTitleNode()->jsonSerialize() : '',
		'visible' => $this->isVisible(),
		'itemOrder' => $this->getItemOrder(),
		'itemMaxDepth' => $this->getItemMaxDepth(),
		'icon' => $this->getIcon(),
		'textColor' => $this->getTextColor(),
		'bgColor' => $this->getBgColor(),
	];

	if ($this->getStub() !== null)
	{
		$json['stub'] = $this->getStub();
	}

	if ($this->getStubOptions() !== null)
	{
		$json['stubOptions'] = $this->getStubOptions();
	}

	if ($this->getHeader())
	{
		$json['header'] = $this->getHeader();
		$json['headerOptions'] = $this->getHeaderOptions();
	}

	if (!$this->canShowDefaultHeader())
	{
		$json['showDefaultHeader'] = false;
	}

	if ($this->getFooter())
	{
		$json['footer'] = $this->getFooter();
		$json['footerOptions'] = $this->getFooterOptions();
	}

	if (!$this->canShowDefaultFooter())
	{
		$json['showDefaultFooter'] = false;
	}

	if ($this->getShowAvatars() !== null)
	{
		$json['showAvatars'] = $this->getShowAvatars();
	}

	return $json;
}

Добавить комментарий