Quelques modifs de style front-office
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
|
||||
namespace StockAlert\Event;
|
||||
|
||||
use Thelia\Core\Event\ProductSaleElement\ProductSaleElementEvent;
|
||||
use Thelia\Model\ProductSaleElements;
|
||||
|
||||
/**
|
||||
* Class ProductSaleElementAvailabilityEvent
|
||||
* @package StockAlert\Event
|
||||
* @author Julien Chanséaume <julien@thelia.net>
|
||||
*/
|
||||
class ProductSaleElementAvailabilityEvent extends ProductSaleElementEvent
|
||||
{
|
||||
|
||||
/** @var bool */
|
||||
protected $available = true;
|
||||
|
||||
|
||||
public function __construct(ProductSaleElements $product_sale_element = null)
|
||||
{
|
||||
$this->product_sale_element = $product_sale_element;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isAvailable()
|
||||
{
|
||||
return $this->available;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $available
|
||||
*/
|
||||
public function setAvailable($available)
|
||||
{
|
||||
$this->available = $available;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
121
local/modules/StockAlert/Event/StockAlertEvent.php
Normal file
121
local/modules/StockAlert/Event/StockAlertEvent.php
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace StockAlert\Event;
|
||||
|
||||
use StockAlert\Model\Base\RestockingAlert;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
/**
|
||||
* Class StockAlertEvent
|
||||
* @package StockAlert\Event
|
||||
* @author Baixas Alban <abaixas@openstudio.fr>
|
||||
* @author Julien Chanséaume <julien@thelia.net>
|
||||
*/
|
||||
class StockAlertEvent extends ActionEvent
|
||||
{
|
||||
|
||||
/** @var int */
|
||||
private $productSaleElementsId;
|
||||
|
||||
/** @var string */
|
||||
private $email;
|
||||
|
||||
/** @var string */
|
||||
private $locale;
|
||||
|
||||
/** @var RestockingAlert */
|
||||
private $restockingAlert;
|
||||
|
||||
/**
|
||||
* @param $productSaleElementsId
|
||||
* @param $email
|
||||
*/
|
||||
public function __construct($productSaleElementsId, $email, $locale)
|
||||
{
|
||||
$this->setEmail($email);
|
||||
$this->setProductSaleElementsId($productSaleElementsId);
|
||||
$this->setLocale($locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getEmail()
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $email
|
||||
*/
|
||||
public function setEmail($email)
|
||||
{
|
||||
$this->email = $email;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getProductSaleElementsId()
|
||||
{
|
||||
return $this->productSaleElementsId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $productSaleElementsId
|
||||
*/
|
||||
public function setProductSaleElementsId($productSaleElementsId)
|
||||
{
|
||||
$this->productSaleElementsId = $productSaleElementsId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return RestockingAlert
|
||||
*/
|
||||
public function getRestockingAlert()
|
||||
{
|
||||
return $this->restockingAlert;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RestockingAlert $restockingAlert
|
||||
*/
|
||||
public function setRestockingAlert($restockingAlert)
|
||||
{
|
||||
$this->restockingAlert = $restockingAlert;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLocale()
|
||||
{
|
||||
return $this->locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $locale
|
||||
*/
|
||||
public function setLocale($locale)
|
||||
{
|
||||
$this->locale = $locale;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
26
local/modules/StockAlert/Event/StockAlertEvents.php
Normal file
26
local/modules/StockAlert/Event/StockAlertEvents.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace StockAlert\Event;
|
||||
|
||||
/**
|
||||
* Class StockAlertEvents
|
||||
* @package RestockingAlert\Event
|
||||
* @author Baixas Alban <abaixas@openstudio.fr>
|
||||
* @author Julien Chanséaume <julien@thelia.net>
|
||||
*
|
||||
*/
|
||||
class StockAlertEvents
|
||||
{
|
||||
const STOCK_ALERT_SUBSCRIBE = "stockalert.subscribe";
|
||||
const STOCK_ALERT_CHECK_AVAILABILITY = "stockalert.check.availability";
|
||||
}
|
||||
Reference in New Issue
Block a user