mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00

* add download expiration date * add expiration info in mail * add calendar on order-manager validation * add a default config on patch if not exist * fix * add predifined expireon date * expiration override * fix order manager deny and sen in the same time * patch for todo column * bump version record acl admin fix pusher and date on order * some improvement * some fix
94 lines
1.7 KiB
PHP
94 lines
1.7 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Phraseanet
|
|
*
|
|
* (c) 2005-2016 Alchemy
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Alchemy\Phrasea\Order;
|
|
|
|
use Alchemy\Phrasea\Model\Entities\Order;
|
|
use Alchemy\Phrasea\Model\Entities\User;
|
|
|
|
class OrderDelivery
|
|
{
|
|
/**
|
|
* @var User
|
|
*/
|
|
private $admin;
|
|
|
|
/**
|
|
* @var Order
|
|
*/
|
|
private $order;
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
private $quantity;
|
|
|
|
/**
|
|
* @var PartialOrder
|
|
*/
|
|
private $partialOrder;
|
|
|
|
private $expireOn;
|
|
|
|
/**
|
|
* @param Order $deliveredOrder
|
|
* @param User $manager
|
|
* @param int $quantity
|
|
* @param \DateTime $expireOn
|
|
* @param PartialOrder $partialOrder
|
|
*/
|
|
public function __construct(Order $deliveredOrder, User $manager, $quantity, PartialOrder $partialOrder, \DateTime $expireOn = null)
|
|
{
|
|
$this->order = $deliveredOrder;
|
|
$this->admin = $manager;
|
|
$this->quantity = $quantity;
|
|
$this->partialOrder = $partialOrder;
|
|
$this->expireOn = $expireOn;
|
|
}
|
|
|
|
/**
|
|
* @return User
|
|
*/
|
|
public function getAdmin()
|
|
{
|
|
return $this->admin;
|
|
}
|
|
|
|
/**
|
|
* @return Order
|
|
*/
|
|
public function getOrder()
|
|
{
|
|
return $this->order;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getQuantity()
|
|
{
|
|
return $this->quantity;
|
|
}
|
|
|
|
/**
|
|
* @return PartialOrder
|
|
*/
|
|
public function getPartialOrder()
|
|
{
|
|
return $this->partialOrder;
|
|
}
|
|
|
|
public function getExpireOn()
|
|
{
|
|
return $this->expireOn;
|
|
}
|
|
}
|