Initial Commit
This commit is contained in:
96
local/modules/DigressivePrice/Event/DigressivePriceEvent.php
Normal file
96
local/modules/DigressivePrice/Event/DigressivePriceEvent.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
namespace DigressivePrice\Event;
|
||||
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
/**
|
||||
* Class DigressivePriceEvent
|
||||
* @package DigressivePrice\Event
|
||||
* @author Etienne PERRIERE <eperriere@openstudio.fr> - Nexxpix - OpenStudio
|
||||
*/
|
||||
class DigressivePriceEvent extends ActionEvent
|
||||
{
|
||||
protected $productId;
|
||||
protected $discount;
|
||||
protected $quantityFrom;
|
||||
protected $quantityTo;
|
||||
|
||||
public function __construct(
|
||||
$productId,
|
||||
$discount,
|
||||
$quantityFrom,
|
||||
$quantityTo
|
||||
) {
|
||||
$this->productId = $productId;
|
||||
$this->discount = $discount;
|
||||
$this->quantityFrom = $quantityFrom;
|
||||
$this->quantityTo = $quantityTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getProductId()
|
||||
{
|
||||
return $this->productId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $productId
|
||||
*/
|
||||
public function setProductId($productId)
|
||||
{
|
||||
$this->productId = $productId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDiscount()
|
||||
{
|
||||
return $this->discount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $discount
|
||||
* @return $this
|
||||
*/
|
||||
public function setDiscount($discount)
|
||||
{
|
||||
$this->discount = $discount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getQuantityFrom()
|
||||
{
|
||||
return $this->quantityFrom;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $quantityFrom
|
||||
*/
|
||||
public function setQuantityFrom($quantityFrom)
|
||||
{
|
||||
$this->quantityFrom = $quantityFrom;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getQuantityTo()
|
||||
{
|
||||
return $this->quantityTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $quantityTo
|
||||
*/
|
||||
public function setQuantityTo($quantityTo)
|
||||
{
|
||||
$this->quantityTo = $quantityTo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace DigressivePrice\Event;
|
||||
|
||||
/**
|
||||
* Class DigressivePriceFullEvent
|
||||
* @package DigressivePrice\Event
|
||||
* @author Etienne PERRIERE <eperriere@openstudio.fr> - Nexxpix - OpenStudio
|
||||
*/
|
||||
class DigressivePriceFullEvent extends DigressivePriceEvent
|
||||
{
|
||||
protected $id;
|
||||
|
||||
public function __construct(
|
||||
$id,
|
||||
$productId,
|
||||
$discount,
|
||||
$quantityFrom,
|
||||
$quantityTo
|
||||
) {
|
||||
parent::__construct($productId, $discount, $quantityFrom, $quantityTo);
|
||||
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace DigressivePrice\Event;
|
||||
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
/**
|
||||
* Class DigressivePriceIdEvent
|
||||
* @package DigressivePrice\Event
|
||||
* @author Etienne PERRIERE <eperriere@openstudio.fr> - Nexxpix - OpenStudio
|
||||
*/
|
||||
class DigressivePriceIdEvent extends ActionEvent
|
||||
{
|
||||
protected $id;
|
||||
|
||||
public function __construct($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user