mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
commit
da7d428d3b
2 changed files with 7 additions and 2 deletions
|
|
@ -36,12 +36,17 @@ class LoadZonesData extends DataFixture
|
|||
|
||||
$restOfWorldCountries = array_diff(Intl::getRegionBundle()->getCountryNames(), $euCountries + array('US'));
|
||||
|
||||
$manager->persist($this->createZone('EU', ZoneInterface::TYPE_COUNTRY, $euCountries));
|
||||
$manager->persist($eu = $this->createZone('EU', ZoneInterface::TYPE_COUNTRY, $euCountries));
|
||||
$manager->persist($this->createZone('USA', ZoneInterface::TYPE_COUNTRY, array('US')));
|
||||
$manager->persist($this->createZone('EU + USA', ZoneInterface::TYPE_ZONE, array('EU', 'USA')));
|
||||
$manager->persist($this->createZone('Rest of World', ZoneInterface::TYPE_COUNTRY, $restOfWorldCountries));
|
||||
|
||||
$manager->flush();
|
||||
|
||||
$settingsManager = $this->get('sylius.settings.manager');
|
||||
$settings = $settingsManager->loadSettings('taxation');
|
||||
$settings->set('default_tax_zone', $eu);
|
||||
$settingsManager->saveSettings('taxation', $settings);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class ImageUploader implements ImageUploaderInterface
|
|||
public function upload(ImageInterface $image)
|
||||
{
|
||||
if (!$image->hasFile()) {
|
||||
throw new \InvalidArgumentException('The given image has no file attached.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (null !== $image->getPath()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue