Rajout du code core qui n'était pas gitté

This commit is contained in:
2020-05-08 20:00:41 +02:00
parent 4821ab2b5e
commit 096d58ea33
1654 changed files with 615177 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?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 Thelia\Core\Event\OrderStatus;
/**
* Class OrderStatusCreateEvent
* @package Thelia\Core\Event\OrderStatus
* @author Gilles Bourgeat <gbourgeat@openstudio.fr>
*/
class OrderStatusCreateEvent extends OrderStatusEvent
{
}

View File

@@ -0,0 +1,22 @@
<?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 Thelia\Core\Event\OrderStatus;
/**
* Class OrderStatusDeleteEvent
* @package Thelia\Core\Event\OrderStatus
* @author Gilles Bourgeat <gbourgeat@openstudio.fr>
*/
class OrderStatusDeleteEvent extends OrderStatusUpdateEvent
{
}

View File

@@ -0,0 +1,221 @@
<?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 Thelia\Core\Event\OrderStatus;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\OrderStatus;
/**
* Class OrderStatusEvent
* @package Thelia\Core\Event\OrderStatus
* @author Gilles Bourgeat <gbourgeat@openstudio.fr>
*/
class OrderStatusEvent extends ActionEvent
{
/** @var string */
protected $code;
/** @var string */
protected $title;
/** @var string */
protected $description;
/** @var string */
protected $chapo;
/** @var string */
protected $postscriptum;
/** @var string */
protected $color;
/** @var string */
protected $locale = 'en_US';
/** @var OrderStatus */
protected $orderStatus;
/** @var int */
protected $position;
/**
* @return int
*/
public function getPosition()
{
return $this->position;
}
/**
* @param int $position
* @return OrderStatusEvent
*/
public function setPosition($position)
{
$this->position = $position;
return $this;
}
/**
* @return bool
*/
public function hasOrderStatus()
{
return null !== $this->orderStatus;
}
/**
* @return OrderStatus
*/
public function getOrderStatus()
{
return $this->orderStatus;
}
/**
* @param OrderStatus $orderStatus
* @return OrderStatusEvent
*/
public function setOrderStatus($orderStatus)
{
$this->orderStatus = $orderStatus;
return $this;
}
/**
* @return string
*/
public function getLocale()
{
return $this->locale;
}
/**
* @param string $locale
* @return OrderStatusEvent
*/
public function setLocale($locale)
{
$this->locale = $locale;
return $this;
}
/**
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* @param string $code
* @return OrderStatusEvent
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* @return string
*/
public function getColor()
{
return $this->color;
}
/**
* @param string $color
* @return OrderStatusEvent
*/
public function setColor($color)
{
$this->color = $color;
return $this;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @param string $title
* @return OrderStatusEvent
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string $description
* @return OrderStatusEvent
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* @return string
*/
public function getChapo()
{
return $this->chapo;
}
/**
* @param string $chapo
* @return OrderStatusEvent
*/
public function setChapo($chapo)
{
$this->chapo = $chapo;
return $this;
}
/**
* @return string
*/
public function getPostscriptum()
{
return $this->postscriptum;
}
/**
* @param string $postscriptum
* @return OrderStatusEvent
*/
public function setPostscriptum($postscriptum)
{
$this->postscriptum = $postscriptum;
return $this;
}
}

View File

@@ -0,0 +1,51 @@
<?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 Thelia\Core\Event\OrderStatus;
/**
* Class OrderStatusUpdateEvent
* @package Thelia\Core\Event\OrderStatus
* @author Gilles Bourgeat <gbourgeat@openstudio.fr>
*/
class OrderStatusUpdateEvent extends OrderStatusEvent
{
/** @var int */
protected $id;
/**
* OrderStatusUpdateEvent constructor.
* @param int $id
*/
public function __construct($id)
{
$this->id = $id;
}
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @param int $id
* @return OrderStatusUpdateEvent
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
}

View File

@@ -0,0 +1,50 @@
<?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 Thelia\Core\Event\Template;
class TemplateDuplicateEvent extends TemplateEvent
{
/** @var int */
protected $sourceTemplateId;
/** @var string */
protected $locale;
/**
* TemplateCreateEvent constructor.
* @param int $sourceTemplateId
*/
public function __construct($sourceTemplateId, $locale)
{
parent::__construct();
$this->sourceTemplateId = $sourceTemplateId;
$this->locale = $locale;
}
/**
* @return int
*/
public function getSourceTemplateId()
{
return $this->sourceTemplateId;
}
/**
* @return string
*/
public function getLocale()
{
return $this->locale;
}
}

View File

@@ -0,0 +1,67 @@
<?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 Thelia\Core\Event;
class ViewCheckEvent extends ActionEvent
{
protected $view;
protected $view_id;
public function __construct($view, $view_id)
{
$this->view = $view;
$this->view_id = $view_id;
}
/**
* @return mixed
*/
public function getView()
{
return $this->view;
}
/**
* @param mixed $view
*
* @return $this
*/
public function setView($view)
{
$this->view = $view;
return $this;
}
/**
* @return mixed
*/
public function getViewId()
{
return $this->view_id;
}
/**
* @param mixed $view_id
*
* @return $this
*/
public function setViewId($view_id)
{
$this->view_id = $view_id;
return $this;
}
}

View File

@@ -0,0 +1,44 @@
<?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 Thelia\Core\Security\Exception;
use Thelia\Model\Customer;
/**
* Class CustomerNotConfirmedException
* @package Thelia\Core\Security\Exception
* @author Baixas Alban <abaixas@openstudio.fr>
*/
class CustomerNotConfirmedException extends AuthenticationException
{
/** @var Customer */
protected $user;
/**
* @return Customer
*/
public function getUser()
{
return $this->user;
}
/**
* @param Customer $user
* @return $this
*/
public function setUser(Customer $user)
{
$this->user = $user;
return $this;
}
}

View File

@@ -0,0 +1,60 @@
<?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 Thelia\Core\Template\Element;
use Propel\Runtime\ActiveQuery\ModelCriteria;
/**
*
*/
trait StandardI18nFieldsSearchTrait
{
protected static $standardI18nSearchFields = [
"title",
"chapo",
"description",
"postscriptum"
];
protected function getStandardI18nSearchFields()
{
return self::$standardI18nSearchFields;
}
/**
* @param ModelCriteria $search
* @param $searchTerm
* @param $searchCriteria
*/
protected function addStandardI18nSearch(&$search, $searchTerm, $searchCriteria)
{
foreach (self::$standardI18nSearchFields as $index => $searchInElement) {
if ($index > 0) {
$search->_or();
}
$this->addSearchInI18nColumn($search, strtoupper($searchInElement), $searchCriteria, $searchTerm);
}
}
/**
* Add the search clause for an I18N column, taking care of the back/front context, as default_locale_i18n is
* not defined in the backEnd I18N context.
*
* @param ModelCriteria $search
* @param string $columnName the column to search into, such as TITLE
* @param string $searchCriteria the search criteria, such as Criterial::LIKE, Criteria::EQUAL, etc.
* @param string $searchTerm the searched term
*/
public abstract function addSearchInI18nColumn($search, $columnName, $searchCriteria, $searchTerm);
}