• Модуль: salescenter
  • Путь к файлу: ~/bitrix/modules/salescenter/lib/controller/page.php
  • Класс: BitrixSalesCenterControllerPage
  • Вызов: Page::processPageParams
protected function processPageParams(BitrixSalesCenterModelPage $page, array $params)
{
	$currentParams = $page->getParams();
	$skipParams = [];
	foreach($currentParams as $currentParam)
	{
		if(in_array($currentParam['FIELD'], $params))
		{
			$skipParams[] = $currentParam['FIELD'];
			continue;
		}
		else
		{
			PageParamTable::delete($currentParam['ID']);
		}
	}
	foreach($params as $param)
	{
		if(!in_array($param, $skipParams))
		{
			PageParamTable::add([
				'PAGE_ID' => $page->getId(),
				'FIELD' => $param,
			]);
		}
	}
}