Initial commit

This commit is contained in:
2020-01-27 08:56:08 +01:00
commit b7525048d6
27129 changed files with 3409855 additions and 0 deletions

View File

@@ -0,0 +1,123 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
namespace WishList\Event;
use Thelia\Core\Event\ActionEvent;
/**
*
* This class contains all WishList events identifiers used by WishList Core
*
* @author Michaël Espeche <mespeche@openstudio.fr>
*/
class WishListEvents extends ActionEvent
{
const WISHLIST_ADD_PRODUCT = 'whishList.action.addProduct';
const BEFORE_WISHLIST_ADD_PRODUCT = 'whishList.action.beforeAddProduct';
const AFTER_WISHLIST_ADD_PRODUCT = 'whishList.action.afterAddProduct';
const WISHLIST_REMOVE_PRODUCT = 'whishList.action.removeProduct';
const BEFORE_WISHLIST_REMOVE_PRODUCT = 'whishList.action.beforeRemoveProduct';
const AFTER_WISHLIST_REMOVE_PRODUCT = 'whishList.action.afterRemoveProduct';
const WISHLIST_CLEAR = 'whishList.action.clear';
protected $userId;
protected $productId;
protected $wishList;
public function __construct($productId = null, $userId)
{
$this->productId = $productId;
$this->userId = $userId;
}
/**
* @param mixed $productId
*/
public function setProductId($productId)
{
$this->productId = $productId;
return $this;
}
/**
* @return mixed
*/
public function getProductId()
{
return $this->productId;
}
/**
* @param mixed $userId
*/
public function setUserId($userId)
{
$this->userId = $userId;
return $this;
}
/**
* @return mixed
*/
public function getUserId()
{
return $this->userId;
}
/**
* @param mixed $wishList
*/
public function setWishList($wishList)
{
$this->wishList = $wishList;
return $this;
}
/**
* @return mixed
*/
public function getWishList()
{
return $this->wishList;
}
/**
* check if wishList exists
*
* @return bool
*/
public function hasWishList()
{
return null !== $this->wishList;
}
}