allow to make an address as default on update action

This commit is contained in:
Manuel Raynaud
2013-09-13 10:17:45 +02:00
parent ca7d1f7c85
commit 275b20ac77
9 changed files with 67 additions and 18 deletions

View File

@@ -108,7 +108,12 @@ class AddressCreateOrUpdateEvent extends ActionEvent
*/
protected $address;
public function __construct($label, $title, $firstname, $lastname, $address1, $address2, $address3, $zipcode, $city, $country, $cellphone, $phone, $company)
/**
* @var int
*/
protected $isDefault;
public function __construct($label, $title, $firstname, $lastname, $address1, $address2, $address3, $zipcode, $city, $country, $cellphone, $phone, $company, $isDefault = 0)
{
$this->address1 = $address1;
$this->address2 = $address2;
@@ -123,6 +128,7 @@ class AddressCreateOrUpdateEvent extends ActionEvent
$this->phone = $phone;
$this->title = $title;
$this->zipcode = $zipcode;
$this->isDefault = $isDefault;
}
/**
@@ -229,6 +235,16 @@ class AddressCreateOrUpdateEvent extends ActionEvent
return $this->zipcode;
}
/**
* @return int
*/
public function getIsDefault()
{
return $this->isDefault;
}
/**
* @param \Thelia\Model\Customer $customer
*/