• Модуль: ui
  • Путь к файлу: ~/bitrix/modules/ui/lib/buttons/split/button.php
  • Класс: BitrixUIButtonsSplitButton
  • Вызов: Button::appendDefaultJsonOption
protected function appendDefaultJsonOption(ButtonAttributes $attributes)
{
	$attributes = parent::appendDefaultJsonOption($attributes);

	$mainButton = $this->getMainButton();
	$menuButton = $this->getMenuButton();

	$mainButtonAttributes = clone $mainButton->getAttributeCollection();
	$mainButton->appendDefaultJsonOption($mainButtonAttributes);

	$menuButtonAttributes = clone $menuButton->getAttributeCollection();
	$menuButton->appendDefaultJsonOption($menuButtonAttributes);

	if ($mainButtonAttributes->getJsonOptions())
	{
		$attributes->addJsonOption('mainButton', $mainButtonAttributes->getJsonOptions());
	}

	if ($menuButtonAttributes->getJsonOptions())
	{
		$attributes->addJsonOption('menuButton', $menuButtonAttributes->getJsonOptions());
	}
}