• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/controller/widget.php
  • Класс: BitrixReportVisualConstructorControllerWidget
  • Вызов: Widget::removeAction
public function removeAction($params)
{
	$boardKey = $params['boardId'];
	$widgetId = $params['widgetId'];
	$dashboardForUser = DashboardHelper::getDashboardByKeyForCurrentUser($boardKey);

	if ($dashboardForUser)
	{
		$deleteWidgetId = BitrixReportVisualConstructorEntityWidget::removeCurrentUserWidgetByGId($widgetId);
		return $deleteWidgetId;
	}
	else
	{
		$this->addError(new Error('Cant delete row because current user has not own dashboard'));
		return false;
	}

}