Initial Commit

This commit is contained in:
2019-11-21 12:25:31 +01:00
commit f4aabcb9b1
13959 changed files with 787761 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?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 Comment\Events;
/**
* Class CommentAbuseEvent
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*/
class CommentAbuseEvent extends CommentEvent
{
}

View File

@@ -0,0 +1,43 @@
<?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 Comment\Events;
/**
* Class CommentChangeStatusEvent
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*/
class CommentChangeStatusEvent extends CommentEvent
{
/** @var int */
protected $newStatus;
/**
* @return int
*/
public function getNewStatus()
{
return $this->newStatus;
}
/**
* @param int $newStatus
*/
public function setNewStatus($newStatus)
{
$this->newStatus = $newStatus;
return $this;
}
}

View 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 Comment\Events;
use Thelia\Core\Event\ActionEvent;
/**
* Class CommentCheckOrderEvent
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*/
class CommentCheckOrderEvent extends ActionEvent
{
}

View File

@@ -0,0 +1,85 @@
<?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 Comment\Events;
use Thelia\Core\Event\ActionEvent;
/**
* Class CommentComputeRatingEvent
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*/
class CommentComputeRatingEvent extends ActionEvent
{
/** @var string */
protected $ref;
/** @var int */
protected $refId;
/** @var float */
protected $rating;
/**
* @return string
*/
public function getRef()
{
return $this->ref;
}
/**
* @param string $ref
*/
public function setRef($ref)
{
$this->ref = $ref;
return $this;
}
/**
* @return int
*/
public function getRefId()
{
return $this->refId;
}
/**
* @param int $refId
*/
public function setRefId($refId)
{
$this->refId = $refId;
return $this;
}
/**
* @return float
*/
public function getRating()
{
return $this->rating;
}
/**
* @param float $rating
*/
public function setRating($rating)
{
$this->rating = $rating;
return $this;
}
}

View File

@@ -0,0 +1,270 @@
<?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 Comment\Events;
/**
* Class CommentCreateEvent
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*
*
*/
class CommentCreateEvent extends CommentEvent
{
/** @var string */
protected $ref;
/** @var int */
protected $refId;
/** @var int */
protected $customerId;
/** @var string */
protected $username;
/** @var string */
protected $email;
/** @var string */
protected $locale;
/** @var string */
protected $title;
/** @var string */
protected $content;
/** @var int */
protected $status;
/** @var boolean */
protected $verified;
/** @var int */
protected $rating;
/** @var int */
protected $abuse;
/**
* @return int
*/
public function getAbuse()
{
return $this->abuse;
}
/**
* @param int $abuse
*/
public function setAbuse($abuse)
{
$this->abuse = $abuse;
return $this;
}
/**
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* @param string $content
*/
public function setContent($content)
{
$this->content = $content;
}
/**
* @return int
*/
public function getCustomerId()
{
return $this->customerId;
}
/**
* @param int $customerId
*/
public function setCustomerId($customerId)
{
$this->customerId = $customerId;
}
/**
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* @param string $email
*/
public function setEmail($email)
{
$this->email = $email;
}
/**
* @return string
*/
public function getLocale()
{
return $this->locale;
}
/**
* @param string $locale
*/
public function setLocale($locale)
{
$this->locale = $locale;
return $this;
}
/**
* @return int
*/
public function getRating()
{
return $this->rating;
}
/**
* @param int $rating
*/
public function setRating($rating)
{
$this->rating = $rating;
return $this;
}
/**
* @return string
*/
public function getRef()
{
return $this->ref;
}
/**
* @param string $ref
*/
public function setRef($ref)
{
$this->ref = $ref;
return $this;
}
/**
* @return int
*/
public function getRefId()
{
return $this->refId;
}
/**
* @param int $refId
*/
public function setRefId($refId)
{
$this->refId = $refId;
return $this;
}
/**
* @return int
*/
public function getStatus()
{
return $this->status;
}
/**
* @param int $status
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* @param string $username
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* @return boolean
*/
public function isVerified()
{
return $this->verified;
}
/**
* @param boolean $verified
*/
public function setVerified($verified)
{
$this->verified = $verified;
return $this;
}
}

View File

@@ -0,0 +1,166 @@
<?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 Comment\Events;
/**
* Class CommentDefinitionEvent
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*/
class CommentDefinitionEvent extends CommentEvent
{
/** @var string */
protected $ref;
/** @var int */
protected $ref_id;
/** @var array */
protected $config = [];
/** @var \Thelia\Model\Customer */
protected $customer = null;
/** @var bool */
protected $verified = false;
/** @var bool */
protected $rating = false;
/** @var bool */
protected $valid = false;
public function __construct()
{
}
/**
* @return string
*/
public function getRef()
{
return $this->ref;
}
/**
* @param string $ref
*/
public function setRef($ref)
{
$this->ref = $ref;
return $this;
}
/**
* @return int
*/
public function getRefId()
{
return $this->ref_id;
}
/**
* @param int $ref_id
*/
public function setRefId($ref_id)
{
$this->ref_id = $ref_id;
return $this;
}
/**
* @return array
*/
public function getConfig()
{
return $this->config;
}
/**
* @param array $config
*/
public function setConfig($config)
{
$this->config = $config;
return $this;
}
/**
* @return \Thelia\Model\Customer
*/
public function getCustomer()
{
return $this->customer;
}
/**
* @param \Thelia\Model\Customer $customer
*/
public function setCustomer($customer)
{
$this->customer = $customer;
return $this;
}
/**
* @return boolean
*/
public function isVerified()
{
return $this->verified;
}
/**
* @param boolean $verified
*/
public function setVerified($verified)
{
$this->verified = $verified;
return $this;
}
/**
* @return boolean
*/
public function hasRating()
{
return $this->rating;
}
/**
* @param boolean $rating
*/
public function setRating($rating)
{
$this->rating = $rating;
return $this;
}
/**
* @return boolean
*/
public function isValid()
{
return $this->valid;
}
/**
* @param boolean $valid
*/
public function setValid($valid)
{
$this->valid = $valid;
return $this;
}
}

