new model
This commit is contained in:
54
core/lib/Thelia/Core/Event/Profile/ProfileEvent.php
Normal file
54
core/lib/Thelia/Core/Event/Profile/ProfileEvent.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?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\Profile;
|
||||
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
use Thelia\Model\Group;
|
||||
|
||||
class ProfileEvent extends ActionEvent
|
||||
{
|
||||
protected $group = null;
|
||||
|
||||
public function __construct(Group $group = null)
|
||||
{
|
||||
$this->group = $group;
|
||||
}
|
||||
|
||||
public function hasGroup()
|
||||
{
|
||||
return ! is_null($this->group);
|
||||
}
|
||||
|
||||
public function getGroup()
|
||||
{
|
||||
return $this->group;
|
||||
}
|
||||
|
||||
public function setGroup(Group $group)
|
||||
{
|
||||
$this->group = $group;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -549,6 +549,13 @@ final class TheliaEvents
|
||||
const TAX_UPDATE = "action.updateTax";
|
||||
const TAX_DELETE = "action.deleteTax";
|
||||
|
||||
|
||||
// -- Profile management ---------------------------------------------
|
||||
|
||||
const PROFILE_CREATE = "action.createProfile";
|
||||
const PROFILE_UPDATE = "action.updateProfile";
|
||||
const PROFILE_DELETE = "action.deleteProfile";
|
||||
|
||||
// -- Tax Rules management ---------------------------------------------
|
||||
|
||||
const TAX_RULE_CREATE = "action.createTaxRule";
|
||||
|
||||
Reference in New Issue
Block a user