Rajout du code core qui n'était pas gitté
This commit is contained in:
@@ -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
|
||||
{
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
}
|
||||
221
core/lib/Thelia/Core/Event/OrderStatus/OrderStatusEvent.php
Normal file
221
core/lib/Thelia/Core/Event/OrderStatus/OrderStatusEvent.php
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
67
core/lib/Thelia/Core/Event/ViewCheckEvent.php
Normal file
67
core/lib/Thelia/Core/Event/ViewCheckEvent.php
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user