• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/payment.php
  • Класс: BitrixSalePayment
  • Вызов: Payment::createClone
public function createClone(SplObjectStorage $cloneEntity)
{
	if ($this->isClone() && $cloneEntity->contains($this))
	{
		return $cloneEntity[$this];
	}

	/** @var Payment $paymentClone */
	$paymentClone = parent::createClone($cloneEntity);

	/** @var SalePaySystemService $paySystem */
	if ($paySystem = $this->getPaySystem())
	{
		if (!$cloneEntity->contains($paySystem))
		{
			$cloneEntity[$paySystem] = $paySystem->createClone($cloneEntity);
		}

		if ($cloneEntity->contains($paySystem))
		{
			$paymentClone->service = $cloneEntity[$paySystem];
		}
	}

	return $paymentClone;
}