refactor shipping object into area

This commit is contained in:
Manuel Raynaud
2013-10-10 17:18:38 +02:00
parent 9d6df61296
commit 560b80c182
7 changed files with 91 additions and 24 deletions

View File

@@ -0,0 +1,66 @@
<?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 Thelia\Core\Event\Area;
use Thelia\Core\Event\ActionEvent;
/**
* Class AreaEvent
* @package Thelia\Core\Event\Shipping
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class AreaEvent extends ActionEvent
{
protected $area;
public function __construct($area = null)
{
$this->area = $area;
}
/**
* @param mixed $area
*
* @return $this
*/
public function setArea($area)
{
$this->area = $area;
return $this;
}
/**
* @return mixed
*/
public function getArea()
{
return $this->area;
}
public function hasArea()
{
return null !== $this->area;
}
}

View File

@@ -234,9 +234,9 @@ final class TheliaEvents
// -- SHIPPING CONFIGURATION MANAGEMENT
const SHIPPING_CREATE = 'action.createShipping';
const SHIPPING_UPDATE = 'action.updateShipping';
const SHIPPING_DELETE = 'action.deleteShipping';
const AREA_CREATE = 'action.createArea';
const AREA_UPDATE = 'action.updateArea';
const AREA_DELETE = 'action.deleteArea';
// -- Categories Associated Content ----------------------------------------