modify travis script
This commit is contained in:
@@ -12,3 +12,4 @@ before_script:
|
||||
- composer install --prefer-dist --dev
|
||||
- sh -c "mysql -u$DB_USER -e 'SET FOREIGN_KEY_CHECKS = 0; DROP DATABASE IF EXISTS thelia;SET FOREIGN_KEY_CHECKS = 1;'; fi"
|
||||
- php Thelia thelia:install --db_host=localhost --db_username=$DB_USER --db_name=thelia
|
||||
- php install/faker.php
|
||||
|
||||
@@ -63,6 +63,8 @@ class Address extends BaseAction implements EventSubscriberInterface
|
||||
->setCompany($event->getCompany())
|
||||
->save()
|
||||
;
|
||||
|
||||
$event->setAddress($addressModel);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
namespace Thelia\Core\Event;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Thelia\Model\Address;
|
||||
use Thelia\Model\Customer;
|
||||
|
||||
|
||||
@@ -103,7 +104,12 @@ class AddressCreateOrUpdateEvent extends Event
|
||||
*/
|
||||
protected $customer;
|
||||
|
||||
function __construct($label, $title, $firstname, $lastname, $address1, $address2, $address3, $zipcode, $city, $country, $cellphone, $phone, $company, Customer $customer)
|
||||
/**
|
||||
* @var \Thelia\Model\Address
|
||||
*/
|
||||
protected $address;
|
||||
|
||||
function __construct($label, $title, $firstname, $lastname, $address1, $address2, $address3, $zipcode, $city, $country, $cellphone, $phone, $company)
|
||||
{
|
||||
$this->address1 = $address1;
|
||||
$this->address2 = $address2;
|
||||
@@ -118,7 +124,6 @@ class AddressCreateOrUpdateEvent extends Event
|
||||
$this->phone = $phone;
|
||||
$this->title = $title;
|
||||
$this->zipcode = $zipcode;
|
||||
$this->customer = $customer;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -225,6 +230,14 @@ class AddressCreateOrUpdateEvent extends Event
|
||||
return $this->zipcode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Thelia\Model\Customer $customer
|
||||
*/
|
||||
public function setCustomer(Customer $customer)
|
||||
{
|
||||
$this->customer = $customer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Thelia\Model\Customer
|
||||
*/
|
||||
@@ -233,4 +246,21 @@ class AddressCreateOrUpdateEvent extends Event
|
||||
return $this->customer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Thelia\Model\Address $address
|
||||
*/
|
||||
public function setAddress(Address $address)
|
||||
{
|
||||
$this->address = $address;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Thelia\Model\Address
|
||||
*/
|
||||
public function getAddress()
|
||||
{
|
||||
return $this->address;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user