• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/posting/segmentdatabuilder.php
  • Класс: BitrixSenderPostingSegmentDataBuilder
  • Вызов: SegmentDataBuilder::setDataFilter
public function setDataFilter(array $filter = []): SegmentDataBuilder
{
	$this->dataFilter = [];

	$whiteList = [
		'EMAIL' => '=EMAIL',
		'PHONE' => '=PHONE',
		'IM' => '=IM',
		'NAME' => 'NAME',
		'SENDER_RECIPIENT_TYPE_ID' => "",
	];

	foreach ($filter as $key => $filterValue)
	{
		if (!isset($whiteList[$key]) || $filterValue == "undefined")
		{
			continue;
		}

		if ($key === 'SENDER_RECIPIENT_TYPE_ID')
		{
			$type =  $this->prepareEntityTypeFilter($filterValue);
			if ($type)
			{
				$this->dataFilter[] =  $this->prepareEntityTypeFilter($filterValue);
			}

			continue;
		}

		$this->dataFilter[$whiteList[$key]] = $filterValue;
	}

	return $this;
}