[11/05/2025] On remplace les modules Colissimo par le combo ColissimoHomeDelivery + ColissimoPickupPoint + ColissimoLabel
This commit is contained in:
11
local/modules/ColissimoLabel/Event/ColissimoLabelEvents.php
Normal file
11
local/modules/ColissimoLabel/Event/ColissimoLabelEvents.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace ColissimoLabel\Event;
|
||||
|
||||
/**
|
||||
* @author Gilles Bourgeat >gilles.bourgeat@gmail.com>
|
||||
*/
|
||||
class ColissimoLabelEvents
|
||||
{
|
||||
const LABEL_REQUEST = 'ColissimoLabel.labelRequest';
|
||||
}
|
||||
98
local/modules/ColissimoLabel/Event/LabelEvent.php
Normal file
98
local/modules/ColissimoLabel/Event/LabelEvent.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace ColissimoLabel\Event;
|
||||
|
||||
|
||||
use ColissimoLabel\Model\ColissimoLabel;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
class LabelEvent extends ActionEvent
|
||||
{
|
||||
/** @var int */
|
||||
protected $orderId;
|
||||
|
||||
/** @var ColissimoLabel */
|
||||
protected $colissimoLabel = null;
|
||||
|
||||
/** @var float|null */
|
||||
protected $weight = null;
|
||||
|
||||
/** @var bool|null */
|
||||
protected $signed = null;
|
||||
/**
|
||||
* LabelEvent constructor.
|
||||
* @param int $orderId
|
||||
*/
|
||||
public function __construct($orderId)
|
||||
{
|
||||
$this->orderId = $orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->orderId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ColissimoLabel
|
||||
*/
|
||||
public function getColissimoLabel()
|
||||
{
|
||||
return $this->colissimoLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ColissimoLabel $colissimoLabel
|
||||
* @return $this
|
||||
*/
|
||||
public function setColissimoLabel($colissimoLabel)
|
||||
{
|
||||
$this->colissimoLabel = $colissimoLabel;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function hasLabel()
|
||||
{
|
||||
return null !== $this->colissimoWsLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float|null
|
||||
*/
|
||||
public function getWeight()
|
||||
{
|
||||
return $this->weight;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param float|null $weight
|
||||
* @return $this
|
||||
*/
|
||||
public function setWeight($weight)
|
||||
{
|
||||
$this->weight = $weight;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getSigned()
|
||||
{
|
||||
return $this->signed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool|null $signed
|
||||
* @return $this
|
||||
*/
|
||||
public function setSigned($signed)
|
||||
{
|
||||
$this->signed = $signed;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
24
local/modules/ColissimoLabel/Event/LabelRequestEvent.php
Normal file
24
local/modules/ColissimoLabel/Event/LabelRequestEvent.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace ColissimoLabel\Event;
|
||||
|
||||
use ColissimoLabel\Request\LabelRequest;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* @author Gilles Bourgeat >gilles.bourgeat@gmail.com>
|
||||
*/
|
||||
class LabelRequestEvent extends Event
|
||||
{
|
||||
protected $labelRequest;
|
||||
|
||||
public function __construct(LabelRequest $labelRequest)
|
||||
{
|
||||
$this->labelRequest = $labelRequest;
|
||||
}
|
||||
|
||||
public function getLabelRequest()
|
||||
{
|
||||
return $this->labelRequest;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user