Dialog::jsonSerialize

  1. Bitrix24 API (v. 23.675.0)
  2. ui
  3. Dialog
  4. jsonSerialize
  • Модуль: ui
  • Путь к файлу: ~/bitrix/modules/ui/lib/entityselector/dialog.php
  • Класс: BitrixUIEntitySelectorDialog
  • Вызов: Dialog::jsonSerialize
public function jsonSerialize()
{
	$json = [
		'id' => $this->getId(),
		'items' => $this->getItemCollection(),
		'tabs' => array_values($this->getTabs()),
		'entities' => array_values($this->getEntities()),
	];

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

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

	if ($this->getRecentItems()->count() > 0)
	{
		$json['recentItems'] = $this->getRecentItems();
	}

	if ($this->getPreselectedCollection()->count() > 0)
	{
		$json['preselectedItems'] = $this->getPreselectedCollection();
	}

	return $json;
}

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