%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/bitrix/www/bitrix/modules/sale/lib/discount/gift/
Upload File :
Create Path :
Current File : //home/bitrix/www/bitrix/modules/sale/lib/discount/gift/collection.php

<?php

namespace Bitrix\Sale\Discount\Gift;


use Bitrix\Main\Type\Dictionary;

class Collection extends Dictionary
{
	const TYPE_GRANT_ALL = 'all';
	const TYPE_GRANT_ONE = 'one';

	protected $type = self::TYPE_GRANT_ONE;

	/**
	 * GiftCollection constructor.
	 * @param array  $gifts
	 * @param string $type
	 */
	public function __construct(array $gifts, $type)
	{
		$this->type = $type;

		parent::__construct($gifts);
	}

	protected function setGift(Gift $gift, $offset = null)
	{
		parent::offsetSet($offset, $gift);
	}

	public function offsetSet($offset, $value)
	{
		$this->setGift($value, $offset);
	}
}

Zerion Mini Shell 1.0