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

	$paySystemServiceClone = clone $this;
	$paySystemServiceClone->isClone = true;

	if (!$cloneEntity->contains($this))
	{
		$cloneEntity[$this] = $paySystemServiceClone;
	}

	if ($handler = $this->handler)
	{
		if (!$cloneEntity->contains($handler))
		{
			$cloneEntity[$handler] = $handler->createClone($cloneEntity);
		}

		if ($cloneEntity->contains($handler))
		{
			$paySystemServiceClone->handler = $cloneEntity[$handler];
		}
	}

	return $paySystemServiceClone;
}