• Модуль: ui
  • Путь к файлу: ~/bitrix/modules/ui/lib/Integration/Rest/App.php
  • Класс: BitrixUIIntegrationRestApp
  • Вызов: App::onRestAppDelete
static function onRestAppDelete($app)
{
	if (isset($app['APP_ID'])
		&& $app['APP_ID']
		&& ($app = RestAppTable::getByClientId($app['APP_ID']))
	)
	{
		try
		{
			(new MaskOwnerRestApp($app['ID']))->delete();
			if (!MaskItemTable::getList(['filter' => ['=OWNER_TYPE' => MaskOwnerRestApp::class], 'limit' => 1])->fetch())
			{
				CAgent::RemoveAgent(__CLASS__ . '::sendRestStatistic();', 'ui');
			}
		}
		catch (Throwable $e)
		{
			// in case we do not
		}
	}
}