Using "update" instead of "change"

This commit is contained in:
franck
2013-09-12 14:20:23 +02:00
parent 3f82421879
commit 83f4e8b356
11 changed files with 237 additions and 198 deletions

View File

@@ -23,7 +23,7 @@
namespace Thelia\Core\Event;
class AttributeValueCreateEvent extends AttributeValueEvent
class AttributeAvCreateEvent extends AttributeAvEvent
{
protected $title;
protected $locale;

View File

@@ -23,23 +23,23 @@
namespace Thelia\Core\Event;
class AttributeValueDeleteEvent extends AttributeValueEvent
class AttributeAvDeleteEvent extends AttributeAvEvent
{
protected $attributeValue_id;
protected $attributeAv_id;
public function __construct($attributeValue_id)
public function __construct($attributeAv_id)
{
$this->setAttributeValueId($attributeValue_id);
$this->setAttributeAvId($attributeAv_id);
}
public function getAttributeValueId()
public function getAttributeAvId()
{
return $this->attributeValue_id;
return $this->attributeAv_id;
}
public function setAttributeValueId($attributeValue_id)
public function setAttributeAvId($attributeAv_id)
{
$this->attributeValue_id = $attributeValue_id;
$this->attributeAv_id = $attributeAv_id;
return $this;
}

View File

@@ -24,28 +24,28 @@
namespace Thelia\Core\Event;
use Thelia\Model\AttributeAv;
class AttributeValueEvent extends ActionEvent
class AttributeAvEvent extends ActionEvent
{
protected $attributeValue = null;
protected $attributeAv = null;
public function __construct(AttributeAv $attributeValue = null)
public function __construct(AttributeAv $attributeAv = null)
{
$this->attributeValue = $attributeValue;
$this->attributeAv = $attributeAv;
}
public function hasAttributeValue()
public function hasAttributeAv()
{
return ! is_null($this->attributeValue);
return ! is_null($this->attributeAv);
}
public function getAttributeValue()
public function getAttributeAv()
{
return $this->attributeValue;
return $this->attributeAv;
}
public function setAttributeValue($attributeValue)
public function setAttributeAv($attributeAv)
{
$this->attributeValue = $attributeValue;
$this->attributeAv = $attributeAv;
return $this;
}

View File

@@ -23,27 +23,27 @@
namespace Thelia\Core\Event;
class AttributeValueUpdateEvent extends AttributeValueCreateEvent
class AttributeAvUpdateEvent extends AttributeAvCreateEvent
{
protected $attributeValue_id;
protected $attributeAv_id;
protected $description;
protected $chapo;
protected $postscriptum;
public function __construct($attributeValue_id)
public function __construct($attributeAv_id)
{
$this->setAttributeValueId($attributeValue_id);
$this->setAttributeAvId($attributeAv_id);
}
public function getAttributeValueId()
public function getAttributeAvId()
{
return $this->attributeValue_id;
return $this->attributeAv_id;
}
public function setAttributeValueId($attributeValue_id)
public function setAttributeAvId($attributeAv_id)
{
$this->attributeValue_id = $attributeValue_id;
$this->attributeAv_id = $attributeAv_id;
return $this;
}

View File

@@ -365,17 +365,17 @@ final class TheliaEvents
// -- Attributes values management ----------------------------------------
const ATTRIBUTE_VALUE_CREATE = "action.createAttributeValue";
const ATTRIBUTE_VALUE_UPDATE = "action.updateAttributeValue";
const ATTRIBUTE_VALUE_DELETE = "action.deleteAttributeValue";
const ATTRIBUTE_VALUE_UPDATE_POSITION = "action.updateAttributeValuePosition";
const ATTRIBUTE_AV_CREATE = "action.createAttributeAv";
const ATTRIBUTE_AV_UPDATE = "action.updateAttributeAv";
const ATTRIBUTE_AV_DELETE = "action.deleteAttributeAv";
const ATTRIBUTE_AV_UPDATE_POSITION = "action.updateAttributeAvPosition";
const BEFORE_CREATEATTRIBUTE_VALUE = "action.before_createAttributeValue";
const AFTER_CREATEATTRIBUTE_VALUE = "action.after_createAttributeValue";
const BEFORE_CREATEATTRIBUTE_AV = "action.before_createAttributeAv";
const AFTER_CREATEATTRIBUTE_AV = "action.after_createAttributeAv";
const BEFORE_UPDATEATTRIBUTE_VALUE = "action.before_updateAttributeValue";
const AFTER_UPDATEATTRIBUTE_VALUE = "action.after_updateAttributeValue";
const BEFORE_UPDATEATTRIBUTE_AV = "action.before_updateAttributeAv";
const AFTER_UPDATEATTRIBUTE_AV = "action.after_updateAttributeAv";
const BEFORE_DELETEATTRIBUTE_VALUE = "action.before_deleteAttributeValue";
const AFTER_DELETEATTRIBUTE_VALUE = "action.after_deleteAttributeValue";
const BEFORE_DELETEATTRIBUTE_AV = "action.before_deleteAttributeAv";
const AFTER_DELETEATTRIBUTE_AV = "action.after_deleteAttributeAv";
}