• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/analyticboard.php
  • Класс: BitrixReportVisualConstructorAnalyticBoard
  • Вызов: AnalyticBoard::toggleOption
public function toggleOption(string $optionName)
{
	$found = false;
	foreach ($this->options as $optionFields)
	{
		if ($optionFields['NAME'] === $optionName)
		{
			$found = true;
			break;
		}
	}

	if (!$found)
	{
		throw new SystemException("Unknown option {$optionName} for the board {$this->boardKey}");
	}

	if (!is_callable($this->setOptionsCallback))
	{
		throw new SystemException("setOptionsCallback is not callable for the board {$this->boardKey}");
	}

	call_user_func($this->setOptionsCallback, $optionName, !$optionFields['VALUE']);
}