• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/restservice.php
  • Класс: BitrixBizprocRestService
  • Вызов: RestService::prepareTaskParameters
static function prepareTaskParameters(array $parameters, array $task)
{
	$whiteList = [
		['CommentLabelMessage', 'CommentLabel'],
		'CommentRequired', 'ShowComment',
		['TaskButtonMessage', 'StatusOkLabel'],
		['TaskButton1Message', 'StatusYesLabel'],
		['TaskButton2Message', 'StatusNoLabel'],
		['TaskButtonCancelMessage', 'StatusCancelLabel'],
		['REQUEST', 'Fields'],
	];

	$filtered = [];

	foreach ($whiteList as $whiteKey)
	{
		$filterKey = $whiteKey;
		if (is_array($whiteKey))
		{
			$filterKey = $whiteKey[1];
			$whiteKey = $whiteKey[0];
		}
		if (isset($parameters[$whiteKey]))
		{
			$filtered[$filterKey] = $parameters[$whiteKey];
		}
	}

	if (isset($filtered['Fields']))
	{
		$filtered['Fields'] = self::externalizeRequestFields($task, $filtered['Fields']);
	}

	return $filtered;
}