View File

@@ -0,0 +1,23 @@
<?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 Comment\Events;
/**
* Class CommentDeleteEvent
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*/
class CommentDeleteEvent extends CommentEvent
{
}

View File

@@ -0,0 +1,87 @@
<?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 Comment\Events;
use Comment\Model\Comment;
use Thelia\Core\Event\ActionEvent;
/**
*
* This class contains all Comment events identifiers used by Comment Core
*
* @author Michaël Espeche <michael.espeche@gmail.com>
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*
*/
class CommentEvent extends ActionEvent
{
/** @var int */
protected $id = null;
/** @var Comment */
protected $comment = null;
/**
* Constructor
*/
public function __construct()
{
}
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @param int $id
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* @return Comment|null
*/
public function getComment()
{
return $this->comment;
}
/**
* @param Comment $comment
*/
public function setComment(Comment $comment)
{
$this->comment = $comment;
return $this;
}
}

View File

@@ -0,0 +1,36 @@
<?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 Comment\Events;
/**
* Class CommentEvents
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*/
class CommentEvents
{
const COMMENT_CREATE = "action.comment.create";
const COMMENT_UPDATE = "action.comment.update";
const COMMENT_DELETE = "action.comment.delete";
const COMMENT_STATUS_UPDATE = "action.comment.status.update";
const COMMENT_ABUSE = "action.comment.abuse";
const COMMENT_RATING_COMPUTE = "action.comment.rating.compute";
const COMMENT_REFERENCE_GETTER = "action.comment.reference.getter";
const COMMENT_CUSTOMER_DEMAND = "action.comment.customer.demand";
//
const COMMENT_GET_DEFINITION = "action.comment.definition";
const COMMENT_GET_DEFINITION_PRODUCT = "action.comment.definition.product";
const COMMENT_GET_DEFINITION_CONTENT = "action.comment.definition.content";
}

View File

@@ -0,0 +1,193 @@
<?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 Comment\Events;
use Thelia\Core\Event\ActionEvent;
/**
* Class CommentReferenceGetterEvent
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*/
class CommentReferenceGetterEvent extends ActionEvent
{
/** @var string */
protected $ref;
/** @var int */
protected $refId;
/** @var string */
protected $locale;
/** @var mixed */
protected $object;
/** @var string */
protected $typeTitle;
/** @var string */
protected $title;
/** @var string */
protected $viewUrl;
/** @var string */
protected $editUrl;
public function __construct($ref, $refId, $locale)
{
$this->ref = $ref;
$this->refId = $refId;
$this->locale = $locale;
}
/**
* @return string
*/
public function getEditUrl()
{
return $this->editUrl;
}
/**
* @param string $editUrl
*/
public function setEditUrl($editUrl)
{
$this->editUrl = $editUrl;
return $this;
}
/**
* @return string
*/
public function getLocale()
{
return $this->locale;
}
/**
* @param string $locale
*/
public function setLocale($locale)
{
$this->locale = $locale;
}
/**
* @return mixed
*/
public function getObject()
{
return $this->object;
}
/**
* @param mixed $object
*/
public function setObject($object)
{
$this->object = $object;
return $this;
}
/**
* @return string
*/
public function getRef()
{
return $this->ref;
}
/**
* @param string $ref
*/
public function setRef($ref)
{
$this->ref = $ref;
return $this;
}
/**
* @return int
*/
public function getRefId()
{
return $this->refId;
}
/**
* @param int $refId
*/
public function setRefId($refId)
{
$this->refId = $refId;
return $this;
}
/**
* @return string
*/
public function getTypeTitle()
{
return $this->typeTitle;
}
/**
* @param string $typeTitle
* @return CommentReferenceGetterEvent
*/
public function setTypeTitle($typeTitle)
{
$this->typeTitle = $typeTitle;
return $this;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* @return string
*/
public function getViewUrl()
{
return $this->viewUrl;
}
/**
* @param string $viewUrl
*/
public function setViewUrl($viewUrl)
{
$this->viewUrl = $viewUrl;
return $this;
}
}

View File

@@ -0,0 +1,23 @@
<?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 Comment\Events;
/**
* Class CommentUpdateEvent
* @package Comment\Events
* @author Julien Chanséaume <jchanseaume@openstudio.fr>
*/
class CommentUpdateEvent extends CommentCreateEvent
{
}