• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/entity/segment.php
  • Класс: BitrixSenderEntitySegment
  • Вызов: Segment::appendContactSetConnector
public function appendContactSetConnector($contactSetId = null)
{
	if ($this->getFirstContactSetId())
	{
		return $this;
	}

	if (!$contactSetId)
	{
		$contactSetId = ListTable::add(['SORT' => 100])->getId();
	}
	elseif (!ListTable::getRowById($contactSetId))
	{
		$this->errors->setError(new Error('Wrong contact set ID.'));
		return $this;
	}

	$this->data['ENDPOINTS'][] = [
		'MODULE_ID' => 'sender',
		'CODE' => 'contact_list',
		'FIELDS' => [
			'LIST_ID' => $contactSetId,
			'SENDER_SELECT_ALL' => null,
		],
	];
	return $this;
}