mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
commit
0baf1638f0
1070 changed files with 68645 additions and 1545 deletions
|
|
@ -33,27 +33,16 @@
|
||||||
"incenteev/composer-parameter-handler": "~2.0",
|
"incenteev/composer-parameter-handler": "~2.0",
|
||||||
"mathiasverraes/money": "dev-master@dev",
|
"mathiasverraes/money": "dev-master@dev",
|
||||||
"jms/translation-bundle": "1.1.*",
|
"jms/translation-bundle": "1.1.*",
|
||||||
"sylius/installer-bundle": "0.1.*",
|
|
||||||
"sylius/variable-product-bundle": "0.1.*",
|
|
||||||
"sylius/cart-bundle": "0.5.*",
|
|
||||||
"sylius/money-bundle": "0.2.*",
|
|
||||||
"sylius/taxation-bundle": "0.3.*",
|
|
||||||
"sylius/shipping-bundle": "0.2.*",
|
|
||||||
"sylius/addressing-bundle": "0.2.*",
|
|
||||||
"sylius/promotions-bundle": "0.2.*",
|
|
||||||
"sylius/inventory-bundle": "0.3.*",
|
|
||||||
"sylius/taxonomies-bundle": "0.2.*",
|
|
||||||
"sylius/settings-bundle": "0.2.*",
|
|
||||||
"sylius/payments-bundle": "0.2.*",
|
|
||||||
"sylius/flow-bundle": "0.1.*",
|
|
||||||
"sylius/resource-bundle": "0.3.*",
|
|
||||||
"sylius/omnipay-bundle": "0.9.*@dev",
|
|
||||||
"jms/serializer-bundle": "0.12.*",
|
"jms/serializer-bundle": "0.12.*",
|
||||||
|
"white-october/pagerfanta-bundle": "1.0.*",
|
||||||
|
"friendsofsymfony/rest-bundle": "0.13.*",
|
||||||
|
"stof/doctrine-extensions-bundle": "1.1.*",
|
||||||
"friendsofsymfony/user-bundle": "2.0.*@dev",
|
"friendsofsymfony/user-bundle": "2.0.*@dev",
|
||||||
"knplabs/knp-gaufrette-bundle": "0.2.*",
|
"knplabs/knp-gaufrette-bundle": "0.2.*",
|
||||||
"fzaninotto/faker": "1.2.*",
|
"fzaninotto/faker": "1.2.*",
|
||||||
"knplabs/knp-menu-bundle": "2.0.*",
|
"knplabs/knp-menu-bundle": "2.0.*",
|
||||||
"liip/imagine-bundle": "0.9.*",
|
"liip/imagine-bundle": "0.9.*",
|
||||||
|
"liip/doctrine-cache-bundle": "*",
|
||||||
"knplabs/knp-snappy-bundle": "dev-master",
|
"knplabs/knp-snappy-bundle": "dev-master",
|
||||||
"athari/yalinqo": "*"
|
"athari/yalinqo": "*"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
1686
composer.lock
generated
1686
composer.lock
generated
File diff suppressed because it is too large
Load diff
5
src/Sylius/Bundle/AddressingBundle/.gitignore
vendored
Normal file
5
src/Sylius/Bundle/AddressingBundle/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
vendor/
|
||||||
|
bin/
|
||||||
|
|
||||||
|
composer.phar
|
||||||
|
composer.lock
|
||||||
18
src/Sylius/Bundle/AddressingBundle/.travis.yml
Normal file
18
src/Sylius/Bundle/AddressingBundle/.travis.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
language: php
|
||||||
|
|
||||||
|
php:
|
||||||
|
- 5.3
|
||||||
|
- 5.4
|
||||||
|
- 5.5
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
allow_failure:
|
||||||
|
- php: 5.5
|
||||||
|
|
||||||
|
before_script: composer install --dev --prefer-source > /dev/null
|
||||||
|
|
||||||
|
script: bin/phpspec run -fpretty --verbose
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: "travis-ci@sylius.org"
|
||||||
|
irc: "irc.freenode.org#sylius-dev"
|
||||||
32
src/Sylius/Bundle/AddressingBundle/CHANGELOG.md
Normal file
32
src/Sylius/Bundle/AddressingBundle/CHANGELOG.md
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
CHANGELOG
|
||||||
|
=========
|
||||||
|
|
||||||
|
### v0.3.0
|
||||||
|
|
||||||
|
* Symfony 2.3 upgrade.
|
||||||
|
* Removal of ``Entity`` namespace, extend ``Model`` instead.
|
||||||
|
|
||||||
|
### v0.2.0
|
||||||
|
|
||||||
|
* Last version compatible with Symfony 2.2.
|
||||||
|
|
||||||
|
### v0.1.0
|
||||||
|
|
||||||
|
* Initial dev release.
|
||||||
|
|
||||||
|
### 11-02-2013
|
||||||
|
|
||||||
|
* Bump the Symfony requirement to version 2.2.
|
||||||
|
|
||||||
|
### 30-01-2013
|
||||||
|
|
||||||
|
* Remove ``sylius`` prefix from forms, services and models.
|
||||||
|
|
||||||
|
### 13-12-2012
|
||||||
|
|
||||||
|
* Use Doctrine RTEL to simplify the configuration.
|
||||||
|
|
||||||
|
### 11-12-2012
|
||||||
|
|
||||||
|
* Common address interface has been merged into default address interface.
|
||||||
|
* Introduce Country and Province models.
|
||||||
|
|
@ -0,0 +1,106 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Controller;
|
||||||
|
|
||||||
|
use Sylius\Bundle\AddressingBundle\Model\CountryInterface;
|
||||||
|
use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
|
||||||
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Province controller.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class ProvinceController extends ResourceController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Renders the province select field.
|
||||||
|
*
|
||||||
|
* @param Request $request
|
||||||
|
*
|
||||||
|
* @return Response
|
||||||
|
*/
|
||||||
|
public function choiceFormAction(Request $request)
|
||||||
|
{
|
||||||
|
if (!$request->isXmlHttpRequest() || null === $countryId = $request->query->get('countryId')) {
|
||||||
|
throw new AccessDeniedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$country = $this->getCountryRepository()->find($countryId)) {
|
||||||
|
throw new NotFoundHttpException('Requested country does not exist.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$country->hasProvinces()) {
|
||||||
|
return new JsonResponse(array('content' => false));
|
||||||
|
}
|
||||||
|
|
||||||
|
$form = $this->createProvinceChoiceForm($country);
|
||||||
|
|
||||||
|
$content = $this->renderView($this->getConfiguration()->getTemplate('_provinceChoiceForm.html'), array(
|
||||||
|
'form' => $form->createView()
|
||||||
|
));
|
||||||
|
|
||||||
|
return new JsonResponse(array(
|
||||||
|
'content' => $content
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function createNew()
|
||||||
|
{
|
||||||
|
if (null === $countryId = $this->getRequest()->get('countryId')) {
|
||||||
|
throw new NotFoundHttpException('No country given');
|
||||||
|
}
|
||||||
|
|
||||||
|
$country = $this
|
||||||
|
->getCountryController()
|
||||||
|
->findOr404(array('id' => $countryId))
|
||||||
|
;
|
||||||
|
|
||||||
|
$province = parent::createNew();
|
||||||
|
$province->setCountry($country);
|
||||||
|
|
||||||
|
return $province;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get country repository.
|
||||||
|
*
|
||||||
|
* @return ObjectRepository
|
||||||
|
*/
|
||||||
|
protected function getCountryRepository()
|
||||||
|
{
|
||||||
|
return $this->get('sylius.repository.country');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create province choice form for given country.
|
||||||
|
*
|
||||||
|
* @param CountryInterface $country
|
||||||
|
*/
|
||||||
|
protected function createProvinceChoiceForm(CountryInterface $country)
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->get('form.factory')
|
||||||
|
->createNamed('sylius_address_province', 'sylius_province_choice', null, array(
|
||||||
|
'country' => $country,
|
||||||
|
'label' => 'sylius.form.address.province',
|
||||||
|
'empty_value' => 'sylius.form.province.select'
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,173 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\DependencyInjection;
|
||||||
|
|
||||||
|
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
||||||
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||||
|
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class contains the configuration information for the bundle.
|
||||||
|
*
|
||||||
|
* This information is solely responsible for how the different configuration
|
||||||
|
* sections are normalized, and merged.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl>
|
||||||
|
*/
|
||||||
|
class Configuration implements ConfigurationInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getConfigTreeBuilder()
|
||||||
|
{
|
||||||
|
$treeBuilder = new TreeBuilder();
|
||||||
|
$rootNode = $treeBuilder->root('sylius_addressing');
|
||||||
|
|
||||||
|
$rootNode
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('driver')->isRequired()->cannotBeEmpty()->end()
|
||||||
|
->end()
|
||||||
|
;
|
||||||
|
|
||||||
|
$this->addClassesSection($rootNode);
|
||||||
|
$this->addValidationGroupsSection($rootNode);
|
||||||
|
|
||||||
|
return $treeBuilder;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds `validation_groups` section.
|
||||||
|
*
|
||||||
|
* @param ArrayNodeDefinition $node
|
||||||
|
*/
|
||||||
|
private function addValidationGroupsSection(ArrayNodeDefinition $node)
|
||||||
|
{
|
||||||
|
$node
|
||||||
|
->children()
|
||||||
|
->arrayNode('validation_groups')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->arrayNode('address')
|
||||||
|
->prototype('scalar')->end()
|
||||||
|
->defaultValue(array('sylius'))
|
||||||
|
->end()
|
||||||
|
->arrayNode('country')
|
||||||
|
->prototype('scalar')->end()
|
||||||
|
->defaultValue(array('sylius'))
|
||||||
|
->end()
|
||||||
|
->arrayNode('province')
|
||||||
|
->prototype('scalar')->end()
|
||||||
|
->defaultValue(array('sylius'))
|
||||||
|
->end()
|
||||||
|
->arrayNode('zone')
|
||||||
|
->prototype('scalar')->end()
|
||||||
|
->defaultValue(array('sylius'))
|
||||||
|
->end()
|
||||||
|
->arrayNode('zone_member')
|
||||||
|
->prototype('scalar')->end()
|
||||||
|
->defaultValue(array('sylius'))
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds `classes` section.
|
||||||
|
*
|
||||||
|
* @param ArrayNodeDefinition $node
|
||||||
|
*/
|
||||||
|
private function addClassesSection(ArrayNodeDefinition $node)
|
||||||
|
{
|
||||||
|
$node
|
||||||
|
->children()
|
||||||
|
->arrayNode('classes')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->arrayNode('address')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('model')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Model\\Address')->end()
|
||||||
|
->scalarNode('controller')->defaultValue('Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController')->end()
|
||||||
|
->scalarNode('repository')->end()
|
||||||
|
->scalarNode('form')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Form\\Type\\AddressType')->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->arrayNode('country')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('model')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Model\\Country')->end()
|
||||||
|
->scalarNode('controller')->defaultValue('Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController')->end()
|
||||||
|
->scalarNode('repository')->end()
|
||||||
|
->scalarNode('form')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Form\\Type\\CountryType')->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->arrayNode('province')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('model')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Model\\Province')->end()
|
||||||
|
->scalarNode('controller')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Controller\\ProvinceController')->end()
|
||||||
|
->scalarNode('repository')->end()
|
||||||
|
->scalarNode('form')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Form\\Type\\ProvinceType')->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->arrayNode('zone')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('model')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Model\\Zone')->end()
|
||||||
|
->scalarNode('controller')->defaultValue('Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController')->end()
|
||||||
|
->scalarNode('repository')->end()
|
||||||
|
->scalarNode('form')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Form\\Type\\ZoneType')->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->arrayNode('zone_member')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('model')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Model\\ZoneMember')->end()
|
||||||
|
->scalarNode('controller')->defaultValue('Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController')->end()
|
||||||
|
->scalarNode('repository')->end()
|
||||||
|
->scalarNode('form')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Form\\Type\\ZoneMemberType')->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->arrayNode('zone_member_country')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('model')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Model\\ZoneMemberCountry')->end()
|
||||||
|
->scalarNode('repository')->end()
|
||||||
|
->scalarNode('form')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Form\\Type\\ZoneMemberCountryType')->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->arrayNode('zone_member_province')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('model')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Model\\ZoneMemberProvince')->end()
|
||||||
|
->scalarNode('repository')->end()
|
||||||
|
->scalarNode('form')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Form\\Type\\ZoneMemberProvinceType')->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->arrayNode('zone_member_zone')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('model')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Model\\ZoneMemberZone')->end()
|
||||||
|
->scalarNode('repository')->end()
|
||||||
|
->scalarNode('form')->defaultValue('Sylius\\Bundle\\AddressingBundle\\Form\\Type\\ZoneMemberZoneType')->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\DependencyInjection;
|
||||||
|
|
||||||
|
use Sylius\Bundle\AddressingBundle\SyliusAddressingBundle;
|
||||||
|
use Symfony\Component\Config\Definition\Processor;
|
||||||
|
use Symfony\Component\Config\FileLocator;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
||||||
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Addressing system extension.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class SyliusAddressingExtension extends Extension
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function load(array $config, ContainerBuilder $container)
|
||||||
|
{
|
||||||
|
$processor = new Processor();
|
||||||
|
$configuration = new Configuration();
|
||||||
|
|
||||||
|
$config = $processor->processConfiguration($configuration, $config);
|
||||||
|
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||||
|
|
||||||
|
$driver = $config['driver'];
|
||||||
|
|
||||||
|
if (!in_array($driver, SyliusAddressingBundle::getSupportedDrivers())) {
|
||||||
|
throw new \InvalidArgumentException(sprintf('Driver "%s" is unsupported by SyliusAddressingBundle.', $driver));
|
||||||
|
}
|
||||||
|
|
||||||
|
$loader->load(sprintf('driver/%s.xml', $driver));
|
||||||
|
|
||||||
|
$container->setParameter('sylius_addressing.driver', $driver);
|
||||||
|
$container->setParameter('sylius_addressing.driver.'.$driver, true);
|
||||||
|
|
||||||
|
$classes = $config['classes'];
|
||||||
|
|
||||||
|
$this->mapClassParameters($classes, $container);
|
||||||
|
$this->mapValidationGroupParameters($config['validation_groups'], $container);
|
||||||
|
|
||||||
|
if ($container->hasParameter('sylius.config.classes')) {
|
||||||
|
$classes = array_merge($classes, $container->getParameter('sylius.config.classes'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$container->setParameter('sylius.config.classes', $classes);
|
||||||
|
|
||||||
|
$loader->load('services.xml');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remap class parameters.
|
||||||
|
*
|
||||||
|
* @param array $classes
|
||||||
|
* @param ContainerBuilder $container
|
||||||
|
*/
|
||||||
|
protected function mapClassParameters(array $classes, ContainerBuilder $container)
|
||||||
|
{
|
||||||
|
foreach ($classes as $model => $serviceClasses) {
|
||||||
|
foreach ($serviceClasses as $service => $class) {
|
||||||
|
$service = $service === 'form' ? 'form.type' : $service;
|
||||||
|
$container->setParameter(sprintf('sylius.%s.%s.class', $service, $model), $class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remap validation group parameters.
|
||||||
|
*
|
||||||
|
* @param array $classes
|
||||||
|
* @param ContainerBuilder $container
|
||||||
|
*/
|
||||||
|
protected function mapValidationGroupParameters(array $validationGroups, ContainerBuilder $container)
|
||||||
|
{
|
||||||
|
foreach ($validationGroups as $model => $groups) {
|
||||||
|
$container->setParameter(sprintf('sylius.validation_group.%s', $model), $groups);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\DataTransformer;
|
||||||
|
|
||||||
|
use Doctrine\Common\Persistence\ObjectRepository;
|
||||||
|
use Sylius\Bundle\AddressingBundle\Model\ZoneInterface;
|
||||||
|
use Symfony\Component\Form\DataTransformerInterface;
|
||||||
|
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||||
|
use Symfony\Component\PropertyAccess\PropertyAccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone to id transformer.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl>
|
||||||
|
*/
|
||||||
|
class ZoneToIdentifierTransformer implements DataTransformerInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Zone repository.
|
||||||
|
*
|
||||||
|
* @var ObjectRepository
|
||||||
|
*/
|
||||||
|
private $zoneRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identifier.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param ObjectRepository $zoneRepository
|
||||||
|
* @param string $identifier
|
||||||
|
*/
|
||||||
|
public function __construct(ObjectRepository $zoneRepository, $identifier)
|
||||||
|
{
|
||||||
|
$this->zoneRepository = $zoneRepository;
|
||||||
|
$this->identifier = $identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function transform($zone)
|
||||||
|
{
|
||||||
|
if (null === $zone) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$zone instanceof ZoneInterface) {
|
||||||
|
throw new UnexpectedTypeException($zone, 'Sylius\Bundle\AddressingBundle\Model\ZoneInterface');
|
||||||
|
}
|
||||||
|
|
||||||
|
$accessor = PropertyAccess::getPropertyAccessor();
|
||||||
|
|
||||||
|
return $accessor->getValue($zone, $this->identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function reverseTransform($value)
|
||||||
|
{
|
||||||
|
if (!$value) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->zoneRepository->findOneBy(array($this->identifier => $value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\EventListener;
|
||||||
|
|
||||||
|
use Doctrine\Common\Persistence\ObjectRepository;
|
||||||
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
|
use Symfony\Component\Form\FormEvent;
|
||||||
|
use Symfony\Component\Form\FormEvents;
|
||||||
|
use Symfony\Component\Form\FormFactoryInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This listener adds the province field to form if needed.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl>
|
||||||
|
*/
|
||||||
|
class BuildAddressFormListener implements EventSubscriberInterface
|
||||||
|
{
|
||||||
|
private $countryRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Form factory.
|
||||||
|
*
|
||||||
|
* @var FormFactoryInterface
|
||||||
|
*/
|
||||||
|
private $factory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param FormFactoryInterface $factory
|
||||||
|
*/
|
||||||
|
public function __construct(ObjectRepository $countryRepository, FormFactoryInterface $factory)
|
||||||
|
{
|
||||||
|
$this->countryRepository = $countryRepository;
|
||||||
|
$this->factory = $factory;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public static function getSubscribedEvents()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
FormEvents::PRE_SET_DATA => 'preSetData',
|
||||||
|
FormEvents::PRE_BIND => 'preBind'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes or adds a province field based on the country set.
|
||||||
|
*
|
||||||
|
* @param DataEvent $event
|
||||||
|
*/
|
||||||
|
public function preSetData(FormEvent $event)
|
||||||
|
{
|
||||||
|
$address = $event->getData();
|
||||||
|
$form = $event->getForm();
|
||||||
|
|
||||||
|
if (null === $address) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$country = $address->getCountry();
|
||||||
|
|
||||||
|
if (null === $country) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($country->hasProvinces()) {
|
||||||
|
$form->add($this->factory->createNamed('province', 'sylius_province_choice', $address->getProvince(), array(
|
||||||
|
'country' => $country, 'auto_initialize' => false
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes or adds a province field based on the country set on submitted form.
|
||||||
|
*
|
||||||
|
* @param DataEvent $event
|
||||||
|
*/
|
||||||
|
public function preBind(FormEvent $event)
|
||||||
|
{
|
||||||
|
$data = $event->getData();
|
||||||
|
$form = $event->getForm();
|
||||||
|
|
||||||
|
if ( !is_array($data) || false === array_key_exists('country', $data)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$country = $this->countryRepository->find($data['country']);
|
||||||
|
|
||||||
|
if (null === $country) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($country->hasProvinces()) {
|
||||||
|
$form->add($this->factory->createNamed('province', 'sylius_province_choice', null, array(
|
||||||
|
'country' => $country, 'auto_initialize' => false
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,168 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\EventListener;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||||
|
use Symfony\Component\Form\Extension\Core\EventListener\ResizeFormListener;
|
||||||
|
use Symfony\Component\Form\FormEvent;
|
||||||
|
use Symfony\Component\Form\FormFactoryInterface;
|
||||||
|
use Symfony\Component\Form\ResolvedFormTypeInterface;
|
||||||
|
use Symfony\Component\Security\Core\Util\ClassUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A form resize listener capable of coping with a zone member collection.
|
||||||
|
*
|
||||||
|
* @author Tim Nagel <t.nagel@infinite.net.au>
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ResizeZoneMemberCollectionListener extends ResizeFormListener
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Form factory.
|
||||||
|
*
|
||||||
|
* @var FormFactoryInterface
|
||||||
|
*/
|
||||||
|
protected $factory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores an array of Types with the Type name as the key.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $typeMap = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores an array of types with the Data Class as the key.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $classMap = array();
|
||||||
|
|
||||||
|
public function __construct(FormFactoryInterface $factory, array $prototypes, array $options = array(), $allowAdd = false, $allowDelete = false)
|
||||||
|
{
|
||||||
|
$this->factory = $factory;
|
||||||
|
|
||||||
|
foreach ($prototypes as $prototype) {
|
||||||
|
$dataClass = $prototype->getConfig()->getDataClass();
|
||||||
|
$type = $prototype->getConfig()->getType();
|
||||||
|
|
||||||
|
$typeKey = $type instanceof ResolvedFormTypeInterface ? $type->getName() : $type;
|
||||||
|
$this->typeMap[$typeKey] = $type;
|
||||||
|
$this->classMap[$dataClass] = $type;
|
||||||
|
}
|
||||||
|
|
||||||
|
$defaultType = reset($prototypes)->getConfig()->getType()->getName();
|
||||||
|
|
||||||
|
parent::__construct($defaultType, $options, $allowAdd, $allowDelete);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the form type for the supplied object. If a specific
|
||||||
|
* form type is not found, it will return the default form type.
|
||||||
|
*
|
||||||
|
* @param object $object
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function getTypeForObject($object)
|
||||||
|
{
|
||||||
|
$class = ClassUtils::getRealClass(get_class($object));
|
||||||
|
|
||||||
|
if (array_key_exists($class, $this->classMap)) {
|
||||||
|
return $this->classMap[$class];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks the form data for a hidden _type field that indicates
|
||||||
|
* the form type to use to process the data.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
*
|
||||||
|
* @return string|FormTypeInterface
|
||||||
|
* @throws \InvalidArgumentException when _type is not present or is invalid
|
||||||
|
*/
|
||||||
|
protected function getTypeForData(array $data)
|
||||||
|
{
|
||||||
|
if (!array_key_exists('_type', $data) or !array_key_exists($data['_type'], $this->typeMap)) {
|
||||||
|
throw new \InvalidArgumentException('Unable to determine the Type for given data');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->typeMap[$data['_type']];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function preSetData(FormEvent $event)
|
||||||
|
{
|
||||||
|
$form = $event->getForm();
|
||||||
|
$data = $event->getData();
|
||||||
|
|
||||||
|
if (null === $data) {
|
||||||
|
$data = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) {
|
||||||
|
throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)');
|
||||||
|
}
|
||||||
|
|
||||||
|
// First remove all rows
|
||||||
|
foreach ($form as $name => $child) {
|
||||||
|
$form->remove($name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Then add all rows again in the correct order
|
||||||
|
foreach ($data as $name => $value) {
|
||||||
|
$type = $this->getTypeForObject($value);
|
||||||
|
$form->add($this->factory->createNamed($name, $type, null, array_replace(array(
|
||||||
|
'property_path' => '['.$name.']',
|
||||||
|
'auto_initialize' => false
|
||||||
|
), $this->options)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function preBind(FormEvent $event)
|
||||||
|
{
|
||||||
|
$form = $event->getForm();
|
||||||
|
$data = $event->getData();
|
||||||
|
|
||||||
|
if (null === $data || '' === $data) {
|
||||||
|
$data = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) {
|
||||||
|
throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove all empty rows
|
||||||
|
if ($this->allowDelete) {
|
||||||
|
foreach ($form as $name => $child) {
|
||||||
|
if (!isset($data[$name])) {
|
||||||
|
$form->remove($name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add all additional rows
|
||||||
|
if ($this->allowAdd) {
|
||||||
|
foreach ($data as $name => $value) {
|
||||||
|
if (!$form->has($name)) {
|
||||||
|
$type = $this->getTypeForData($value);
|
||||||
|
$form->add($this->factory->createNamed($name, $type, null, array_replace(array(
|
||||||
|
'property_path' => '['.$name.']',
|
||||||
|
'auto_initialize' => false
|
||||||
|
), $this->options)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
112
src/Sylius/Bundle/AddressingBundle/Form/Type/AddressType.php
Normal file
112
src/Sylius/Bundle/AddressingBundle/Form/Type/AddressType.php
Normal file
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Sylius\Bundle\AddressingBundle\Form\EventListener\BuildAddressFormListener;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address form type.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class AddressType extends AbstractType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Data class.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $dataClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validation groups.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $validationGroups;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var BuildAddressFormListener
|
||||||
|
*/
|
||||||
|
protected $eventListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $dataClass
|
||||||
|
* @param array $validationGroups
|
||||||
|
* @param BuildAddressFormListener $eventListener
|
||||||
|
*/
|
||||||
|
public function __construct($dataClass, array $validationGroups, BuildAddressFormListener $eventListener)
|
||||||
|
{
|
||||||
|
$this->dataClass = $dataClass;
|
||||||
|
$this->validationGroups = $validationGroups;
|
||||||
|
$this->eventListener = $eventListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->addEventSubscriber($this->eventListener)
|
||||||
|
->add('firstName', 'text', array(
|
||||||
|
'label' => 'sylius.form.address.first_name'
|
||||||
|
))
|
||||||
|
->add('lastName', 'text', array(
|
||||||
|
'label' => 'sylius.form.address.last_name'
|
||||||
|
))
|
||||||
|
->add('company', 'text', array(
|
||||||
|
'required' => false,
|
||||||
|
'label' => 'sylius.form.address.company'
|
||||||
|
))
|
||||||
|
->add('country', 'sylius_country_choice', array(
|
||||||
|
'label' => 'sylius.form.address.country',
|
||||||
|
'empty_value' => 'sylius.form.country.select'
|
||||||
|
))
|
||||||
|
->add('street', 'text', array(
|
||||||
|
'label' => 'sylius.form.address.street'
|
||||||
|
))
|
||||||
|
->add('city', 'text', array(
|
||||||
|
'label' => 'sylius.form.address.city'
|
||||||
|
))
|
||||||
|
->add('postcode', 'text', array(
|
||||||
|
'label' => 'sylius.form.address.postcode'
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
{
|
||||||
|
$resolver
|
||||||
|
->setDefaults(array(
|
||||||
|
'data_class' => $this->dataClass,
|
||||||
|
'validation_groups' => $this->validationGroups,
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_address';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base country choice type.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
abstract class CountryChoiceType extends AbstractType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Country class name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $className
|
||||||
|
*/
|
||||||
|
public function __construct($className)
|
||||||
|
{
|
||||||
|
$this->className = $className;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
{
|
||||||
|
$resolver
|
||||||
|
->setDefaults(array(
|
||||||
|
'class' => $this->className
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_country_choice';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country choice form type for "doctrine/orm" driver.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class CountryEntityChoiceType extends CountryChoiceType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getParent()
|
||||||
|
{
|
||||||
|
return 'entity';
|
||||||
|
}
|
||||||
|
}
|
||||||
93
src/Sylius/Bundle/AddressingBundle/Form/Type/CountryType.php
Normal file
93
src/Sylius/Bundle/AddressingBundle/Form/Type/CountryType.php
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country form type.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class CountryType extends AbstractType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Data class.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $dataClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validation groups.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $validationGroups;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $dataClass
|
||||||
|
* @param array $validationGroups
|
||||||
|
*/
|
||||||
|
public function __construct($dataClass, array $validationGroups)
|
||||||
|
{
|
||||||
|
$this->dataClass = $dataClass;
|
||||||
|
$this->validationGroups = $validationGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('name', 'text', array(
|
||||||
|
'label' => 'sylius.form.country.name'
|
||||||
|
))
|
||||||
|
->add('isoName', 'text', array(
|
||||||
|
'label' => 'sylius.form.country.iso_name'
|
||||||
|
))
|
||||||
|
->add('provinces', 'collection', array(
|
||||||
|
'type' => 'sylius_province',
|
||||||
|
'allow_add' => true,
|
||||||
|
'allow_delete' => true,
|
||||||
|
'by_reference' => false,
|
||||||
|
'label' => 'sylius.form.country.provinces'
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
{
|
||||||
|
$resolver
|
||||||
|
->setDefaults(array(
|
||||||
|
'data_class' => $this->dataClass,
|
||||||
|
'validation_groups' => $this->validationGroups,
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_country';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList;
|
||||||
|
use Symfony\Component\OptionsResolver\Options;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base province choice type.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class ProvinceChoiceType extends AbstractType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Province repository.
|
||||||
|
*
|
||||||
|
* @var EntityRepository
|
||||||
|
*/
|
||||||
|
protected $repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param EntityRepository $repository
|
||||||
|
*/
|
||||||
|
public function __construct(EntityRepository $repository)
|
||||||
|
{
|
||||||
|
$this->repository = $repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
{
|
||||||
|
$repository = $this->repository;
|
||||||
|
|
||||||
|
$choiceList = function (Options $options) use ($repository) {
|
||||||
|
if (null === $options['country']) {
|
||||||
|
return new ObjectChoiceList($repository->findAll());
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ObjectChoiceList($options['country']->getProvinces());
|
||||||
|
};
|
||||||
|
|
||||||
|
$resolver
|
||||||
|
->setDefaults(array(
|
||||||
|
'choice_list' => $choiceList,
|
||||||
|
'country' => null,
|
||||||
|
'label' => 'sylius.form.address.province',
|
||||||
|
'empty_value' => 'sylius.form.province.select'
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getParent()
|
||||||
|
{
|
||||||
|
return 'choice';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_province_choice';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Province form type.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class ProvinceType extends AbstractType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Data class.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $dataClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $dataClass
|
||||||
|
* @param array $validationGroups
|
||||||
|
*/
|
||||||
|
public function __construct($dataClass, array $validationGroups)
|
||||||
|
{
|
||||||
|
$this->dataClass = $dataClass;
|
||||||
|
$this->validationGroups = $validationGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('name', 'text', array(
|
||||||
|
'label' => 'sylius.form.province.name'
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
{
|
||||||
|
$resolver
|
||||||
|
->setDefaults(array(
|
||||||
|
'data_class' => $this->dataClass,
|
||||||
|
'validation_groups' => $this->validationGroups,
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_province';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base zone choice type.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
abstract class ZoneChoiceType extends AbstractType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Country class name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $className
|
||||||
|
*/
|
||||||
|
public function __construct($className)
|
||||||
|
{
|
||||||
|
$this->className = $className;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
{
|
||||||
|
$resolver
|
||||||
|
->setDefaults(array(
|
||||||
|
'class' => $this->className
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_zone_choice';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone choice form type for "doctrine/orm" driver.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneEntityChoiceType extends ZoneChoiceType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getParent()
|
||||||
|
{
|
||||||
|
return 'entity';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Sylius\Bundle\AddressingBundle\Form\EventListener\ResizeZoneMemberCollectionListener;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Form\FormInterface;
|
||||||
|
use Symfony\Component\Form\FormTypeInterface;
|
||||||
|
use Symfony\Component\Form\FormView;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone member collection form type.
|
||||||
|
*
|
||||||
|
* @author Tim Nagel <t.nagel@infinite.net.au>
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneMemberCollectionType extends AbstractType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$prototypes = $this->buildPrototypes($builder, $options);
|
||||||
|
|
||||||
|
if ($options['allow_add'] && $options['prototype']) {
|
||||||
|
$builder->setAttribute('prototypes', $prototypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
$resizeListener = new ResizeZoneMemberCollectionListener(
|
||||||
|
$builder->getFormFactory(),
|
||||||
|
$prototypes,
|
||||||
|
$options['options'],
|
||||||
|
$options['allow_add'],
|
||||||
|
$options['allow_delete']
|
||||||
|
);
|
||||||
|
|
||||||
|
$builder->addEventSubscriber($resizeListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds prototypes for each of the form types used for the collection.
|
||||||
|
*
|
||||||
|
* @param \Symfony\Component\Form\FormBuilderInterface $builder
|
||||||
|
* @param array $options
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function buildPrototypes(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$prototypes = array();
|
||||||
|
$types = array(
|
||||||
|
'sylius_zone_member_country',
|
||||||
|
'sylius_zone_member_province',
|
||||||
|
'sylius_zone_member_zone',
|
||||||
|
);
|
||||||
|
foreach ($types as $type) {
|
||||||
|
$prototype = $this->buildPrototype($builder, $options['prototype_name'], $type, $options['options'])->getForm();
|
||||||
|
$prototypes[$type] = $prototype;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $prototypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds an individual prototype.
|
||||||
|
*
|
||||||
|
* @param \Symfony\Component\Form\FormBuilderInterface $builder
|
||||||
|
* @param string $name
|
||||||
|
* @param string|FormTypeInterface $type
|
||||||
|
* @param array $options
|
||||||
|
*
|
||||||
|
* @return \Symfony\Component\Form\FormBuilderInterface
|
||||||
|
*/
|
||||||
|
protected function buildPrototype(FormBuilderInterface $builder, $name, $type, array $options)
|
||||||
|
{
|
||||||
|
return $builder->create($name, $type, array_replace(array(
|
||||||
|
'label' => $name . 'label__',
|
||||||
|
), $options));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||||
|
{
|
||||||
|
$view->vars['allow_add'] = $options['allow_add'];
|
||||||
|
$view->vars['allow_delete'] = $options['allow_delete'];
|
||||||
|
|
||||||
|
if ($form->getConfig()->hasAttribute('prototypes')) {
|
||||||
|
$view->vars['prototypes'] = array_map(function (FormInterface $prototype) use ($view) {
|
||||||
|
return $prototype->createView($view);
|
||||||
|
}, $form->getConfig()->getAttribute('prototypes'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
{
|
||||||
|
$resolver->setDefaults(array(
|
||||||
|
'allow_add' => true,
|
||||||
|
'allow_delete' => true,
|
||||||
|
'by_reference' => false,
|
||||||
|
'prototype' => true,
|
||||||
|
'prototype_name' => '__name__',
|
||||||
|
'type_name' => '_type',
|
||||||
|
'options' => array(),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_zone_member_collection';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country zone member form type.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneMemberCountryType extends ZoneMemberType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('country', 'sylius_country_choice', array(
|
||||||
|
'label' => 'sylius.form.zone_member_country.country'
|
||||||
|
))
|
||||||
|
;
|
||||||
|
|
||||||
|
parent::buildForm($builder, $options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_zone_member_country';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Province zone member form type.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneMemberProvinceType extends ZoneMemberType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('province', 'sylius_province_choice', array(
|
||||||
|
'label' => 'sylius.form.zone_member_province.province'
|
||||||
|
))
|
||||||
|
;
|
||||||
|
|
||||||
|
parent::buildForm($builder, $options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_zone_member_province';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone member form type.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
abstract class ZoneMemberType extends AbstractType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Data class.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $dataClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validation groups.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $validationGroups;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $dataClass
|
||||||
|
* @param array $validationGroups
|
||||||
|
*/
|
||||||
|
public function __construct($dataClass, array $validationGroups)
|
||||||
|
{
|
||||||
|
$this->dataClass = $dataClass;
|
||||||
|
$this->validationGroups = $validationGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('_type', 'hidden', array(
|
||||||
|
'data' => $this->getName(),
|
||||||
|
'mapped' => false
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
{
|
||||||
|
$resolver
|
||||||
|
->setDefaults(array(
|
||||||
|
'data_class' => $this->dataClass,
|
||||||
|
'validation_groups' => $this->validationGroups,
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone member zone form type.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneMemberZoneType extends ZoneMemberType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('zone', 'sylius_zone_choice', array(
|
||||||
|
'label' => 'sylius.form.zone_member_zone.zone'
|
||||||
|
))
|
||||||
|
;
|
||||||
|
|
||||||
|
parent::buildForm($builder, $options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_zone_member_zone';
|
||||||
|
}
|
||||||
|
}
|
||||||
91
src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneType.php
Normal file
91
src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneType.php
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
|
||||||
|
use Sylius\Bundle\AddressingBundle\Model\Zone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone form type.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneType extends AbstractType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Data class.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $dataClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validation groups.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $validationGroups;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $dataClass
|
||||||
|
* @param array $validationGroups
|
||||||
|
*/
|
||||||
|
public function __construct($dataClass, array $validationGroups)
|
||||||
|
{
|
||||||
|
$this->dataClass = $dataClass;
|
||||||
|
$this->validationGroups = $validationGroups;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('name', 'text', array(
|
||||||
|
'label' => 'sylius.form.zone.name'
|
||||||
|
))
|
||||||
|
->add('type', 'choice', array(
|
||||||
|
'label' => 'sylius.form.zone.type',
|
||||||
|
'choices' => Zone::getTypeChoices(),
|
||||||
|
))
|
||||||
|
->add('members', 'sylius_zone_member_collection', array(
|
||||||
|
'label' => 'sylius.form.zone.members'
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||||
|
{
|
||||||
|
$resolver
|
||||||
|
->setDefaults(array(
|
||||||
|
'data_class' => $this->dataClass,
|
||||||
|
'validation_groups' => $this->validationGroups,
|
||||||
|
))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'sylius_zone';
|
||||||
|
}
|
||||||
|
}
|
||||||
144
src/Sylius/Bundle/AddressingBundle/Matcher/ZoneMatcher.php
Normal file
144
src/Sylius/Bundle/AddressingBundle/Matcher/ZoneMatcher.php
Normal file
|
|
@ -0,0 +1,144 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Matcher;
|
||||||
|
|
||||||
|
use Doctrine\Common\Persistence\ObjectRepository;
|
||||||
|
use Sylius\Bundle\AddressingBundle\Model\AddressInterface;
|
||||||
|
use Sylius\Bundle\AddressingBundle\Model\ZoneInterface;
|
||||||
|
use Sylius\Bundle\AddressingBundle\Model\ZoneMemberInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default zone matcher.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneMatcher implements ZoneMatcherInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Zone repository.
|
||||||
|
*
|
||||||
|
* @var ObjectRepository
|
||||||
|
*/
|
||||||
|
protected $repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param ObjectRepository $repository
|
||||||
|
*/
|
||||||
|
public function __construct(ObjectRepository $repository)
|
||||||
|
{
|
||||||
|
$this->repository = $repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function match(AddressInterface $address)
|
||||||
|
{
|
||||||
|
$zones = array();
|
||||||
|
|
||||||
|
foreach ($this->getZones() as $zone) {
|
||||||
|
if ($this->addressBelongsToZone($address, $zone)) {
|
||||||
|
$zones[$zone->getType()] = $zone;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$priorities = array(
|
||||||
|
ZoneInterface::TYPE_PROVINCE,
|
||||||
|
ZoneInterface::TYPE_COUNTRY,
|
||||||
|
ZoneInterface::TYPE_ZONE
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($priorities as $priority) {
|
||||||
|
if (isset($zones[$priority])) {
|
||||||
|
return $zones[$priority];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function matchAll(AddressInterface $address)
|
||||||
|
{
|
||||||
|
$zones = array();
|
||||||
|
|
||||||
|
foreach ($this->getZones() as $zone) {
|
||||||
|
if ($this->addressBelongsToZone($address, $zone)) {
|
||||||
|
$zones[] = $zone;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $zones;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if address belongs to zone.
|
||||||
|
*
|
||||||
|
* @param AddressInterface $address
|
||||||
|
* @param ZoneInterface $zone
|
||||||
|
*
|
||||||
|
* @return Boolean
|
||||||
|
*/
|
||||||
|
protected function addressBelongsToZone(AddressInterface $address, ZoneInterface $zone)
|
||||||
|
{
|
||||||
|
foreach ($zone->getMembers() as $member) {
|
||||||
|
if ($this->addressBelongsToZoneMember($address, $member)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if address belongs to particular zone member.
|
||||||
|
*
|
||||||
|
* @param AddressInterface $address
|
||||||
|
* @param ZoneInterface $zone
|
||||||
|
*
|
||||||
|
* @return Boolean
|
||||||
|
*/
|
||||||
|
protected function addressBelongsToZoneMember(AddressInterface $address, ZoneMemberInterface $member)
|
||||||
|
{
|
||||||
|
$type = $member->getBelongsTo()->getType();
|
||||||
|
|
||||||
|
switch ($type) {
|
||||||
|
case ZoneInterface::TYPE_PROVINCE:
|
||||||
|
return null !== $address->getProvince() && $address->getProvince() === $member->getProvince();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ZoneInterface::TYPE_COUNTRY:
|
||||||
|
return null !== $address->getCountry() && $address->getCountry() === $member->getCountry();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ZoneInterface::TYPE_ZONE:
|
||||||
|
return $this->addressBelongsToZone($address, $member->getZone());
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new \InvalidArgumentException(sprintf('Unexpected zone type "%s".', $type));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all zones
|
||||||
|
*
|
||||||
|
* @return array $zones
|
||||||
|
*/
|
||||||
|
protected function getZones()
|
||||||
|
{
|
||||||
|
return $this->repository->findAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Matcher;
|
||||||
|
|
||||||
|
use Sylius\Bundle\AddressingBundle\Model\AddressInterface;
|
||||||
|
use Sylius\Bundle\AddressingBundle\Model\ZoneInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone matcher interface.
|
||||||
|
*
|
||||||
|
* Service implementing this interface should be able to find
|
||||||
|
* best matching zones for provided address model.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
interface ZoneMatcherInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Returns best matching zone for given address.
|
||||||
|
*
|
||||||
|
* @param AddressInterface $address
|
||||||
|
*
|
||||||
|
* @return ZoneInterface|null
|
||||||
|
*/
|
||||||
|
public function match(AddressInterface $address);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns all matching zones for given address.
|
||||||
|
*
|
||||||
|
* @param AddressInterface $address
|
||||||
|
*
|
||||||
|
* @return ZoneInterface[]
|
||||||
|
*/
|
||||||
|
public function matchAll(AddressInterface $address);
|
||||||
|
}
|
||||||
312
src/Sylius/Bundle/AddressingBundle/Model/Address.php
Normal file
312
src/Sylius/Bundle/AddressingBundle/Model/Address.php
Normal file
|
|
@ -0,0 +1,312 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default address model.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class Address implements AddressInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Addres id.
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
protected $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* First name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $firstName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Last name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $lastName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Company.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $company;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country.
|
||||||
|
*
|
||||||
|
* @var CountryInterface
|
||||||
|
*/
|
||||||
|
protected $country;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Province.
|
||||||
|
*
|
||||||
|
* @var ProvinceInterface
|
||||||
|
*/
|
||||||
|
protected $province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Street.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $street;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* City.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Postcode.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $postcode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creation time.
|
||||||
|
*
|
||||||
|
* @var DateTime
|
||||||
|
*/
|
||||||
|
protected $createdAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update time.
|
||||||
|
*
|
||||||
|
* @var DateTime
|
||||||
|
*/
|
||||||
|
protected $updatedAt;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->createdAt = new \DateTime('now');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getId()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getFirstName()
|
||||||
|
{
|
||||||
|
return $this->firstName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setFirstName($firstName)
|
||||||
|
{
|
||||||
|
$this->firstName = $firstName;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getLastName()
|
||||||
|
{
|
||||||
|
return $this->lastName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setLastName($lastName)
|
||||||
|
{
|
||||||
|
$this->lastName = $lastName;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFullName()
|
||||||
|
{
|
||||||
|
return $this->firstName.' '.$this->lastName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getCompany()
|
||||||
|
{
|
||||||
|
return $this->company;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setCompany($company)
|
||||||
|
{
|
||||||
|
$this->company = $company;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getCountry()
|
||||||
|
{
|
||||||
|
return $this->country;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setCountry(CountryInterface $country = null)
|
||||||
|
{
|
||||||
|
if (null === $country) {
|
||||||
|
$this->province = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->country = $country;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getProvince()
|
||||||
|
{
|
||||||
|
return $this->province;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setProvince(ProvinceInterface $province = null)
|
||||||
|
{
|
||||||
|
if (null === $this->country) {
|
||||||
|
throw new \BadMethodCallException('Cannot define province on address without assigned country');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null !== $province && !$this->country->hasProvince($province)) {
|
||||||
|
throw new \InvalidArgumentException(sprintf(
|
||||||
|
'Cannot set province "%s", because it does not belong to country "%s"',
|
||||||
|
$province->getName(),
|
||||||
|
$this->country->getName()
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->province = $province;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isValid()
|
||||||
|
{
|
||||||
|
if (null === $this->country) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$this->country->hasProvinces()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null === $this->province) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->country->hasProvince($this->province)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getStreet()
|
||||||
|
{
|
||||||
|
return $this->street;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setStreet($street)
|
||||||
|
{
|
||||||
|
$this->street = $street;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getCity()
|
||||||
|
{
|
||||||
|
return $this->city;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setCity($city)
|
||||||
|
{
|
||||||
|
$this->city = $city;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getPostcode()
|
||||||
|
{
|
||||||
|
return $this->postcode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setPostcode($postcode)
|
||||||
|
{
|
||||||
|
$this->postcode = $postcode;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getCreatedAt()
|
||||||
|
{
|
||||||
|
return $this->createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getUpdatedAt()
|
||||||
|
{
|
||||||
|
return $this->updatedAt;
|
||||||
|
}
|
||||||
|
}
|
||||||
153
src/Sylius/Bundle/AddressingBundle/Model/AddressInterface.php
Normal file
153
src/Sylius/Bundle/AddressingBundle/Model/AddressInterface.php
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Common address model interface.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
interface AddressInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get first name.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getFirstName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set first name.
|
||||||
|
*
|
||||||
|
* @param string $firstName
|
||||||
|
*/
|
||||||
|
public function setFirstName($firstName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get last name.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getLastName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set last name.
|
||||||
|
*
|
||||||
|
* @param string $lastName
|
||||||
|
*/
|
||||||
|
public function setLastName($lastName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get company.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getCompany();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set company.
|
||||||
|
*
|
||||||
|
* @param string $company
|
||||||
|
*/
|
||||||
|
public function setCompany($company);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get country.
|
||||||
|
*
|
||||||
|
* @return CountryInterface $country
|
||||||
|
*/
|
||||||
|
public function getCountry();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set country.
|
||||||
|
*
|
||||||
|
* @param CountryInterface $country
|
||||||
|
*/
|
||||||
|
public function setCountry(CountryInterface $country = null);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get province.
|
||||||
|
*
|
||||||
|
* @return ProvinceInterface $province
|
||||||
|
*/
|
||||||
|
public function getProvince();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set province.
|
||||||
|
*
|
||||||
|
* @param ProvinceInterface $province
|
||||||
|
*/
|
||||||
|
public function setProvince(ProvinceInterface $province = null);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is country and province selection valid?
|
||||||
|
*
|
||||||
|
* @return Boolean
|
||||||
|
*/
|
||||||
|
public function isValid();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get street.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getStreet();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set street.
|
||||||
|
*
|
||||||
|
* @param string $street
|
||||||
|
*/
|
||||||
|
public function setStreet($street);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get city.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getCity();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set city.
|
||||||
|
*
|
||||||
|
* @param string $city
|
||||||
|
*/
|
||||||
|
public function setCity($city);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get postcode.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getPostcode();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set postcode.
|
||||||
|
*
|
||||||
|
* @param string $postcode
|
||||||
|
*/
|
||||||
|
public function setPostcode($postcode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get creation time.
|
||||||
|
*
|
||||||
|
* @return DateTime
|
||||||
|
*/
|
||||||
|
public function getCreatedAt();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get modification time.
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
|
public function getUpdatedAt();
|
||||||
|
}
|
||||||
147
src/Sylius/Bundle/AddressingBundle/Model/Country.php
Normal file
147
src/Sylius/Bundle/AddressingBundle/Model/Country.php
Normal file
|
|
@ -0,0 +1,147 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default country model.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class Country implements CountryInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Addres id.
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
protected $id;
|
||||||
|
protected $name;
|
||||||
|
protected $isoName;
|
||||||
|
protected $provinces;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->provinces = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __toString()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getId()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setName($name)
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getIsoName()
|
||||||
|
{
|
||||||
|
return $this->isoName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setIsoName($isoName)
|
||||||
|
{
|
||||||
|
$this->isoName = $isoName;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getProvinces()
|
||||||
|
{
|
||||||
|
return $this->provinces;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setProvinces(Collection $provinces)
|
||||||
|
{
|
||||||
|
$this->provinces = $provinces;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function hasProvinces()
|
||||||
|
{
|
||||||
|
return !$this->provinces->isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function addProvince(ProvinceInterface $province)
|
||||||
|
{
|
||||||
|
if (!$this->hasProvince($province)) {
|
||||||
|
$this->provinces->add($province);
|
||||||
|
$province->setCountry($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function removeProvince(ProvinceInterface $province)
|
||||||
|
{
|
||||||
|
if ($this->hasProvince($province)) {
|
||||||
|
$this->provinces->removeElement($province);
|
||||||
|
$province->setCountry(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function hasProvince(ProvinceInterface $province)
|
||||||
|
{
|
||||||
|
return $this->provinces->contains($province);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country interface.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
interface CountryInterface
|
||||||
|
{
|
||||||
|
public function getId();
|
||||||
|
public function getName();
|
||||||
|
public function setName($name);
|
||||||
|
public function getIsoName();
|
||||||
|
public function setIsoName($isoName);
|
||||||
|
public function getProvinces();
|
||||||
|
public function setProvinces(Collection $provinces);
|
||||||
|
public function hasProvinces();
|
||||||
|
public function addProvince(ProvinceInterface $province);
|
||||||
|
public function removeProvince(ProvinceInterface $province);
|
||||||
|
public function hasProvince(ProvinceInterface $province);
|
||||||
|
}
|
||||||
86
src/Sylius/Bundle/AddressingBundle/Model/Province.php
Normal file
86
src/Sylius/Bundle/AddressingBundle/Model/Province.php
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default province model.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
class Province implements ProvinceInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Province id.
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
protected $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country.
|
||||||
|
*
|
||||||
|
* @var CountryInterface
|
||||||
|
*/
|
||||||
|
protected $country;
|
||||||
|
|
||||||
|
public function __toString()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getId()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setName($name)
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getCountry()
|
||||||
|
{
|
||||||
|
return $this->country;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setCountry(CountryInterface $country = null)
|
||||||
|
{
|
||||||
|
$this->country = $country;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Province interface.
|
||||||
|
*
|
||||||
|
* @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
|
||||||
|
*/
|
||||||
|
interface ProvinceInterface
|
||||||
|
{
|
||||||
|
public function getId();
|
||||||
|
public function getName();
|
||||||
|
public function setName($name);
|
||||||
|
public function getCountry();
|
||||||
|
public function setCountry(CountryInterface $country = null);
|
||||||
|
}
|
||||||
193
src/Sylius/Bundle/AddressingBundle/Model/Zone.php
Normal file
193
src/Sylius/Bundle/AddressingBundle/Model/Zone.php
Normal file
|
|
@ -0,0 +1,193 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default zone model.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class Zone implements ZoneInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Zone id.
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
protected $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone type.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone members.
|
||||||
|
*
|
||||||
|
* @var ArrayCollection
|
||||||
|
*/
|
||||||
|
protected $members;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->members = new ArrayCollection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __toString()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getId()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setName($name)
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getType()
|
||||||
|
{
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setType($type)
|
||||||
|
{
|
||||||
|
if (!in_array($type, self::getTypes())) {
|
||||||
|
throw new \InvalidArgumentException('Wrong zone type supplied');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->type = $type;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns all zone types available.
|
||||||
|
*
|
||||||
|
* @return array of self::TYPE_*
|
||||||
|
*/
|
||||||
|
public static function getTypes()
|
||||||
|
{
|
||||||
|
return array_keys(self::getTypeChoices());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used in form choice field.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public static function getTypeChoices()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
self::TYPE_COUNTRY => 'Country',
|
||||||
|
self::TYPE_PROVINCE => 'Province',
|
||||||
|
self::TYPE_ZONE => 'Zone',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getMembers()
|
||||||
|
{
|
||||||
|
return $this->members;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setMembers(Collection $members)
|
||||||
|
{
|
||||||
|
$this->members = $members;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function hasMembers()
|
||||||
|
{
|
||||||
|
return !$this->members->isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function addMember(ZoneMemberInterface $member)
|
||||||
|
{
|
||||||
|
if (!$this->hasMember($member)) {
|
||||||
|
$this->members->add($member);
|
||||||
|
$member->setBelongsTo($this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function removeMember(ZoneMemberInterface $member)
|
||||||
|
{
|
||||||
|
if ($this->hasMember($member)) {
|
||||||
|
$this->members->removeElement($member);
|
||||||
|
$member->setBelongsTo(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function hasMember(ZoneMemberInterface $member)
|
||||||
|
{
|
||||||
|
return $this->members->contains($member);
|
||||||
|
}
|
||||||
|
}
|
||||||
93
src/Sylius/Bundle/AddressingBundle/Model/ZoneInterface.php
Normal file
93
src/Sylius/Bundle/AddressingBundle/Model/ZoneInterface.php
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone interface.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
interface ZoneInterface
|
||||||
|
{
|
||||||
|
const TYPE_COUNTRY = 'country';
|
||||||
|
const TYPE_PROVINCE = 'province';
|
||||||
|
const TYPE_ZONE = 'zone';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $name
|
||||||
|
*
|
||||||
|
* @return ZoneInterface
|
||||||
|
*/
|
||||||
|
public function setName($name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getType();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $type
|
||||||
|
*
|
||||||
|
* @return ZoneInterface
|
||||||
|
*/
|
||||||
|
public function setType($type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
public function getMembers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Collection $members
|
||||||
|
*
|
||||||
|
* @return ZoneInterface
|
||||||
|
*/
|
||||||
|
public function setMembers(Collection $members);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function hasMembers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ZoneMemberInterface $member
|
||||||
|
*
|
||||||
|
* @return ZoneInterface
|
||||||
|
*/
|
||||||
|
public function addMember(ZoneMemberInterface $member);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ZoneMemberInterface $member
|
||||||
|
*
|
||||||
|
* @return ZoneInterface
|
||||||
|
*/
|
||||||
|
public function removeMember(ZoneMemberInterface $member);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ZoneMemberInterface $member
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function hasMember(ZoneMemberInterface $member);
|
||||||
|
}
|
||||||
60
src/Sylius/Bundle/AddressingBundle/Model/ZoneMember.php
Normal file
60
src/Sylius/Bundle/AddressingBundle/Model/ZoneMember.php
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default zone member model.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
abstract class ZoneMember implements ZoneMemberInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Zone member id.
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
protected $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone member belongs to.
|
||||||
|
*
|
||||||
|
* @var ZoneInterface
|
||||||
|
*/
|
||||||
|
protected $belongsTo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getId()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getBelongsTo()
|
||||||
|
{
|
||||||
|
return $this->belongsTo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function setBelongsTo(ZoneInterface $belongsTo = null)
|
||||||
|
{
|
||||||
|
$this->belongsTo = $belongsTo;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default country zone member model.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneMemberCountry extends ZoneMember
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var CountryInterface
|
||||||
|
*/
|
||||||
|
protected $country;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return CountryInterface
|
||||||
|
*/
|
||||||
|
public function getCountry()
|
||||||
|
{
|
||||||
|
return $this->country;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param CountryInterface $country
|
||||||
|
*
|
||||||
|
* @return ZoneMemberCountry
|
||||||
|
*/
|
||||||
|
public function setCountry(CountryInterface $country = null)
|
||||||
|
{
|
||||||
|
$this->country = $country;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->country->getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zone member interface.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
interface ZoneMemberInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ZoneInterface
|
||||||
|
*/
|
||||||
|
public function getBelongsTo();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ZoneInterface $belongsTo
|
||||||
|
*
|
||||||
|
* @return ZoneMemberInterface
|
||||||
|
*/
|
||||||
|
public function setBelongsTo(ZoneInterface $belongsTo = null);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets zone member name.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getName();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default province zone member model.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneMemberProvince extends ZoneMember
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var ProvinceInterface
|
||||||
|
*/
|
||||||
|
protected $province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ProvinceInterface
|
||||||
|
*/
|
||||||
|
public function getProvince()
|
||||||
|
{
|
||||||
|
return $this->province;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ProvinceInterface $province
|
||||||
|
*
|
||||||
|
* @return ZoneMemberProvince
|
||||||
|
*/
|
||||||
|
public function setProvince(ProvinceInterface $province = null)
|
||||||
|
{
|
||||||
|
$this->province = $province;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->province->getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
55
src/Sylius/Bundle/AddressingBundle/Model/ZoneMemberZone.php
Normal file
55
src/Sylius/Bundle/AddressingBundle/Model/ZoneMemberZone.php
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Sylius\Bundle\AddressingBundle\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default zone member zone model.
|
||||||
|
*
|
||||||
|
* A zone can also consist of other zones.
|
||||||
|
*
|
||||||
|
* @author Саша Стаменковић <umpirsky@gmail.com>
|
||||||
|
*/
|
||||||
|
class ZoneMemberZone extends ZoneMember
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var ZoneInterface
|
||||||
|
*/
|
||||||
|
protected $zone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ZoneInterface
|
||||||
|
*/
|
||||||
|
public function getZone()
|
||||||
|
{
|
||||||
|
return $this->zone;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ZoneInterface $zone
|
||||||
|
*
|
||||||
|
* @return ZoneMemberZone
|
||||||
|
*/
|
||||||
|
public function setZone(ZoneInterface $zone = null)
|
||||||
|
{
|
||||||
|
$this->zone = $zone;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->zone->getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
78
src/Sylius/Bundle/AddressingBundle/README.md
Normal file
78
src/Sylius/Bundle/AddressingBundle/README.md
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
SyliusAddressingBundle [](http://travis-ci.org/Sylius/SyliusAddressingBundle)
|
||||||
|
======================
|
||||||
|
|
||||||
|
Addresses management is a common task for almost every ecommerce application.
|
||||||
|
This bundle, with minimal configuration, provides you sensible models and architecture for addresses, countries and provinces.
|
||||||
|
|
||||||
|
It's fully customizable - you can easily add custom fields to your address entity, or split it into several models to handle different address types.
|
||||||
|
Includes a set of forms that will be sufficient for most popular actions.
|
||||||
|
|
||||||
|
Countries can handle multiple provinces (states), and you can easily extend that to more levels by introducing your own models.
|
||||||
|
|
||||||
|
Bundle also supports very flexible Zones system, which allows you to group countries and provinces into geographical areas.
|
||||||
|
Every address can be matched against all defined zones, which is useful for tax or shipping systems.
|
||||||
|
|
||||||
|
Sylius
|
||||||
|
------
|
||||||
|
|
||||||
|
Modern ecommerce for Symfony2. Visit [Sylius.org](http://sylius.org).
|
||||||
|
|
||||||
|
[phpspec](http://phpspec.net) examples
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
$ composer install --dev --prefer-dist
|
||||||
|
$ bin/phpspec run -fpretty
|
||||||
|
```
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Documentation is available on [**docs.sylius.org**](http://docs.sylius.org/en/latest/bundles/SyliusAddressingBundle/index.html).
|
||||||
|
|
||||||
|
Contributing
|
||||||
|
------------
|
||||||
|
|
||||||
|
All informations about contributing to Sylius can be found on [this page](http://docs.sylius.org/en/latest/contributing/index.html).
|
||||||
|
|
||||||
|
Mailing lists
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Questions? Feel free to ask on [users mailing list](http://groups.google.com/group/sylius).
|
||||||
|
To contribute and develop this bundle, use the [developers mailing list](http://groups.google.com/group/sylius-dev).
|
||||||
|
|
||||||
|
Sylius twitter account
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
If you want to keep up with updates, [follow the official Sylius account on twitter](http://twitter.com/Sylius).
|
||||||
|
|
||||||
|
Bug tracking
|
||||||
|
------------
|
||||||
|
|
||||||
|
This bundle uses [GitHub issues](https://github.com/Sylius/SyliusAddressingBundle/issues).
|
||||||
|
If you have found bug, please create an issue.
|
||||||
|
|
||||||
|
Versioning
|
||||||
|
----------
|
||||||
|
|
||||||
|
Releases will be numbered with the format `major.minor.patch`.
|
||||||
|
|
||||||
|
And constructed with the following guidelines.
|
||||||
|
|
||||||
|
* Breaking backwards compatibility bumps the major.
|
||||||
|
* New additions without breaking backwards compatibility bumps the minor.
|
||||||
|
* Bug fixes and misc changes bump the patch.
|
||||||
|
|
||||||
|
For more information on SemVer, please visit [semver.org website](http://semver.org/).
|
||||||
|
This versioning method is same for all **Sylius** bundles and applications.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
-----------
|
||||||
|
|
||||||
|
License can be found [here](https://github.com/Sylius/SyliusAddressingBundle/blob/master/Resources/meta/LICENSE).
|
||||||
|
|
||||||
|
Authors
|
||||||
|
-------
|
||||||
|
|
||||||
|
The bundle was originally created by [Paweł Jędrzejewski](http://pjedrzejewski.com).
|
||||||
|
See the list of [contributors](https://github.com/Sylius/SyliusAddressingBundle/contributors).
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius sandbox application.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
(function ( $ ) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
var typeSelect = $('#sylius_zone_type');
|
||||||
|
|
||||||
|
$('form.form-horizontal').on('submit', function(e) {
|
||||||
|
$('div[id^="sylius-zone-members-"]').not('[id$="'+ typeSelect.val() +'"]').each(function () {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
typeSelect.on('change', function() {
|
||||||
|
var value = $(this).val();
|
||||||
|
$('div[id^="sylius-zone-members-"]').hide();
|
||||||
|
$('#sylius-zone-members-' + value).show();
|
||||||
|
$('a[data-collection-button="add"]')
|
||||||
|
.data('collection', 'sylius-zone-members-' + value)
|
||||||
|
.data('prototype', 'sylius-zone-members-' + value)
|
||||||
|
;
|
||||||
|
}).trigger('change');
|
||||||
|
});
|
||||||
|
})( jQuery );
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius sandbox application.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
(function ( $ ) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("select.country-select").each(function () {
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
$this.on('change', function() {
|
||||||
|
var provinceContainer = $('div.province-container');
|
||||||
|
|
||||||
|
$.get(provinceContainer.attr('data-url'), {countryId: $this.val()}, function (response) {
|
||||||
|
if (!response.content) {
|
||||||
|
provinceContainer.fadeOut('slow', function () {
|
||||||
|
provinceContainer.html('');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
provinceContainer.fadeOut('slow', function () {
|
||||||
|
$('select.select2').select2();
|
||||||
|
provinceContainer.html(response.content.replace('name="sylius_address_province"', 'name="sylius_address[province]"'));
|
||||||
|
provinceContainer.fadeIn();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if($.trim($('div.province-container').text()) === '') {
|
||||||
|
$("select.country-select").trigger("change");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})( jQuery );
|
||||||
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
|
||||||
|
xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
|
||||||
|
|
||||||
|
<mapped-superclass name="Sylius\Bundle\AddressingBundle\Model\Address" table="sylius_address">
|
||||||
|
<id name="id" column="id" type="integer">
|
||||||
|
<generator strategy="AUTO" />
|
||||||
|
</id>
|
||||||
|
|
||||||
|
<field name="firstName" column="first_name" type="string" />
|
||||||
|
<field name="lastName" column="last_name" type="string" />
|
||||||
|
|
||||||
|
<many-to-one field="country" target-entity="Sylius\Bundle\AddressingBundle\Model\CountryInterface">
|
||||||
|
<join-column name="country_id" referenced-column-name="id" />
|
||||||
|
</many-to-one>
|
||||||
|
<many-to-one field="province" target-entity="Sylius\Bundle\AddressingBundle\Model\ProvinceInterface">
|
||||||
|
<join-column name="province_id" referenced-column-name="id" />
|
||||||
|
</many-to-one>
|
||||||
|
|
||||||
|
<field name="street" column="street" type="string" />
|
||||||
|
<field name="company" column="company" type="string" nullable="true" />
|
||||||
|
<field name="city" column="city" type="string" />
|
||||||
|
<field name="postcode" column="postcode" type="string" />
|
||||||
|
|
||||||
|
<field name="createdAt" column="created_at" type="datetime">
|
||||||
|
<gedmo:timestampable on="create"/>
|
||||||
|
</field>
|
||||||
|
<field name="updatedAt" column="updated_at" type="datetime" nullable="true">
|
||||||
|
<gedmo:timestampable on="update"/>
|
||||||
|
</field>
|
||||||
|
</mapped-superclass>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping">
|
||||||
|
|
||||||
|
<mapped-superclass name="Sylius\Bundle\AddressingBundle\Model\Country" table="sylius_country">
|
||||||
|
<id name="id" column="id" type="integer">
|
||||||
|
<generator strategy="AUTO" />
|
||||||
|
</id>
|
||||||
|
|
||||||
|
<field name="name" column="name" type="string" />
|
||||||
|
<field name="isoName" column="iso_name" type="string" />
|
||||||
|
<one-to-many field="provinces" target-entity="Sylius\Bundle\AddressingBundle\Model\ProvinceInterface" mapped-by="country">
|
||||||
|
<cascade>
|
||||||
|
<cascade-all/>
|
||||||
|
</cascade>
|
||||||
|
</one-to-many>
|
||||||
|
</mapped-superclass>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping">
|
||||||
|
|
||||||
|
<mapped-superclass name="Sylius\Bundle\AddressingBundle\Model\Province" table="sylius_province">
|
||||||
|
<id name="id" column="id" type="integer">
|
||||||
|
<generator strategy="AUTO" />
|
||||||
|
</id>
|
||||||
|
|
||||||
|
<field name="name" column="name" type="string" />
|
||||||
|
|
||||||
|
<many-to-one field="country" target-entity="Sylius\Bundle\AddressingBundle\Model\CountryInterface" inversed-by="provinces">
|
||||||
|
<join-column name="country_id" referenced-column-name="id" />
|
||||||
|
</many-to-one>
|
||||||
|
</mapped-superclass>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping">
|
||||||
|
|
||||||
|
<mapped-superclass name="Sylius\Bundle\AddressingBundle\Model\Zone" table="sylius_zone">
|
||||||
|
<id name="id" column="id" type="integer">
|
||||||
|
<generator strategy="AUTO" />
|
||||||
|
</id>
|
||||||
|
|
||||||
|
<field name="name" column="name" type="string" />
|
||||||
|
<field name="type" column="type" type="string" length="8" />
|
||||||
|
|
||||||
|
<one-to-many field="members" target-entity="Sylius\Bundle\AddressingBundle\Model\ZoneMemberInterface" mapped-by="belongsTo">
|
||||||
|
<cascade>
|
||||||
|
<cascade-all/>
|
||||||
|
</cascade>
|
||||||
|
</one-to-many>
|
||||||
|
</mapped-superclass>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping">
|
||||||
|
|
||||||
|
<entity name="Sylius\Bundle\AddressingBundle\Model\ZoneMember" table="sylius_zone_member" inheritance-type="SINGLE_TABLE">
|
||||||
|
<discriminator-column name="type" type="string" field-name="type" length="8" />
|
||||||
|
<discriminator-map>
|
||||||
|
<discriminator-mapping value="country" class="Sylius\Bundle\AddressingBundle\Model\ZoneMemberCountry" />
|
||||||
|
<discriminator-mapping value="province" class="Sylius\Bundle\AddressingBundle\Model\ZoneMemberProvince" />
|
||||||
|
<discriminator-mapping value="zone" class="Sylius\Bundle\AddressingBundle\Model\ZoneMemberZone" />
|
||||||
|
</discriminator-map>
|
||||||
|
<id name="id" column="id" type="integer">
|
||||||
|
<generator strategy="AUTO" />
|
||||||
|
</id>
|
||||||
|
<many-to-one field="belongsTo" target-entity="Sylius\Bundle\AddressingBundle\Model\ZoneInterface" inversed-by="members">
|
||||||
|
<join-column name="belongs_to" referenced-column-name="id" />
|
||||||
|
</many-to-one>
|
||||||
|
</entity>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
|
||||||
|
|
||||||
|
<entity name="Sylius\Bundle\AddressingBundle\Model\ZoneMemberCountry">
|
||||||
|
<many-to-one field="country" target-entity="Sylius\Bundle\AddressingBundle\Model\CountryInterface">
|
||||||
|
<join-column name="country_id" referenced-column-name="id" />
|
||||||
|
</many-to-one>
|
||||||
|
</entity>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
|
||||||
|
|
||||||
|
<entity name="Sylius\Bundle\AddressingBundle\Model\ZoneMemberProvince">
|
||||||
|
<many-to-one field="province" target-entity="Sylius\Bundle\AddressingBundle\Model\ProvinceInterface">
|
||||||
|
<join-column name="province_id" referenced-column-name="id" />
|
||||||
|
</many-to-one>
|
||||||
|
</entity>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
|
||||||
|
|
||||||
|
<entity name="Sylius\Bundle\AddressingBundle\Model\ZoneMemberZone">
|
||||||
|
<many-to-one field="zone" target-entity="Sylius\Bundle\AddressingBundle\Model\ZoneInterface">
|
||||||
|
<join-column name="zone_id" referenced-column-name="id" />
|
||||||
|
</many-to-one>
|
||||||
|
</entity>
|
||||||
|
|
||||||
|
</doctrine-mapping>
|
||||||
|
|
@ -0,0 +1,144 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<container xmlns="http://symfony.com/schema/dic/services"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://symfony.com/schema/dic/services
|
||||||
|
http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||||
|
|
||||||
|
<parameters>
|
||||||
|
<parameter key="sylius.repository.address.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
|
||||||
|
<parameter key="sylius.repository.country.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
|
||||||
|
<parameter key="sylius.repository.province.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
|
||||||
|
<parameter key="sylius.repository.zone.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
|
||||||
|
<parameter key="sylius.repository.zone_member.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
|
||||||
|
<parameter key="sylius.repository.zone_member_country.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
|
||||||
|
<parameter key="sylius.repository.zone_member_province.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
|
||||||
|
<parameter key="sylius.repository.zone_member_zone.class">Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository</parameter>
|
||||||
|
</parameters>
|
||||||
|
|
||||||
|
<services>
|
||||||
|
<service id="sylius.manager.address" alias="doctrine.orm.entity_manager" />
|
||||||
|
<service id="sylius.repository.address" class="%sylius.repository.address.class%">
|
||||||
|
<argument type="service" id="sylius.manager.address" />
|
||||||
|
<argument type="service">
|
||||||
|
<service
|
||||||
|
factory-service="sylius.manager.address"
|
||||||
|
factory-method="getClassMetadata"
|
||||||
|
class="Doctrine\ORM\Mapping\ClassMetadata"
|
||||||
|
>
|
||||||
|
<argument>%sylius.model.address.class%</argument>
|
||||||
|
</service>
|
||||||
|
</argument>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.manager.country" alias="doctrine.orm.entity_manager" />
|
||||||
|
<service id="sylius.repository.country" class="%sylius.repository.country.class%">
|
||||||
|
<argument type="service" id="sylius.manager.country" />
|
||||||
|
<argument type="service">
|
||||||
|
<service
|
||||||
|
factory-service="sylius.manager.country"
|
||||||
|
factory-method="getClassMetadata"
|
||||||
|
class="Doctrine\ORM\Mapping\ClassMetadata"
|
||||||
|
>
|
||||||
|
<argument>%sylius.model.country.class%</argument>
|
||||||
|
</service>
|
||||||
|
</argument>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.manager.province" alias="doctrine.orm.entity_manager" />
|
||||||
|
<service id="sylius.repository.province" class="%sylius.repository.province.class%">
|
||||||
|
<argument type="service" id="sylius.manager.province" />
|
||||||
|
<argument type="service">
|
||||||
|
<service
|
||||||
|
factory-service="sylius.manager.province"
|
||||||
|
factory-method="getClassMetadata"
|
||||||
|
class="Doctrine\ORM\Mapping\ClassMetadata"
|
||||||
|
>
|
||||||
|
<argument>%sylius.model.province.class%</argument>
|
||||||
|
</service>
|
||||||
|
</argument>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.manager.zone" alias="doctrine.orm.entity_manager" />
|
||||||
|
<service id="sylius.repository.zone" class="%sylius.repository.zone.class%">
|
||||||
|
<argument type="service" id="sylius.manager.zone" />
|
||||||
|
<argument type="service">
|
||||||
|
<service
|
||||||
|
factory-service="sylius.manager.zone"
|
||||||
|
factory-method="getClassMetadata"
|
||||||
|
class="Doctrine\ORM\Mapping\ClassMetadata"
|
||||||
|
>
|
||||||
|
<argument>%sylius.model.zone.class%</argument>
|
||||||
|
</service>
|
||||||
|
</argument>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.manager.zone_member_country" alias="doctrine.orm.entity_manager" />
|
||||||
|
<service id="sylius.repository.zone_member_country" class="%sylius.repository.zone_member_country.class%">
|
||||||
|
<argument type="service" id="sylius.manager.zone_member_country" />
|
||||||
|
<argument type="service">
|
||||||
|
<service
|
||||||
|
factory-service="sylius.manager.zone_member_country"
|
||||||
|
factory-method="getClassMetadata"
|
||||||
|
class="Doctrine\ORM\Mapping\ClassMetadata"
|
||||||
|
>
|
||||||
|
<argument>%sylius.model.zone_member_country.class%</argument>
|
||||||
|
</service>
|
||||||
|
</argument>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.manager.zone_member" alias="doctrine.orm.entity_manager" />
|
||||||
|
<service id="sylius.repository.zone_member" class="%sylius.repository.zone_member.class%">
|
||||||
|
<argument type="service" id="sylius.manager.zone_member" />
|
||||||
|
<argument type="service">
|
||||||
|
<service
|
||||||
|
factory-service="sylius.manager.zone_member"
|
||||||
|
factory-method="getClassMetadata"
|
||||||
|
class="Doctrine\ORM\Mapping\ClassMetadata"
|
||||||
|
>
|
||||||
|
<argument>%sylius.model.zone_member.class%</argument>
|
||||||
|
</service>
|
||||||
|
</argument>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.manager.zone_member_province" alias="doctrine.orm.entity_manager" />
|
||||||
|
<service id="sylius.repository.zone_member_province" class="%sylius.repository.zone_member_province.class%">
|
||||||
|
<argument type="service" id="sylius.manager.zone_member_province" />
|
||||||
|
<argument type="service">
|
||||||
|
<service
|
||||||
|
factory-service="sylius.manager.zone_member_province"
|
||||||
|
factory-method="getClassMetadata"
|
||||||
|
class="Doctrine\ORM\Mapping\ClassMetadata"
|
||||||
|
>
|
||||||
|
<argument>%sylius.model.zone_member_province.class%</argument>
|
||||||
|
</service>
|
||||||
|
</argument>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.manager.zone_member_zone" alias="doctrine.orm.entity_manager" />
|
||||||
|
<service id="sylius.repository.zone_member_zone" class="%sylius.repository.zone_member_zone.class%">
|
||||||
|
<argument type="service" id="sylius.manager.zone_member_zone" />
|
||||||
|
<argument type="service">
|
||||||
|
<service
|
||||||
|
factory-service="sylius.manager.zone_member_zone"
|
||||||
|
factory-method="getClassMetadata"
|
||||||
|
class="Doctrine\ORM\Mapping\ClassMetadata"
|
||||||
|
>
|
||||||
|
<argument>%sylius.model.zone_member_zone.class%</argument>
|
||||||
|
</service>
|
||||||
|
</argument>
|
||||||
|
</service>
|
||||||
|
</services>
|
||||||
|
|
||||||
|
</container>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
# This file is part of the Sylius sandbox application.
|
||||||
|
# (c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
sylius_address:
|
||||||
|
prefix: /addresses
|
||||||
|
resource: @SyliusAddressingBundle/Resources/config/routing/address.yml
|
||||||
|
|
||||||
|
sylius_country:
|
||||||
|
prefix: /countries
|
||||||
|
resource: @SyliusAddressingBundle/Resources/config/routing/country.yml
|
||||||
|
|
||||||
|
sylius_province:
|
||||||
|
prefix: /countries/{countryId}/provinces
|
||||||
|
resource: @SyliusAddressingBundle/Resources/config/routing/province.yml
|
||||||
|
|
||||||
|
sylius_zone:
|
||||||
|
prefix: /zones
|
||||||
|
resource: @SyliusAddressingBundle/Resources/config/routing/zone.yml
|
||||||
|
|
||||||
|
sylius_zone_member:
|
||||||
|
prefix: /zones/{zoneId}/members
|
||||||
|
resource: @SyliusAddressingBundle/Resources/config/routing/zone_member.yml
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
# This file is part of the Sylius sandbox application.
|
||||||
|
# (c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
sylius_address_list:
|
||||||
|
pattern: /
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.address:indexAction
|
||||||
|
_sortable: true
|
||||||
|
_sorting:
|
||||||
|
updatedAt: desc
|
||||||
|
|
||||||
|
sylius_address_create:
|
||||||
|
pattern: /create
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.address:createAction
|
||||||
|
|
||||||
|
sylius_address_update:
|
||||||
|
pattern: /{id}/update
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.address:updateAction
|
||||||
|
|
||||||
|
sylius_address_delete:
|
||||||
|
pattern: /{id}/delete
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.address:deleteAction
|
||||||
|
|
||||||
|
sylius_address_show:
|
||||||
|
pattern: /{id}
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.address:showAction
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
# This file is part of the Sylius sandbox application.
|
||||||
|
# (c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
sylius_country_list:
|
||||||
|
pattern: /
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.country:indexAction
|
||||||
|
_paginate: 50
|
||||||
|
|
||||||
|
sylius_country_create:
|
||||||
|
pattern: /create
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.country:createAction
|
||||||
|
_redirect: sylius_country_list
|
||||||
|
|
||||||
|
sylius_country_update:
|
||||||
|
pattern: /{id}/update
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.country:updateAction
|
||||||
|
_redirect: sylius_country_list
|
||||||
|
|
||||||
|
sylius_country_delete:
|
||||||
|
pattern: /{id}/delete
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.country:deleteAction
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
# This file is part of the Sylius sandbox application.
|
||||||
|
# (c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
sylius_province_create:
|
||||||
|
pattern: /create
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.province:createAction
|
||||||
|
_redirect: sylius_country_list
|
||||||
|
|
||||||
|
sylius_province_update:
|
||||||
|
pattern: /{id}/update
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.province:updateAction
|
||||||
|
_redirect: sylius_country_list
|
||||||
|
|
||||||
|
sylius_province_delete:
|
||||||
|
pattern: /{id}/delete
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.province:deleteAction
|
||||||
|
|
||||||
|
sylius_province_choice_form:
|
||||||
|
pattern: /choice-form
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.province:choiceFormAction
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
# This file is part of the Sylius sandbox application.
|
||||||
|
# (c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
sylius_zone_list:
|
||||||
|
pattern: /
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.zone:indexAction
|
||||||
|
|
||||||
|
sylius_zone_create:
|
||||||
|
pattern: /create
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.zone:createAction
|
||||||
|
|
||||||
|
sylius_zone_update:
|
||||||
|
pattern: /{id}/update
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.zone:updateAction
|
||||||
|
|
||||||
|
sylius_zone_delete:
|
||||||
|
pattern: /{id}/delete
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.zone:deleteAction
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# This file is part of the Sylius sandbox application.
|
||||||
|
# (c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
sylius_zone_member_delete:
|
||||||
|
pattern: /{id}/delete
|
||||||
|
defaults:
|
||||||
|
_controller: sylius.controller.zone_member:deleteAction
|
||||||
|
_redirect: sylius_zone_list
|
||||||
134
src/Sylius/Bundle/AddressingBundle/Resources/config/services.xml
Normal file
134
src/Sylius/Bundle/AddressingBundle/Resources/config/services.xml
Normal file
|
|
@ -0,0 +1,134 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<container xmlns="http://symfony.com/schema/dic/services"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://symfony.com/schema/dic/services
|
||||||
|
http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||||
|
|
||||||
|
<parameters>
|
||||||
|
<parameter key="sylius.form.type.country_choice.class">Sylius\Bundle\AddressingBundle\Form\Type\CountryEntityChoiceType</parameter>
|
||||||
|
<parameter key="sylius.form.type.province_choice.class">Sylius\Bundle\AddressingBundle\Form\Type\ProvinceChoiceType</parameter>
|
||||||
|
<parameter key="sylius.form.type.zone_choice.class">Sylius\Bundle\AddressingBundle\Form\Type\ZoneEntityChoiceType</parameter>
|
||||||
|
<parameter key="sylius.form.type.zone_member_collection.class">Sylius\Bundle\AddressingBundle\Form\Type\ZoneMemberCollectionType</parameter>
|
||||||
|
<parameter key="sylius.form.listener.address.class">Sylius\Bundle\AddressingBundle\Form\EventListener\BuildAddressFormListener</parameter>
|
||||||
|
<parameter key="sylius.zone_matcher.class">Sylius\Bundle\AddressingBundle\Matcher\ZoneMatcher</parameter>
|
||||||
|
</parameters>
|
||||||
|
|
||||||
|
<services>
|
||||||
|
<service id="sylius.controller.address" class="%sylius.controller.address.class%">
|
||||||
|
<argument>sylius</argument>
|
||||||
|
<argument>address</argument>
|
||||||
|
<argument>SyliusAddressingBundle:Address</argument>
|
||||||
|
<call method="setContainer">
|
||||||
|
<argument type="service" id="service_container" />
|
||||||
|
</call>
|
||||||
|
</service>
|
||||||
|
<service id="sylius.controller.country" class="%sylius.controller.country.class%">
|
||||||
|
<argument>sylius</argument>
|
||||||
|
<argument>country</argument>
|
||||||
|
<argument>SyliusAddressingBundle:Country</argument>
|
||||||
|
<call method="setContainer">
|
||||||
|
<argument type="service" id="service_container" />
|
||||||
|
</call>
|
||||||
|
</service>
|
||||||
|
<service id="sylius.controller.province" class="%sylius.controller.province.class%">
|
||||||
|
<argument>sylius</argument>
|
||||||
|
<argument>province</argument>
|
||||||
|
<argument>SyliusAddressingBundle:Province</argument>
|
||||||
|
<call method="setContainer">
|
||||||
|
<argument type="service" id="service_container" />
|
||||||
|
</call>
|
||||||
|
</service>
|
||||||
|
<service id="sylius.controller.zone" class="%sylius.controller.zone.class%">
|
||||||
|
<argument>sylius</argument>
|
||||||
|
<argument>zone</argument>
|
||||||
|
<argument>SyliusAddressingBundle:Zone</argument>
|
||||||
|
<call method="setContainer">
|
||||||
|
<argument type="service" id="service_container" />
|
||||||
|
</call>
|
||||||
|
</service>
|
||||||
|
<service id="sylius.controller.zone_member" class="%sylius.controller.zone_member.class%">
|
||||||
|
<argument>sylius</argument>
|
||||||
|
<argument>zone_member</argument>
|
||||||
|
<argument>SyliusAddressingBundle:ZoneMember</argument>
|
||||||
|
<call method="setContainer">
|
||||||
|
<argument type="service" id="service_container" />
|
||||||
|
</call>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.form.type.zone_member_collection" class="%sylius.form.type.zone_member_collection.class%">
|
||||||
|
<argument>%sylius.model.zone.class%</argument>
|
||||||
|
<tag name="form.type" alias="sylius_zone_member_collection" />
|
||||||
|
</service>
|
||||||
|
<service id="sylius.form.type.address" class="%sylius.form.type.address.class%">
|
||||||
|
<argument>%sylius.model.address.class%</argument>
|
||||||
|
<argument>%sylius.validation_group.address%</argument>
|
||||||
|
<argument type="service" id="sylius.form.listener.address" />
|
||||||
|
<tag name="form.type" alias="sylius_address" />
|
||||||
|
</service>
|
||||||
|
<service id="sylius.form.type.country" class="%sylius.form.type.country.class%">
|
||||||
|
<argument>%sylius.model.country.class%</argument>
|
||||||
|
<argument>%sylius.validation_group.country%</argument>
|
||||||
|
<tag name="form.type" alias="sylius_country" />
|
||||||
|
</service>
|
||||||
|
<service id="sylius.form.type.province" class="%sylius.form.type.province.class%">
|
||||||
|
<argument>%sylius.model.province.class%</argument>
|
||||||
|
<argument>%sylius.validation_group.province%</argument>
|
||||||
|
<tag name="form.type" alias="sylius_province" />
|
||||||
|
</service>
|
||||||
|
<service id="sylius.form.type.zone" class="%sylius.form.type.zone.class%">
|
||||||
|
<argument>%sylius.model.zone.class%</argument>
|
||||||
|
<argument>%sylius.validation_group.zone%</argument>
|
||||||
|
<tag name="form.type" alias="sylius_zone" />
|
||||||
|
</service>
|
||||||
|
<service id="sylius.form.type.zone_member_country" class="%sylius.form.type.zone_member_country.class%">
|
||||||
|
<argument>%sylius.model.zone_member_country.class%</argument>
|
||||||
|
<argument>%sylius.validation_group.zone_member%</argument>
|
||||||
|
<tag name="form.type" alias="sylius_zone_member_country" />
|
||||||
|
</service>
|
||||||
|
<service id="sylius.form.type.zone_member_province" class="%sylius.form.type.zone_member_province.class%">
|
||||||
|
<argument>%sylius.model.zone_member_province.class%</argument>
|
||||||
|
<argument>%sylius.validation_group.zone_member%</argument>
|
||||||
|
<tag name="form.type" alias="sylius_zone_member_province" />
|
||||||
|
</service>
|
||||||
|
<service id="sylius.form.type.zone_member_zone" class="%sylius.form.type.zone_member_zone.class%">
|
||||||
|
<argument>%sylius.model.zone_member_zone.class%</argument>
|
||||||
|
<argument>%sylius.validation_group.zone_member%</argument>
|
||||||
|
<tag name="form.type" alias="sylius_zone_member_zone" />
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.form.type.country_choice" class="%sylius.form.type.country_choice.class%">
|
||||||
|
<argument>%sylius.model.country.class%</argument>
|
||||||
|
<tag name="form.type" alias="sylius_country_choice" />
|
||||||
|
</service>
|
||||||
|
<service id="sylius.form.type.province_choice" class="%sylius.form.type.province_choice.class%">
|
||||||
|
<argument type="service" id="sylius.repository.province" />
|
||||||
|
<tag name="form.type" alias="sylius_province_choice" />
|
||||||
|
</service>
|
||||||
|
<service id="sylius.form.type.zone_choice" class="%sylius.form.type.zone_choice.class%">
|
||||||
|
<argument>%sylius.model.zone.class%</argument>
|
||||||
|
<tag name="form.type" alias="sylius_zone_choice" />
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.form.listener.address" class="%sylius.form.listener.address.class%">
|
||||||
|
<argument type="service" id="sylius.repository.country" />
|
||||||
|
<argument type="service" id="form.factory" />
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service id="sylius.zone_matcher" class="%sylius.zone_matcher.class%">
|
||||||
|
<argument type="service" id="sylius.repository.zone" />
|
||||||
|
</service>
|
||||||
|
</services>
|
||||||
|
|
||||||
|
</container>
|
||||||
|
|
@ -0,0 +1,171 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file is part of the Sylius package.
|
||||||
|
|
||||||
|
(c) Paweł Jędrzejewski
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
|
||||||
|
http://symfony.com/schema/dic/services/constraint-mapping-1.0.xsd">
|
||||||
|
|
||||||
|
<class name="Sylius\Bundle\AddressingBundle\Model\Address">
|
||||||
|
<property name="firstName">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.address.first_name.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
<constraint name="Length">
|
||||||
|
<option name="min">2</option>
|
||||||
|
<option name="max">255</option>
|
||||||
|
<option name="minMessage">sylius.address.first_name.min_length</option>
|
||||||
|
<option name="maxMessage">sylius.address.first_name.max_length</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
<property name="lastName">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.address.last_name.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
|
||||||
|
<constraint name="Length">
|
||||||
|
<option name="min">2</option>
|
||||||
|
<option name="max">255</option>
|
||||||
|
<option name="minMessage">sylius.address.last_name.min_length</option>
|
||||||
|
<option name="maxMessage">sylius.address.last_name.max_length</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
<property name="country">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.address.country.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
<getter property="valid">
|
||||||
|
<constraint name="True">
|
||||||
|
<option name="message">sylius.address.province.valid</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</getter>
|
||||||
|
<property name="street">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.address.street.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
<constraint name="Length">
|
||||||
|
<option name="min">2</option>
|
||||||
|
<option name="max">255</option>
|
||||||
|
<option name="minMessage">sylius.address.street.min_length</option>
|
||||||
|
<option name="maxMessage">sylius.address.street.max_length</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
<property name="city">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.address.city.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
<constraint name="Length">
|
||||||
|
<option name="min">2</option>
|
||||||
|
<option name="max">255</option>
|
||||||
|
<option name="minMessage">sylius.address.city.min_length</option>
|
||||||
|
<option name="maxMessage">sylius.address.city.max_length</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
<property name="postcode">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.address.postcode.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
<constraint name="Length">
|
||||||
|
<option name="min">2</option>
|
||||||
|
<option name="max">255</option>
|
||||||
|
<option name="minMessage">sylius.address.postcode.min_length</option>
|
||||||
|
<option name="maxMessage">sylius.address.postcode.max_length</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
</class>
|
||||||
|
|
||||||
|
<class name="Sylius\Bundle\AddressingBundle\Model\Country">
|
||||||
|
<property name="name">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.country.name.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
<constraint name="Length">
|
||||||
|
<option name="min">2</option>
|
||||||
|
<option name="max">255</option>
|
||||||
|
<option name="maxMessage">sylius.country.name.min_length</option>
|
||||||
|
<option name="maxMessage">sylius.country.name.max_length</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
<property name="isoName">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.country.iso_name.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
<constraint name="Length">
|
||||||
|
<option name="min">2</option>
|
||||||
|
<option name="max">2</option>
|
||||||
|
<option name="exactMessage">sylius.country.iso_name.exact_length</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
<property name="provinces">
|
||||||
|
<constraint name="Valid" />
|
||||||
|
</property>
|
||||||
|
</class>
|
||||||
|
|
||||||
|
<class name="Sylius\Bundle\AddressingBundle\Model\Province">
|
||||||
|
<property name="name">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.province.name.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
<constraint name="Length">
|
||||||
|
<option name="min">2</option>
|
||||||
|
<option name="max">255</option>
|
||||||
|
<option name="minMessage">sylius.province.name.min_length</option>
|
||||||
|
<option name="maxMessage">sylius.province.name.max_length</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
</class>
|
||||||
|
|
||||||
|
<class name="Sylius\Bundle\AddressingBundle\Model\Zone">
|
||||||
|
<property name="name">
|
||||||
|
<constraint name="NotBlank">
|
||||||
|
<option name="message">sylius.zone.name.not_blank</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
<constraint name="Length">
|
||||||
|
<option name="min">2</option>
|
||||||
|
<option name="max">255</option>
|
||||||
|
<option name="minMessage">sylius.zone.name.max_length</option>
|
||||||
|
<option name="maxMessage">sylius.zone.name.max_length</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
<property name="members">
|
||||||
|
<constraint name="Valid" />
|
||||||
|
<constraint name="Count">
|
||||||
|
<option name="min">1</option>
|
||||||
|
<option name="minMessage">sylius.zone.members.min_count</option>
|
||||||
|
<option name="groups">sylius</option>
|
||||||
|
</constraint>
|
||||||
|
</property>
|
||||||
|
</class>
|
||||||
|
|
||||||
|
</constraint-mapping>
|
||||||
19
src/Sylius/Bundle/AddressingBundle/Resources/meta/LICENSE
Normal file
19
src/Sylius/Bundle/AddressingBundle/Resources/meta/LICENSE
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
Copyright (c) 2011-2013 Paweł Jędrzejewski
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="en" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="30d6b7cae83842de6b0be3436b49fa57" resname="sylius.form.address.city">
|
||||||
|
<source>sylius.form.address.city</source>
|
||||||
|
<target>City</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="4c4207c09a6a7e137d70a1fb5bf2c309" resname="sylius.form.address.company">
|
||||||
|
<source>sylius.form.address.company</source>
|
||||||
|
<target>Company</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="bc3c6def58ace06a88e26fb873f4697b" resname="sylius.form.address.country">
|
||||||
|
<source>sylius.form.address.country</source>
|
||||||
|
<target>Country</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e1eaef329d355a008d8fddf6c6bb301a" resname="sylius.form.address.first_name">
|
||||||
|
<source>sylius.form.address.first_name</source>
|
||||||
|
<target>First name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1e33909fd1ed82313af82cc10d3d9680" resname="sylius.form.address.last_name">
|
||||||
|
<source>sylius.form.address.last_name</source>
|
||||||
|
<target>Last name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="14bde8608db160b03c70945fcdf62613" resname="sylius.form.address.postcode">
|
||||||
|
<source>sylius.form.address.postcode</source>
|
||||||
|
<target>Postcode</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f4bdea11ce109e29f1101090b84f0b80" resname="sylius.form.address.street">
|
||||||
|
<source>sylius.form.address.street</source>
|
||||||
|
<target>Street</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="00522dcfbec9b5e1ac9cbf39d62d1692" resname="sylius.form.country.iso_name">
|
||||||
|
<source>sylius.form.country.iso_name</source>
|
||||||
|
<target>ISO name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1a9ff4ef54c3d6850913dd85da9995b5" resname="sylius.form.country.name">
|
||||||
|
<source>sylius.form.country.name</source>
|
||||||
|
<target>Name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb2f23317fa10e33b0eb423a814aea67" resname="sylius.form.country.provinces">
|
||||||
|
<source>sylius.form.country.provinces</source>
|
||||||
|
<target>Provinces</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0232425332ba32edd83d5c3dfe8a6080" resname="sylius.form.country.select">
|
||||||
|
<source>sylius.form.country.select</source>
|
||||||
|
<target>Select</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="90c305763d958c3dd319253193a69c4e" resname="sylius.form.province.name">
|
||||||
|
<source>sylius.form.province.name</source>
|
||||||
|
<target>Name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2df1138e962c235812c817d080de1b73" resname="sylius.form.zone.members">
|
||||||
|
<source>sylius.form.zone.members</source>
|
||||||
|
<target>Members</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e8988be3de9b838c9dbe0d836ca6b3f0" resname="sylius.form.zone.name">
|
||||||
|
<source>sylius.form.zone.name</source>
|
||||||
|
<target>Name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ff8121a85e95c9c38c36fcd73d10041c" resname="sylius.form.zone.type">
|
||||||
|
<source>sylius.form.zone.type</source>
|
||||||
|
<target>Type</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="907717f6664a9fb26a9c117ee17d2972" resname="sylius.form.zone_member_country.country">
|
||||||
|
<source>sylius.form.zone_member_country.country</source>
|
||||||
|
<target>Country</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="9006ddea149a0842bf0daea9f5db0ebb" resname="sylius.form.zone_member_province.province">
|
||||||
|
<source>sylius.form.zone_member_province.province</source>
|
||||||
|
<target>Province</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="358a5aa568f76607395efcbdccd4d036" resname="sylius.form.zone_member_zone.zone">
|
||||||
|
<source>sylius.form.zone_member_zone.zone</source>
|
||||||
|
<target>Zone</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="es" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="30d6b7cae83842de6b0be3436b49fa57" resname="sylius.form.address.city">
|
||||||
|
<source>sylius.form.address.city</source>
|
||||||
|
<target>Ciudad</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="bc3c6def58ace06a88e26fb873f4697b" resname="sylius.form.address.country">
|
||||||
|
<source>sylius.form.address.country</source>
|
||||||
|
<target>País</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e1eaef329d355a008d8fddf6c6bb301a" resname="sylius.form.address.first_name">
|
||||||
|
<source>sylius.form.address.first_name</source>
|
||||||
|
<target>Nombre</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1e33909fd1ed82313af82cc10d3d9680" resname="sylius.form.address.last_name">
|
||||||
|
<source>sylius.form.address.last_name</source>
|
||||||
|
<target>Apellido</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="14bde8608db160b03c70945fcdf62613" resname="sylius.form.address.postcode">
|
||||||
|
<source>sylius.form.address.postcode</source>
|
||||||
|
<target>Código postal</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f4bdea11ce109e29f1101090b84f0b80" resname="sylius.form.address.street">
|
||||||
|
<source>sylius.form.address.street</source>
|
||||||
|
<target>Calle</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="00522dcfbec9b5e1ac9cbf39d62d1692" resname="sylius.form.country.iso_name">
|
||||||
|
<source>sylius.form.country.iso_name</source>
|
||||||
|
<target>Nombre ISO</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1a9ff4ef54c3d6850913dd85da9995b5" resname="sylius.form.country.name">
|
||||||
|
<source>sylius.form.country.name</source>
|
||||||
|
<target>Nombre</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb2f23317fa10e33b0eb423a814aea67" resname="sylius.form.country.provinces">
|
||||||
|
<source>sylius.form.country.provinces</source>
|
||||||
|
<target>Estados</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0232425332ba32edd83d5c3dfe8a6080" resname="sylius.form.country.select">
|
||||||
|
<source>sylius.form.country.select</source>
|
||||||
|
<target>sylius.form.country.select</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="90c305763d958c3dd319253193a69c4e" resname="sylius.form.province.name">
|
||||||
|
<source>sylius.form.province.name</source>
|
||||||
|
<target>Nombre</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2df1138e962c235812c817d080de1b73" resname="sylius.form.zone.members">
|
||||||
|
<source>sylius.form.zone.members</source>
|
||||||
|
<target>Miembros</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e8988be3de9b838c9dbe0d836ca6b3f0" resname="sylius.form.zone.name">
|
||||||
|
<source>sylius.form.zone.name</source>
|
||||||
|
<target>Nombre</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ff8121a85e95c9c38c36fcd73d10041c" resname="sylius.form.zone.type">
|
||||||
|
<source>sylius.form.zone.type</source>
|
||||||
|
<target>Tipo</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="907717f6664a9fb26a9c117ee17d2972" resname="sylius.form.zone_member_country.country">
|
||||||
|
<source>sylius.form.zone_member_country.country</source>
|
||||||
|
<target>País</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="9006ddea149a0842bf0daea9f5db0ebb" resname="sylius.form.zone_member_province.province">
|
||||||
|
<source>sylius.form.zone_member_province.province</source>
|
||||||
|
<target>Estado</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="358a5aa568f76607395efcbdccd4d036" resname="sylius.form.zone_member_zone.zone">
|
||||||
|
<source>sylius.form.zone_member_zone.zone</source>
|
||||||
|
<target>Zona</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="fa_IR" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="30d6b7cae83842de6b0be3436b49fa57" resname="sylius.form.address.city">
|
||||||
|
<source>sylius.form.address.city</source>
|
||||||
|
<target>شهر</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="bc3c6def58ace06a88e26fb873f4697b" resname="sylius.form.address.country">
|
||||||
|
<source>sylius.form.address.country</source>
|
||||||
|
<target>sylius.form.address.country</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e1eaef329d355a008d8fddf6c6bb301a" resname="sylius.form.address.first_name">
|
||||||
|
<source>sylius.form.address.first_name</source>
|
||||||
|
<target>نام</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1e33909fd1ed82313af82cc10d3d9680" resname="sylius.form.address.last_name">
|
||||||
|
<source>sylius.form.address.last_name</source>
|
||||||
|
<target>نام خانوادگی</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="14bde8608db160b03c70945fcdf62613" resname="sylius.form.address.postcode">
|
||||||
|
<source>sylius.form.address.postcode</source>
|
||||||
|
<target>کد پستی</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f4bdea11ce109e29f1101090b84f0b80" resname="sylius.form.address.street">
|
||||||
|
<source>sylius.form.address.street</source>
|
||||||
|
<target>آدرس</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="00522dcfbec9b5e1ac9cbf39d62d1692" resname="sylius.form.country.iso_name">
|
||||||
|
<source>sylius.form.country.iso_name</source>
|
||||||
|
<target>sylius.form.country.iso_name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1a9ff4ef54c3d6850913dd85da9995b5" resname="sylius.form.country.name">
|
||||||
|
<source>sylius.form.country.name</source>
|
||||||
|
<target>sylius.form.country.name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb2f23317fa10e33b0eb423a814aea67" resname="sylius.form.country.provinces">
|
||||||
|
<source>sylius.form.country.provinces</source>
|
||||||
|
<target>sylius.form.country.provinces</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0232425332ba32edd83d5c3dfe8a6080" resname="sylius.form.country.select">
|
||||||
|
<source>sylius.form.country.select</source>
|
||||||
|
<target>sylius.form.country.select</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="90c305763d958c3dd319253193a69c4e" resname="sylius.form.province.name">
|
||||||
|
<source>sylius.form.province.name</source>
|
||||||
|
<target>sylius.form.province.name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2df1138e962c235812c817d080de1b73" resname="sylius.form.zone.members">
|
||||||
|
<source>sylius.form.zone.members</source>
|
||||||
|
<target>sylius.form.zone.members</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e8988be3de9b838c9dbe0d836ca6b3f0" resname="sylius.form.zone.name">
|
||||||
|
<source>sylius.form.zone.name</source>
|
||||||
|
<target>sylius.form.zone.name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ff8121a85e95c9c38c36fcd73d10041c" resname="sylius.form.zone.type">
|
||||||
|
<source>sylius.form.zone.type</source>
|
||||||
|
<target>sylius.form.zone.type</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="907717f6664a9fb26a9c117ee17d2972" resname="sylius.form.zone_member_country.country">
|
||||||
|
<source>sylius.form.zone_member_country.country</source>
|
||||||
|
<target>sylius.form.zone_member_country.country</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="9006ddea149a0842bf0daea9f5db0ebb" resname="sylius.form.zone_member_province.province">
|
||||||
|
<source>sylius.form.zone_member_province.province</source>
|
||||||
|
<target>sylius.form.zone_member_province.province</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="358a5aa568f76607395efcbdccd4d036" resname="sylius.form.zone_member_zone.zone">
|
||||||
|
<source>sylius.form.zone_member_zone.zone</source>
|
||||||
|
<target>sylius.form.zone_member_zone.zone</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="fr" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="30d6b7cae83842de6b0be3436b49fa57" resname="sylius.form.address.city">
|
||||||
|
<source>sylius.form.address.city</source>
|
||||||
|
<target>Ville</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="bc3c6def58ace06a88e26fb873f4697b" resname="sylius.form.address.country">
|
||||||
|
<source>sylius.form.address.country</source>
|
||||||
|
<target>sylius.form.address.country</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e1eaef329d355a008d8fddf6c6bb301a" resname="sylius.form.address.first_name">
|
||||||
|
<source>sylius.form.address.first_name</source>
|
||||||
|
<target>Prénom</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1e33909fd1ed82313af82cc10d3d9680" resname="sylius.form.address.last_name">
|
||||||
|
<source>sylius.form.address.last_name</source>
|
||||||
|
<target>Nom</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="14bde8608db160b03c70945fcdf62613" resname="sylius.form.address.postcode">
|
||||||
|
<source>sylius.form.address.postcode</source>
|
||||||
|
<target>Code postal</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f4bdea11ce109e29f1101090b84f0b80" resname="sylius.form.address.street">
|
||||||
|
<source>sylius.form.address.street</source>
|
||||||
|
<target>Adresse</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="00522dcfbec9b5e1ac9cbf39d62d1692" resname="sylius.form.country.iso_name">
|
||||||
|
<source>sylius.form.country.iso_name</source>
|
||||||
|
<target>sylius.form.country.iso_name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1a9ff4ef54c3d6850913dd85da9995b5" resname="sylius.form.country.name">
|
||||||
|
<source>sylius.form.country.name</source>
|
||||||
|
<target>sylius.form.country.name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb2f23317fa10e33b0eb423a814aea67" resname="sylius.form.country.provinces">
|
||||||
|
<source>sylius.form.country.provinces</source>
|
||||||
|
<target>sylius.form.country.provinces</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0232425332ba32edd83d5c3dfe8a6080" resname="sylius.form.country.select">
|
||||||
|
<source>sylius.form.country.select</source>
|
||||||
|
<target>sylius.form.country.select</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="90c305763d958c3dd319253193a69c4e" resname="sylius.form.province.name">
|
||||||
|
<source>sylius.form.province.name</source>
|
||||||
|
<target>sylius.form.province.name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2df1138e962c235812c817d080de1b73" resname="sylius.form.zone.members">
|
||||||
|
<source>sylius.form.zone.members</source>
|
||||||
|
<target>sylius.form.zone.members</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e8988be3de9b838c9dbe0d836ca6b3f0" resname="sylius.form.zone.name">
|
||||||
|
<source>sylius.form.zone.name</source>
|
||||||
|
<target>sylius.form.zone.name</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ff8121a85e95c9c38c36fcd73d10041c" resname="sylius.form.zone.type">
|
||||||
|
<source>sylius.form.zone.type</source>
|
||||||
|
<target>sylius.form.zone.type</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="907717f6664a9fb26a9c117ee17d2972" resname="sylius.form.zone_member_country.country">
|
||||||
|
<source>sylius.form.zone_member_country.country</source>
|
||||||
|
<target>sylius.form.zone_member_country.country</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="9006ddea149a0842bf0daea9f5db0ebb" resname="sylius.form.zone_member_province.province">
|
||||||
|
<source>sylius.form.zone_member_province.province</source>
|
||||||
|
<target>sylius.form.zone_member_province.province</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="358a5aa568f76607395efcbdccd4d036" resname="sylius.form.zone_member_zone.zone">
|
||||||
|
<source>sylius.form.zone_member_zone.zone</source>
|
||||||
|
<target>sylius.form.zone_member_zone.zone</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="it" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="30d6b7cae83842de6b0be3436b49fa57" resname="sylius.form.address.city">
|
||||||
|
<source>sylius.form.address.city</source>
|
||||||
|
<target>Città</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="4c4207c09a6a7e137d70a1fb5bf2c309" resname="sylius.form.address.company">
|
||||||
|
<source>sylius.form.address.company</source>
|
||||||
|
<target>Azienda</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="bc3c6def58ace06a88e26fb873f4697b" resname="sylius.form.address.country">
|
||||||
|
<source>sylius.form.address.country</source>
|
||||||
|
<target>Nazione</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e1eaef329d355a008d8fddf6c6bb301a" resname="sylius.form.address.first_name">
|
||||||
|
<source>sylius.form.address.first_name</source>
|
||||||
|
<target>Nome</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1e33909fd1ed82313af82cc10d3d9680" resname="sylius.form.address.last_name">
|
||||||
|
<source>sylius.form.address.last_name</source>
|
||||||
|
<target>Cognome</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="14bde8608db160b03c70945fcdf62613" resname="sylius.form.address.postcode">
|
||||||
|
<source>sylius.form.address.postcode</source>
|
||||||
|
<target>CAP</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f4bdea11ce109e29f1101090b84f0b80" resname="sylius.form.address.street">
|
||||||
|
<source>sylius.form.address.street</source>
|
||||||
|
<target>Indirizzo</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="00522dcfbec9b5e1ac9cbf39d62d1692" resname="sylius.form.country.iso_name">
|
||||||
|
<source>sylius.form.country.iso_name</source>
|
||||||
|
<target>Nome ISO</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1a9ff4ef54c3d6850913dd85da9995b5" resname="sylius.form.country.name">
|
||||||
|
<source>sylius.form.country.name</source>
|
||||||
|
<target>Nome</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb2f23317fa10e33b0eb423a814aea67" resname="sylius.form.country.provinces">
|
||||||
|
<source>sylius.form.country.provinces</source>
|
||||||
|
<target>Provincia</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0232425332ba32edd83d5c3dfe8a6080" resname="sylius.form.country.select">
|
||||||
|
<source>sylius.form.country.select</source>
|
||||||
|
<target>Scegli</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="90c305763d958c3dd319253193a69c4e" resname="sylius.form.province.name">
|
||||||
|
<source>sylius.form.province.name</source>
|
||||||
|
<target>Nome</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2df1138e962c235812c817d080de1b73" resname="sylius.form.zone.members">
|
||||||
|
<source>sylius.form.zone.members</source>
|
||||||
|
<target>Membri</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e8988be3de9b838c9dbe0d836ca6b3f0" resname="sylius.form.zone.name">
|
||||||
|
<source>sylius.form.zone.name</source>
|
||||||
|
<target>Nome</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ff8121a85e95c9c38c36fcd73d10041c" resname="sylius.form.zone.type">
|
||||||
|
<source>sylius.form.zone.type</source>
|
||||||
|
<target>Tipo</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="907717f6664a9fb26a9c117ee17d2972" resname="sylius.form.zone_member_country.country">
|
||||||
|
<source>sylius.form.zone_member_country.country</source>
|
||||||
|
<target>Nazione</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="9006ddea149a0842bf0daea9f5db0ebb" resname="sylius.form.zone_member_province.province">
|
||||||
|
<source>sylius.form.zone_member_province.province</source>
|
||||||
|
<target>Provincia</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="358a5aa568f76607395efcbdccd4d036" resname="sylius.form.zone_member_zone.zone">
|
||||||
|
<source>sylius.form.zone_member_zone.zone</source>
|
||||||
|
<target>Zona</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="nl" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="30d6b7cae83842de6b0be3436b49fa57" resname="sylius.form.address.city">
|
||||||
|
<source>sylius.form.address.city</source>
|
||||||
|
<target>Plaats</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="bc3c6def58ace06a88e26fb873f4697b" resname="sylius.form.address.country">
|
||||||
|
<source>sylius.form.address.country</source>
|
||||||
|
<target>Land</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e1eaef329d355a008d8fddf6c6bb301a" resname="sylius.form.address.first_name">
|
||||||
|
<source>sylius.form.address.first_name</source>
|
||||||
|
<target>Voorname</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1e33909fd1ed82313af82cc10d3d9680" resname="sylius.form.address.last_name">
|
||||||
|
<source>sylius.form.address.last_name</source>
|
||||||
|
<target>Achtername</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="14bde8608db160b03c70945fcdf62613" resname="sylius.form.address.postcode">
|
||||||
|
<source>sylius.form.address.postcode</source>
|
||||||
|
<target>Postcode</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f4bdea11ce109e29f1101090b84f0b80" resname="sylius.form.address.street">
|
||||||
|
<source>sylius.form.address.street</source>
|
||||||
|
<target>Straat</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="00522dcfbec9b5e1ac9cbf39d62d1692" resname="sylius.form.country.iso_name">
|
||||||
|
<source>sylius.form.country.iso_name</source>
|
||||||
|
<target>ISO naam</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1a9ff4ef54c3d6850913dd85da9995b5" resname="sylius.form.country.name">
|
||||||
|
<source>sylius.form.country.name</source>
|
||||||
|
<target>Naam</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb2f23317fa10e33b0eb423a814aea67" resname="sylius.form.country.provinces">
|
||||||
|
<source>sylius.form.country.provinces</source>
|
||||||
|
<target>Provincies</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0232425332ba32edd83d5c3dfe8a6080" resname="sylius.form.country.select">
|
||||||
|
<source>sylius.form.country.select</source>
|
||||||
|
<target>sylius.form.country.select</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="90c305763d958c3dd319253193a69c4e" resname="sylius.form.province.name">
|
||||||
|
<source>sylius.form.province.name</source>
|
||||||
|
<target>Naam</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2df1138e962c235812c817d080de1b73" resname="sylius.form.zone.members">
|
||||||
|
<source>sylius.form.zone.members</source>
|
||||||
|
<target>Leden</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e8988be3de9b838c9dbe0d836ca6b3f0" resname="sylius.form.zone.name">
|
||||||
|
<source>sylius.form.zone.name</source>
|
||||||
|
<target>Naam</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ff8121a85e95c9c38c36fcd73d10041c" resname="sylius.form.zone.type">
|
||||||
|
<source>sylius.form.zone.type</source>
|
||||||
|
<target>Type</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="907717f6664a9fb26a9c117ee17d2972" resname="sylius.form.zone_member_country.country">
|
||||||
|
<source>sylius.form.zone_member_country.country</source>
|
||||||
|
<target>Land</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="9006ddea149a0842bf0daea9f5db0ebb" resname="sylius.form.zone_member_province.province">
|
||||||
|
<source>sylius.form.zone_member_province.province</source>
|
||||||
|
<target>Provincie</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="358a5aa568f76607395efcbdccd4d036" resname="sylius.form.zone_member_zone.zone">
|
||||||
|
<source>sylius.form.zone_member_zone.zone</source>
|
||||||
|
<target>Zone</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="pl" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="30d6b7cae83842de6b0be3436b49fa57" resname="sylius.form.address.city">
|
||||||
|
<source>sylius.form.address.city</source>
|
||||||
|
<target>Miejscowość</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="bc3c6def58ace06a88e26fb873f4697b" resname="sylius.form.address.country">
|
||||||
|
<source>sylius.form.address.country</source>
|
||||||
|
<target>Kraj</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e1eaef329d355a008d8fddf6c6bb301a" resname="sylius.form.address.first_name">
|
||||||
|
<source>sylius.form.address.first_name</source>
|
||||||
|
<target>Imię</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1e33909fd1ed82313af82cc10d3d9680" resname="sylius.form.address.last_name">
|
||||||
|
<source>sylius.form.address.last_name</source>
|
||||||
|
<target>Nazwisko</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="14bde8608db160b03c70945fcdf62613" resname="sylius.form.address.postcode">
|
||||||
|
<source>sylius.form.address.postcode</source>
|
||||||
|
<target>Kod pocztowy</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f4bdea11ce109e29f1101090b84f0b80" resname="sylius.form.address.street">
|
||||||
|
<source>sylius.form.address.street</source>
|
||||||
|
<target>Adres</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="00522dcfbec9b5e1ac9cbf39d62d1692" resname="sylius.form.country.iso_name">
|
||||||
|
<source>sylius.form.country.iso_name</source>
|
||||||
|
<target>Kod ISO</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1a9ff4ef54c3d6850913dd85da9995b5" resname="sylius.form.country.name">
|
||||||
|
<source>sylius.form.country.name</source>
|
||||||
|
<target>Nazwa</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb2f23317fa10e33b0eb423a814aea67" resname="sylius.form.country.provinces">
|
||||||
|
<source>sylius.form.country.provinces</source>
|
||||||
|
<target>Województwa</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0232425332ba32edd83d5c3dfe8a6080" resname="sylius.form.country.select">
|
||||||
|
<source>sylius.form.country.select</source>
|
||||||
|
<target>Wybierz</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="90c305763d958c3dd319253193a69c4e" resname="sylius.form.province.name">
|
||||||
|
<source>sylius.form.province.name</source>
|
||||||
|
<target>Nazwa</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2df1138e962c235812c817d080de1b73" resname="sylius.form.zone.members">
|
||||||
|
<source>sylius.form.zone.members</source>
|
||||||
|
<target>Kraje należące do strefy</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e8988be3de9b838c9dbe0d836ca6b3f0" resname="sylius.form.zone.name">
|
||||||
|
<source>sylius.form.zone.name</source>
|
||||||
|
<target>Nazwa</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ff8121a85e95c9c38c36fcd73d10041c" resname="sylius.form.zone.type">
|
||||||
|
<source>sylius.form.zone.type</source>
|
||||||
|
<target>Typ</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="907717f6664a9fb26a9c117ee17d2972" resname="sylius.form.zone_member_country.country">
|
||||||
|
<source>sylius.form.zone_member_country.country</source>
|
||||||
|
<target>Kraj</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="9006ddea149a0842bf0daea9f5db0ebb" resname="sylius.form.zone_member_province.province">
|
||||||
|
<source>sylius.form.zone_member_province.province</source>
|
||||||
|
<target>Województwo</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="358a5aa568f76607395efcbdccd4d036" resname="sylius.form.zone_member_zone.zone">
|
||||||
|
<source>sylius.form.zone_member_zone.zone</source>
|
||||||
|
<target>Strefa</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="ru" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="30d6b7cae83842de6b0be3436b49fa57" resname="sylius.form.address.city">
|
||||||
|
<source>sylius.form.address.city</source>
|
||||||
|
<target>Город</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="bc3c6def58ace06a88e26fb873f4697b" resname="sylius.form.address.country">
|
||||||
|
<source>sylius.form.address.country</source>
|
||||||
|
<target>Страна</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e1eaef329d355a008d8fddf6c6bb301a" resname="sylius.form.address.first_name">
|
||||||
|
<source>sylius.form.address.first_name</source>
|
||||||
|
<target>Имя</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1e33909fd1ed82313af82cc10d3d9680" resname="sylius.form.address.last_name">
|
||||||
|
<source>sylius.form.address.last_name</source>
|
||||||
|
<target>Фамилия</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="14bde8608db160b03c70945fcdf62613" resname="sylius.form.address.postcode">
|
||||||
|
<source>sylius.form.address.postcode</source>
|
||||||
|
<target>Индекс</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f4bdea11ce109e29f1101090b84f0b80" resname="sylius.form.address.street">
|
||||||
|
<source>sylius.form.address.street</source>
|
||||||
|
<target>Улица</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="00522dcfbec9b5e1ac9cbf39d62d1692" resname="sylius.form.country.iso_name">
|
||||||
|
<source>sylius.form.country.iso_name</source>
|
||||||
|
<target>ISO код</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="1a9ff4ef54c3d6850913dd85da9995b5" resname="sylius.form.country.name">
|
||||||
|
<source>sylius.form.country.name</source>
|
||||||
|
<target>Наименование</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb2f23317fa10e33b0eb423a814aea67" resname="sylius.form.country.provinces">
|
||||||
|
<source>sylius.form.country.provinces</source>
|
||||||
|
<target>Области</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0232425332ba32edd83d5c3dfe8a6080" resname="sylius.form.country.select">
|
||||||
|
<source>sylius.form.country.select</source>
|
||||||
|
<target>Выбрать</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="90c305763d958c3dd319253193a69c4e" resname="sylius.form.province.name">
|
||||||
|
<source>sylius.form.province.name</source>
|
||||||
|
<target>Наименование</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2df1138e962c235812c817d080de1b73" resname="sylius.form.zone.members">
|
||||||
|
<source>sylius.form.zone.members</source>
|
||||||
|
<target>Области</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e8988be3de9b838c9dbe0d836ca6b3f0" resname="sylius.form.zone.name">
|
||||||
|
<source>sylius.form.zone.name</source>
|
||||||
|
<target>Наименование</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ff8121a85e95c9c38c36fcd73d10041c" resname="sylius.form.zone.type">
|
||||||
|
<source>sylius.form.zone.type</source>
|
||||||
|
<target>Тип</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="907717f6664a9fb26a9c117ee17d2972" resname="sylius.form.zone_member_country.country">
|
||||||
|
<source>sylius.form.zone_member_country.country</source>
|
||||||
|
<target>Страна</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="9006ddea149a0842bf0daea9f5db0ebb" resname="sylius.form.zone_member_province.province">
|
||||||
|
<source>sylius.form.zone_member_province.province</source>
|
||||||
|
<target>Область</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="358a5aa568f76607395efcbdccd4d036" resname="sylius.form.zone_member_zone.zone">
|
||||||
|
<source>sylius.form.zone_member_zone.zone</source>
|
||||||
|
<target>Округ</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="en" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="4cd9195643343df2e0718b76c84b0e61" resname="sylius.address.city.max_length">
|
||||||
|
<source>sylius.address.city.max_length</source>
|
||||||
|
<target>City must not be longer than 255 characters|City must not be longer than 255 characters.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="5e64f28e013767d9d9052c5962c52839" resname="sylius.address.city.min_length">
|
||||||
|
<source>sylius.address.city.min_length</source>
|
||||||
|
<target>City must be at least 2 characters long|City must be at least 2 characters long.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="594a3a47d5f964256ec0b564afd517fc" resname="sylius.address.city.not_blank">
|
||||||
|
<source>sylius.address.city.not_blank</source>
|
||||||
|
<target>Please enter city.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="4d3a803eb489ffaeea16b07683fd39b6" resname="sylius.address.country.not_blank">
|
||||||
|
<source>sylius.address.country.not_blank</source>
|
||||||
|
<target>Please select country.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e252a88f87165620971393df7c314712" resname="sylius.address.first_name.max_length">
|
||||||
|
<source>sylius.address.first_name.max_length</source>
|
||||||
|
<target>First name must not be longer than 255 characters|First name must not be longer than 255 characters.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="a5c95b252bcb6c28191bce06e8bfb207" resname="sylius.address.first_name.min_length">
|
||||||
|
<source>sylius.address.first_name.min_length</source>
|
||||||
|
<target>First name must be at least 2 characters long|First name must be at least 2 characters long.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9655e0e8621e76ef71899cb818dfc20" resname="sylius.address.first_name.not_blank">
|
||||||
|
<source>sylius.address.first_name.not_blank</source>
|
||||||
|
<target>Please enter first name.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb4e92106b0cceb7e0dfdf61b9b18407" resname="sylius.address.last_name.max_length">
|
||||||
|
<source>sylius.address.last_name.max_length</source>
|
||||||
|
<target>Last name must not be longer than 255 characters|Last name must not be longer than 255 characters.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2480b94251a02c47bef7c3aba4b1ab93" resname="sylius.address.last_name.min_length">
|
||||||
|
<source>sylius.address.last_name.min_length</source>
|
||||||
|
<target>Last name must be at least 2 characters long|Last name must be at least 2 characters long.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7fe433ec5724f8661f5abb73f802a100" resname="sylius.address.last_name.not_blank">
|
||||||
|
<source>sylius.address.last_name.not_blank</source>
|
||||||
|
<target>Please enter last name.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0558d4aeb03ea384f20cc700dd82c82a" resname="sylius.address.postcode.max_length">
|
||||||
|
<source>sylius.address.postcode.max_length</source>
|
||||||
|
<target>Postcode must not be longer than 255 characters|Postcode must not be longer than 255 characters.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7f21a001520d738294163c6846caea33" resname="sylius.address.postcode.min_length">
|
||||||
|
<source>sylius.address.postcode.min_length</source>
|
||||||
|
<target>Postcode must be at least 2 characters long|Postcode must be at least 2 characters long.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0bb933abd4f0217d4d1e2d521b60b9ef" resname="sylius.address.postcode.not_blank">
|
||||||
|
<source>sylius.address.postcode.not_blank</source>
|
||||||
|
<target>Please enter postcode.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0a5ba0dfc005b06148f006a3e51a2643" resname="sylius.address.province.valid">
|
||||||
|
<source>sylius.address.province.valid</source>
|
||||||
|
<target>Please select proper province.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="79a20c64ff0131a40b96664c3b7555d7" resname="sylius.address.street.max_length">
|
||||||
|
<source>sylius.address.street.max_length</source>
|
||||||
|
<target>Street must not be longer than 255 characters|Street must not be longer than 255 characters.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="858516d3703954d8e45cb2f6a2ec0a66" resname="sylius.address.street.min_length">
|
||||||
|
<source>sylius.address.street.min_length</source>
|
||||||
|
<target>Street must be at least 2 characters long|Street must be at least 2 characters long.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="cf60b55d4dbd7a0bfb9b770bfca9b1fb" resname="sylius.address.street.not_blank">
|
||||||
|
<source>sylius.address.street.not_blank</source>
|
||||||
|
<target>Please enter street.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="297fe83c9650547bae5e88505cd9dd40" resname="sylius.country.iso_name.not_blank">
|
||||||
|
<source>sylius.country.iso_name.not_blank</source>
|
||||||
|
<target>Please enter country ISO code.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="254a443f9ab6f5e0dd9574db7afcffa2" resname="sylius.country.name.max_length">
|
||||||
|
<source>sylius.country.name.max_length</source>
|
||||||
|
<target>Country Name must not be longer than 255 characters|Country Name must not be longer than 255 characters.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="8877699fed4ff2ec488e3f819fc5c777" resname="sylius.country.name.not_blank">
|
||||||
|
<source>sylius.country.name.not_blank</source>
|
||||||
|
<target>Please enter country name.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7226e2da1b30b33c37f32f40d755a722" resname="sylius.province.name.max_length">
|
||||||
|
<source>sylius.province.name.max_length</source>
|
||||||
|
<target>Province name must not be longer than 255 characters|Province name must not be longer than 255 characters.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2dcf7777230a72d2c6f7c4f94f797150" resname="sylius.province.name.min_length">
|
||||||
|
<source>sylius.province.name.min_length</source>
|
||||||
|
<target>Province name must be at least 2 characters long|Province name must be at least 2 characters long.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9c7fe354d624dabeea17830a8e5973f" resname="sylius.province.name.not_blank">
|
||||||
|
<source>sylius.province.name.not_blank</source>
|
||||||
|
<target>Please enter province name.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="b0f64f444c33a62394f6feb2ebcd743c" resname="sylius.zone.members.min_count">
|
||||||
|
<source>sylius.zone.members.min_count</source>
|
||||||
|
<target>Please add at least {{ limit }} zone member.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ef3addb393985a9e74e90c1e070dcdb7" resname="sylius.zone.name.max_length">
|
||||||
|
<source>sylius.zone.name.max_length</source>
|
||||||
|
<target>Zone name must not be longer than 255 characters|Zone name must not be longer than 255 characters.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="104cd1e655781eb8b0401c01ca772463" resname="sylius.zone.name.not_blank">
|
||||||
|
<source>sylius.zone.name.not_blank</source>
|
||||||
|
<target>Please enter zone name.</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="es" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="4cd9195643343df2e0718b76c84b0e61" resname="sylius.address.city.max_length">
|
||||||
|
<source>sylius.address.city.max_length</source>
|
||||||
|
<target>La ciudad no debe tener más de 255 caracteres|La ciudad no debe tener más de 255 caracteres.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="5e64f28e013767d9d9052c5962c52839" resname="sylius.address.city.min_length">
|
||||||
|
<source>sylius.address.city.min_length</source>
|
||||||
|
<target>La ciudad cuándo menos debe tener 2 caracteres de largo|La ciudad debe tener cuándo menos 2 caracteres de largo.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="594a3a47d5f964256ec0b564afd517fc" resname="sylius.address.city.not_blank">
|
||||||
|
<source>sylius.address.city.not_blank</source>
|
||||||
|
<target>Por favor ingresa la ciudad.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="4d3a803eb489ffaeea16b07683fd39b6" resname="sylius.address.country.not_blank">
|
||||||
|
<source>sylius.address.country.not_blank</source>
|
||||||
|
<target>Por favor selecciona un país.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e252a88f87165620971393df7c314712" resname="sylius.address.first_name.max_length">
|
||||||
|
<source>sylius.address.first_name.max_length</source>
|
||||||
|
<target>El nombre no debe contener más de 255 caracteres|El nombre no debe contener más de 255 caracteres.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="a5c95b252bcb6c28191bce06e8bfb207" resname="sylius.address.first_name.min_length">
|
||||||
|
<source>sylius.address.first_name.min_length</source>
|
||||||
|
<target>El nombre debe ser de cuándo menos 2 caracteres de largo|El nombre debe ser de cuándo menos 2 caracteres de largo.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9655e0e8621e76ef71899cb818dfc20" resname="sylius.address.first_name.not_blank">
|
||||||
|
<source>sylius.address.first_name.not_blank</source>
|
||||||
|
<target>Por favor ingresa tu nombre.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb4e92106b0cceb7e0dfdf61b9b18407" resname="sylius.address.last_name.max_length">
|
||||||
|
<source>sylius.address.last_name.max_length</source>
|
||||||
|
<target>El apellido no debe ser de más de 255 caracteres|El apellido no debe contener más de 255 caracteres.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2480b94251a02c47bef7c3aba4b1ab93" resname="sylius.address.last_name.min_length">
|
||||||
|
<source>sylius.address.last_name.min_length</source>
|
||||||
|
<target>El apellido debe ser de cuándo menos 2 caracteres de largo|El apellido debe constar de cuándo menos 2 caracteres de largo.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7fe433ec5724f8661f5abb73f802a100" resname="sylius.address.last_name.not_blank">
|
||||||
|
<source>sylius.address.last_name.not_blank</source>
|
||||||
|
<target>Por favor ingresa tu apellido.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0558d4aeb03ea384f20cc700dd82c82a" resname="sylius.address.postcode.max_length">
|
||||||
|
<source>sylius.address.postcode.max_length</source>
|
||||||
|
<target>El código postal no debe tener más de 255 caracteres|El código postal no debe tener más de 255 caracteres.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7f21a001520d738294163c6846caea33" resname="sylius.address.postcode.min_length">
|
||||||
|
<source>sylius.address.postcode.min_length</source>
|
||||||
|
<target>El código postal cuándo menso debe tener 2 caracteres de largo|El código postal debe tener por lo menos 2 caracteres de largo.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0bb933abd4f0217d4d1e2d521b60b9ef" resname="sylius.address.postcode.not_blank">
|
||||||
|
<source>sylius.address.postcode.not_blank</source>
|
||||||
|
<target>Por favor ingresa el código postal.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0a5ba0dfc005b06148f006a3e51a2643" resname="sylius.address.province.valid">
|
||||||
|
<source>sylius.address.province.valid</source>
|
||||||
|
<target>Por favor selecciona el estado apropiado.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="79a20c64ff0131a40b96664c3b7555d7" resname="sylius.address.street.max_length">
|
||||||
|
<source>sylius.address.street.max_length</source>
|
||||||
|
<target>La calle no debe ser de más de 255 caracteres|La calle no debe tener más de 255 caracteres.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="858516d3703954d8e45cb2f6a2ec0a66" resname="sylius.address.street.min_length">
|
||||||
|
<source>sylius.address.street.min_length</source>
|
||||||
|
<target>La calle cuándo menos debe ser de 2 caracteres de largo|La calle debe ser de cuándo menos 2 caracteres de largo.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="cf60b55d4dbd7a0bfb9b770bfca9b1fb" resname="sylius.address.street.not_blank">
|
||||||
|
<source>sylius.address.street.not_blank</source>
|
||||||
|
<target>Por favor ingresa la calle.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="297fe83c9650547bae5e88505cd9dd40" resname="sylius.country.iso_name.not_blank">
|
||||||
|
<source>sylius.country.iso_name.not_blank</source>
|
||||||
|
<target>Por favor ingresa el código ISO del país.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="254a443f9ab6f5e0dd9574db7afcffa2" resname="sylius.country.name.max_length">
|
||||||
|
<source>sylius.country.name.max_length</source>
|
||||||
|
<target>El nombre del país no debe ser de más de 255 caracteres|El nombre no debe tener más de 255 caracteres.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="8877699fed4ff2ec488e3f819fc5c777" resname="sylius.country.name.not_blank">
|
||||||
|
<source>sylius.country.name.not_blank</source>
|
||||||
|
<target>Por favor ingresa el nombre del país.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7226e2da1b30b33c37f32f40d755a722" resname="sylius.province.name.max_length">
|
||||||
|
<source>sylius.province.name.max_length</source>
|
||||||
|
<target>El nombre del estado no debe tener más de 255 caracteres|El nombre no debe tener más de 255 caracteres.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2dcf7777230a72d2c6f7c4f94f797150" resname="sylius.province.name.min_length">
|
||||||
|
<source>sylius.province.name.min_length</source>
|
||||||
|
<target>El nombre del estado cuándo menos debe ser de 2 caracteres de largo|El nombre cuándo menos debe tener 2 caracteres.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9c7fe354d624dabeea17830a8e5973f" resname="sylius.province.name.not_blank">
|
||||||
|
<source>sylius.province.name.not_blank</source>
|
||||||
|
<target>Por favor ingresa el nombre del estado.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="b0f64f444c33a62394f6feb2ebcd743c" resname="sylius.zone.members.min_count">
|
||||||
|
<source>sylius.zone.members.min_count</source>
|
||||||
|
<target>Por favor agrega cuándo menos {{ limit }} miembro(s) a la zona.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ef3addb393985a9e74e90c1e070dcdb7" resname="sylius.zone.name.max_length">
|
||||||
|
<source>sylius.zone.name.max_length</source>
|
||||||
|
<target>El nombre de la zona no debe tener más de 255 caracteres|El nombre no debe tener más de 255 caracteres.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="104cd1e655781eb8b0401c01ca772463" resname="sylius.zone.name.not_blank">
|
||||||
|
<source>sylius.zone.name.not_blank</source>
|
||||||
|
<target>Por favor ingresa el nombre de la zona.</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="fr" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="4cd9195643343df2e0718b76c84b0e61" resname="sylius.address.city.max_length">
|
||||||
|
<source>sylius.address.city.max_length</source>
|
||||||
|
<target>Le nom de la ville ne doit pas être plus long que 255 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="5e64f28e013767d9d9052c5962c52839" resname="sylius.address.city.min_length">
|
||||||
|
<source>sylius.address.city.min_length</source>
|
||||||
|
<target>Le nom de la ville doit être plus long que 2 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="594a3a47d5f964256ec0b564afd517fc" resname="sylius.address.city.not_blank">
|
||||||
|
<source>sylius.address.city.not_blank</source>
|
||||||
|
<target>Veuillez entrer une ville</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="4d3a803eb489ffaeea16b07683fd39b6" resname="sylius.address.country.not_blank">
|
||||||
|
<source>sylius.address.country.not_blank</source>
|
||||||
|
<target>sylius.address.country.not_blank</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e252a88f87165620971393df7c314712" resname="sylius.address.first_name.max_length">
|
||||||
|
<source>sylius.address.first_name.max_length</source>
|
||||||
|
<target>Le prénom ne doit pas être plus long que 255 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="a5c95b252bcb6c28191bce06e8bfb207" resname="sylius.address.first_name.min_length">
|
||||||
|
<source>sylius.address.first_name.min_length</source>
|
||||||
|
<target>Le prénom doit être plus long que 2 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9655e0e8621e76ef71899cb818dfc20" resname="sylius.address.first_name.not_blank">
|
||||||
|
<source>sylius.address.first_name.not_blank</source>
|
||||||
|
<target>Veuillez entrer votre prénom</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb4e92106b0cceb7e0dfdf61b9b18407" resname="sylius.address.last_name.max_length">
|
||||||
|
<source>sylius.address.last_name.max_length</source>
|
||||||
|
<target>Le prénom ne doit pas être plus long que 255 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2480b94251a02c47bef7c3aba4b1ab93" resname="sylius.address.last_name.min_length">
|
||||||
|
<source>sylius.address.last_name.min_length</source>
|
||||||
|
<target>Le nom doit être plus long que 2 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7fe433ec5724f8661f5abb73f802a100" resname="sylius.address.last_name.not_blank">
|
||||||
|
<source>sylius.address.last_name.not_blank</source>
|
||||||
|
<target>Veuillez entrer votre nom</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0558d4aeb03ea384f20cc700dd82c82a" resname="sylius.address.postcode.max_length">
|
||||||
|
<source>sylius.address.postcode.max_length</source>
|
||||||
|
<target>Le code postal ne doit pas être plus long que 255 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7f21a001520d738294163c6846caea33" resname="sylius.address.postcode.min_length">
|
||||||
|
<source>sylius.address.postcode.min_length</source>
|
||||||
|
<target>Le code postal doit être plus long que 2 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0bb933abd4f0217d4d1e2d521b60b9ef" resname="sylius.address.postcode.not_blank">
|
||||||
|
<source>sylius.address.postcode.not_blank</source>
|
||||||
|
<target>Veuillez entrer un code postal</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0a5ba0dfc005b06148f006a3e51a2643" resname="sylius.address.province.valid">
|
||||||
|
<source>sylius.address.province.valid</source>
|
||||||
|
<target>sylius.address.province.valid</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="79a20c64ff0131a40b96664c3b7555d7" resname="sylius.address.street.max_length">
|
||||||
|
<source>sylius.address.street.max_length</source>
|
||||||
|
<target>L'adresse ne doit pas être plus long que 255 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="858516d3703954d8e45cb2f6a2ec0a66" resname="sylius.address.street.min_length">
|
||||||
|
<source>sylius.address.street.min_length</source>
|
||||||
|
<target>L'adresse doit être plus long que 2 caractères</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="cf60b55d4dbd7a0bfb9b770bfca9b1fb" resname="sylius.address.street.not_blank">
|
||||||
|
<source>sylius.address.street.not_blank</source>
|
||||||
|
<target>Veuillez entrer une adresse</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="297fe83c9650547bae5e88505cd9dd40" resname="sylius.country.iso_name.not_blank">
|
||||||
|
<source>sylius.country.iso_name.not_blank</source>
|
||||||
|
<target>sylius.country.iso_name.not_blank</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="254a443f9ab6f5e0dd9574db7afcffa2" resname="sylius.country.name.max_length">
|
||||||
|
<source>sylius.country.name.max_length</source>
|
||||||
|
<target>sylius.country.name.max_length</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="8877699fed4ff2ec488e3f819fc5c777" resname="sylius.country.name.not_blank">
|
||||||
|
<source>sylius.country.name.not_blank</source>
|
||||||
|
<target>sylius.country.name.not_blank</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7226e2da1b30b33c37f32f40d755a722" resname="sylius.province.name.max_length">
|
||||||
|
<source>sylius.province.name.max_length</source>
|
||||||
|
<target>sylius.province.name.max_length</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2dcf7777230a72d2c6f7c4f94f797150" resname="sylius.province.name.min_length">
|
||||||
|
<source>sylius.province.name.min_length</source>
|
||||||
|
<target>sylius.province.name.min_length</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9c7fe354d624dabeea17830a8e5973f" resname="sylius.province.name.not_blank">
|
||||||
|
<source>sylius.province.name.not_blank</source>
|
||||||
|
<target>sylius.province.name.not_blank</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="b0f64f444c33a62394f6feb2ebcd743c" resname="sylius.zone.members.min_count">
|
||||||
|
<source>sylius.zone.members.min_count</source>
|
||||||
|
<target>sylius.zone.members.min_count</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ef3addb393985a9e74e90c1e070dcdb7" resname="sylius.zone.name.max_length">
|
||||||
|
<source>sylius.zone.name.max_length</source>
|
||||||
|
<target>sylius.zone.name.max_length</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="104cd1e655781eb8b0401c01ca772463" resname="sylius.zone.name.not_blank">
|
||||||
|
<source>sylius.zone.name.not_blank</source>
|
||||||
|
<target>sylius.zone.name.not_blank</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="en" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="4cd9195643343df2e0718b76c84b0e61" resname="sylius.address.city.max_length">
|
||||||
|
<source>sylius.address.city.max_length</source>
|
||||||
|
<target>La città non deve essere piu' lunga di 255 caratteri|La città non deve essere piu' lunga di 255 caratteri|La città non deve essere piu' lunga di 255 caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="5e64f28e013767d9d9052c5962c52839" resname="sylius.address.city.min_length">
|
||||||
|
<source>sylius.address.city.min_length</source>
|
||||||
|
<target>La città deve essere lunga almeno due caratteri|La città deve essere lunga almeno due caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="594a3a47d5f964256ec0b564afd517fc" resname="sylius.address.city.not_blank">
|
||||||
|
<source>sylius.address.city.not_blank</source>
|
||||||
|
<target>Inserisci la città.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="4d3a803eb489ffaeea16b07683fd39b6" resname="sylius.address.country.not_blank">
|
||||||
|
<source>sylius.address.country.not_blank</source>
|
||||||
|
<target>Inserisci la nazione.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e252a88f87165620971393df7c314712" resname="sylius.address.first_name.max_length">
|
||||||
|
<source>sylius.address.first_name.max_length</source>
|
||||||
|
<target>Il nome non deve essere più lungo di 255 caratteri|Il nome non deve essere più lungo di 255 caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="a5c95b252bcb6c28191bce06e8bfb207" resname="sylius.address.first_name.min_length">
|
||||||
|
<source>sylius.address.first_name.min_length</source>
|
||||||
|
<target>Il nome deve essere lungo almeno due caratteri|Il nome deve essere lungo almeno due caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9655e0e8621e76ef71899cb818dfc20" resname="sylius.address.first_name.not_blank">
|
||||||
|
<source>sylius.address.first_name.not_blank</source>
|
||||||
|
<target>Inserisci il nome.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb4e92106b0cceb7e0dfdf61b9b18407" resname="sylius.address.last_name.max_length">
|
||||||
|
<source>sylius.address.last_name.max_length</source>
|
||||||
|
<target>Il cognome non deve essere più lungo di 255 caratteri|Il cognome non deve essere più lungo di 255 caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2480b94251a02c47bef7c3aba4b1ab93" resname="sylius.address.last_name.min_length">
|
||||||
|
<source>sylius.address.last_name.min_length</source>
|
||||||
|
<target>Il cognome deve essere lungo almeno due caratteri|Il cognome deve essere lungo almeno due caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7fe433ec5724f8661f5abb73f802a100" resname="sylius.address.last_name.not_blank">
|
||||||
|
<source>sylius.address.last_name.not_blank</source>
|
||||||
|
<target>Inserisci il cognome.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0558d4aeb03ea384f20cc700dd82c82a" resname="sylius.address.postcode.max_length">
|
||||||
|
<source>sylius.address.postcode.max_length</source>
|
||||||
|
<target>Il CAP non deve essere più lungo di 255 caratteri|Il CAP non deve essere più lungo di 255 caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7f21a001520d738294163c6846caea33" resname="sylius.address.postcode.min_length">
|
||||||
|
<source>sylius.address.postcode.min_length</source>
|
||||||
|
<target>Il CAP deve essere lungo almeno due caratteri| Il CAP deve essere lungo almeno due carattri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0bb933abd4f0217d4d1e2d521b60b9ef" resname="sylius.address.postcode.not_blank">
|
||||||
|
<source>sylius.address.postcode.not_blank</source>
|
||||||
|
<target>Inserisci il CAP.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0a5ba0dfc005b06148f006a3e51a2643" resname="sylius.address.province.valid">
|
||||||
|
<source>sylius.address.province.valid</source>
|
||||||
|
<target>Seleziona la provincia.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="79a20c64ff0131a40b96664c3b7555d7" resname="sylius.address.street.max_length">
|
||||||
|
<source>sylius.address.street.max_length</source>
|
||||||
|
<target>L'indirizzo non deve essere piu' lungo di 255 caratteri|L'indirizzo non deve essere piu' lungo di 255 caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="858516d3703954d8e45cb2f6a2ec0a66" resname="sylius.address.street.min_length">
|
||||||
|
<source>sylius.address.street.min_length</source>
|
||||||
|
<target>L'indirizzo deve essere lungo almeno due caratteri|L'indirizzo deve essere lungo almeno due caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="cf60b55d4dbd7a0bfb9b770bfca9b1fb" resname="sylius.address.street.not_blank">
|
||||||
|
<source>sylius.address.street.not_blank</source>
|
||||||
|
<target>Inserisci l'indirizzo.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="297fe83c9650547bae5e88505cd9dd40" resname="sylius.country.iso_name.not_blank">
|
||||||
|
<source>sylius.country.iso_name.not_blank</source>
|
||||||
|
<target>Inserisci il codice ISO della nazione.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="254a443f9ab6f5e0dd9574db7afcffa2" resname="sylius.country.name.max_length">
|
||||||
|
<source>sylius.country.name.max_length</source>
|
||||||
|
<target>Il nome della nazione non deve essere più lungo di 255 caratteri|Il nome della nazione non deve essere piu' lungo di 255 caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="8877699fed4ff2ec488e3f819fc5c777" resname="sylius.country.name.not_blank">
|
||||||
|
<source>sylius.country.name.not_blank</source>
|
||||||
|
<target>Inserisci il nome della nazione.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7226e2da1b30b33c37f32f40d755a722" resname="sylius.province.name.max_length">
|
||||||
|
<source>sylius.province.name.max_length</source>
|
||||||
|
<target>Il nome della provincia non deve essere più lungo di 255 caratteri|Il nome della provincia non deve essere più lungo di 255 caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2dcf7777230a72d2c6f7c4f94f797150" resname="sylius.province.name.min_length">
|
||||||
|
<source>sylius.province.name.min_length</source>
|
||||||
|
<target>Il nome della provincia deve essere almeno di due caratteri|Il nome della provincia deve essere almeno di due caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9c7fe354d624dabeea17830a8e5973f" resname="sylius.province.name.not_blank">
|
||||||
|
<source>sylius.province.name.not_blank</source>
|
||||||
|
<target>Inserisci il nome della provincia.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="b0f64f444c33a62394f6feb2ebcd743c" resname="sylius.zone.members.min_count">
|
||||||
|
<source>sylius.zone.members.min_count</source>
|
||||||
|
<target>Inserisci almeno {{ limit }} membri nella zona.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ef3addb393985a9e74e90c1e070dcdb7" resname="sylius.zone.name.max_length">
|
||||||
|
<source>sylius.zone.name.max_length</source>
|
||||||
|
<target>Il nome della zona non deve essere più lungo di 255 caratteri|Il nome della zona non deve essere più lungo di 255 caratteri.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="104cd1e655781eb8b0401c01ca772463" resname="sylius.zone.name.not_blank">
|
||||||
|
<source>sylius.zone.name.not_blank</source>
|
||||||
|
<target>Inserisci il nome della zona.</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="nl" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="4cd9195643343df2e0718b76c84b0e61" resname="sylius.address.city.max_length">
|
||||||
|
<source>sylius.address.city.max_length</source>
|
||||||
|
<target>Plaats mag niet langer dan 255 karakters zijn|Plaats mag niet langer dan 255 karakters zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="5e64f28e013767d9d9052c5962c52839" resname="sylius.address.city.min_length">
|
||||||
|
<source>sylius.address.city.min_length</source>
|
||||||
|
<target>Plaats moet minstens 2 karakters lang zijn|Plaats moet minstens 2 karakters lang zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="594a3a47d5f964256ec0b564afd517fc" resname="sylius.address.city.not_blank">
|
||||||
|
<source>sylius.address.city.not_blank</source>
|
||||||
|
<target>Voer een plaats in.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="4d3a803eb489ffaeea16b07683fd39b6" resname="sylius.address.country.not_blank">
|
||||||
|
<source>sylius.address.country.not_blank</source>
|
||||||
|
<target>Selecteer een land.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e252a88f87165620971393df7c314712" resname="sylius.address.first_name.max_length">
|
||||||
|
<source>sylius.address.first_name.max_length</source>
|
||||||
|
<target>Voornaam mag niet langer dan 255 karakters zijn|Voornaam mag niet langer dan 255 karakters zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="a5c95b252bcb6c28191bce06e8bfb207" resname="sylius.address.first_name.min_length">
|
||||||
|
<source>sylius.address.first_name.min_length</source>
|
||||||
|
<target>Voornaam moet minstens 2 karakters lang zijn|Voornaam moet minstens 2 karakters lang zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9655e0e8621e76ef71899cb818dfc20" resname="sylius.address.first_name.not_blank">
|
||||||
|
<source>sylius.address.first_name.not_blank</source>
|
||||||
|
<target>Voer een voornaam in.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb4e92106b0cceb7e0dfdf61b9b18407" resname="sylius.address.last_name.max_length">
|
||||||
|
<source>sylius.address.last_name.max_length</source>
|
||||||
|
<target>Achternaam mag niet langer dan 255 karakters zijn|Achternaam mag niet langer dan 255 karakters zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2480b94251a02c47bef7c3aba4b1ab93" resname="sylius.address.last_name.min_length">
|
||||||
|
<source>sylius.address.last_name.min_length</source>
|
||||||
|
<target>Achternaam moet minstens 2 karakters lang zijn|Achternaam moet minstens 2 karakters lang zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7fe433ec5724f8661f5abb73f802a100" resname="sylius.address.last_name.not_blank">
|
||||||
|
<source>sylius.address.last_name.not_blank</source>
|
||||||
|
<target>Voer een achternaam in.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0558d4aeb03ea384f20cc700dd82c82a" resname="sylius.address.postcode.max_length">
|
||||||
|
<source>sylius.address.postcode.max_length</source>
|
||||||
|
<target>Postcode mag niet langer dan 255 karakters zijn|Postcode mag niet langer dan 255 karakters zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7f21a001520d738294163c6846caea33" resname="sylius.address.postcode.min_length">
|
||||||
|
<source>sylius.address.postcode.min_length</source>
|
||||||
|
<target>Postcode moet minstens 2 karakters lang zijn|Postcode moet minstens 2 karakters lang zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0bb933abd4f0217d4d1e2d521b60b9ef" resname="sylius.address.postcode.not_blank">
|
||||||
|
<source>sylius.address.postcode.not_blank</source>
|
||||||
|
<target>Voer een postcode in.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0a5ba0dfc005b06148f006a3e51a2643" resname="sylius.address.province.valid">
|
||||||
|
<source>sylius.address.province.valid</source>
|
||||||
|
<target>Selecteer een provincie.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="79a20c64ff0131a40b96664c3b7555d7" resname="sylius.address.street.max_length">
|
||||||
|
<source>sylius.address.street.max_length</source>
|
||||||
|
<target>Straat mag niet langer dan 255 karakters zijn|Straat mag niet langer dan 255 karakters zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="858516d3703954d8e45cb2f6a2ec0a66" resname="sylius.address.street.min_length">
|
||||||
|
<source>sylius.address.street.min_length</source>
|
||||||
|
<target>Straat moet minstens 2 karakters lang zijn|Straat moet minstens 2 karakters lang zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="cf60b55d4dbd7a0bfb9b770bfca9b1fb" resname="sylius.address.street.not_blank">
|
||||||
|
<source>sylius.address.street.not_blank</source>
|
||||||
|
<target>Voer een straat in.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="297fe83c9650547bae5e88505cd9dd40" resname="sylius.country.iso_name.not_blank">
|
||||||
|
<source>sylius.country.iso_name.not_blank</source>
|
||||||
|
<target>Voer een ISO landcode in.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="254a443f9ab6f5e0dd9574db7afcffa2" resname="sylius.country.name.max_length">
|
||||||
|
<source>sylius.country.name.max_length</source>
|
||||||
|
<target>Landnaam mag niet langer dan 255 karakters zijn|Landnaam mag niet langer dan 255 karakters zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="8877699fed4ff2ec488e3f819fc5c777" resname="sylius.country.name.not_blank">
|
||||||
|
<source>sylius.country.name.not_blank</source>
|
||||||
|
<target>Voer een landnaam in.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7226e2da1b30b33c37f32f40d755a722" resname="sylius.province.name.max_length">
|
||||||
|
<source>sylius.province.name.max_length</source>
|
||||||
|
<target>Provincie naam mag niet langer dan 255 karakters zijn|Provincie naam mag niet langer dan 255 karakters zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2dcf7777230a72d2c6f7c4f94f797150" resname="sylius.province.name.min_length">
|
||||||
|
<source>sylius.province.name.min_length</source>
|
||||||
|
<target>Provincie naam moet minstens 2 karakters lang zijn|Provincie naam moet minstens 2 karakters lang zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9c7fe354d624dabeea17830a8e5973f" resname="sylius.province.name.not_blank">
|
||||||
|
<source>sylius.province.name.not_blank</source>
|
||||||
|
<target>Voer een provincie naam in.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="b0f64f444c33a62394f6feb2ebcd743c" resname="sylius.zone.members.min_count">
|
||||||
|
<source>sylius.zone.members.min_count</source>
|
||||||
|
<target>Voeg minstens {{ limit }} zone leden toe.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ef3addb393985a9e74e90c1e070dcdb7" resname="sylius.zone.name.max_length">
|
||||||
|
<source>sylius.zone.name.max_length</source>
|
||||||
|
<target>Zone naam mag niet langer dan 255 karakters zijn|Zone naam mag niet langer dan 255 karakters zijn.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="104cd1e655781eb8b0401c01ca772463" resname="sylius.zone.name.not_blank">
|
||||||
|
<source>sylius.zone.name.not_blank</source>
|
||||||
|
<target>Voer een zone naam in.</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="pl" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="4cd9195643343df2e0718b76c84b0e61" resname="sylius.address.city.max_length">
|
||||||
|
<source>sylius.address.city.max_length</source>
|
||||||
|
<target>Nazwa miejscowości jest zbyt długa. Powininna mieć mniej niż 255 znaków|Nazwa miejscowości jest zbyt długa. Powinienna mieć mniej niż 255 znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="5e64f28e013767d9d9052c5962c52839" resname="sylius.address.city.min_length">
|
||||||
|
<source>sylius.address.city.min_length</source>
|
||||||
|
<target>Nazwa miejscowości jest zbyt krótka. Powinna mieć 2 lub więcej znaków|Nazwa miejscowości jest zbyt krótka. Powinienna mieć 2 lub więcej znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="594a3a47d5f964256ec0b564afd517fc" resname="sylius.address.city.not_blank">
|
||||||
|
<source>sylius.address.city.not_blank</source>
|
||||||
|
<target>Proszę podać miejscowość.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="4d3a803eb489ffaeea16b07683fd39b6" resname="sylius.address.country.not_blank">
|
||||||
|
<source>sylius.address.country.not_blank</source>
|
||||||
|
<target>Proszę wybrać kraj.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e252a88f87165620971393df7c314712" resname="sylius.address.first_name.max_length">
|
||||||
|
<source>sylius.address.first_name.max_length</source>
|
||||||
|
<target>Imię jest zbyt długie. Powinno mieć mniej niż 255 znaków|Imię jest zbyt długie. Powinno mieć mniej niż 255 znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="a5c95b252bcb6c28191bce06e8bfb207" resname="sylius.address.first_name.min_length">
|
||||||
|
<source>sylius.address.first_name.min_length</source>
|
||||||
|
<target>Imię jest zbyt krótkie. Powinno mieć 2 lub więcej znaków|Imię jest zbyt krótkie. Powinno mieć 2 lub więcej znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9655e0e8621e76ef71899cb818dfc20" resname="sylius.address.first_name.not_blank">
|
||||||
|
<source>sylius.address.first_name.not_blank</source>
|
||||||
|
<target>Proszę podać swoje imię.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb4e92106b0cceb7e0dfdf61b9b18407" resname="sylius.address.last_name.max_length">
|
||||||
|
<source>sylius.address.last_name.max_length</source>
|
||||||
|
<target>Nazwisko jest zbyt długie. Powinno mieć mniej niż 255 znaków|Nazwisko jest zbyt długie. Powinno mieć mniej niż 255 znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2480b94251a02c47bef7c3aba4b1ab93" resname="sylius.address.last_name.min_length">
|
||||||
|
<source>sylius.address.last_name.min_length</source>
|
||||||
|
<target>Nazwisko jest zbyt krótkie. Powinno mieć 2 lub więcej znaków|Nazwisko jest zbyt krótkie. Powinno mieć 2 lub więcej znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7fe433ec5724f8661f5abb73f802a100" resname="sylius.address.last_name.not_blank">
|
||||||
|
<source>sylius.address.last_name.not_blank</source>
|
||||||
|
<target>Proszę podać swoje naziwsko.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0558d4aeb03ea384f20cc700dd82c82a" resname="sylius.address.postcode.max_length">
|
||||||
|
<source>sylius.address.postcode.max_length</source>
|
||||||
|
<target>Kod pocztowy jest zbyt długi. Powinien mieć mniej niż 255 znaków|Kod pocztowy jest zbyt długi. Powinien mieć mniej niż 255 znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7f21a001520d738294163c6846caea33" resname="sylius.address.postcode.min_length">
|
||||||
|
<source>sylius.address.postcode.min_length</source>
|
||||||
|
<target>Kod pocztowy jest zbyt krótki. Powinien mieć 2 lub więcej znaków|Kod pocztowy jest zbyt krótki. Powinien mieć 2 lub więcej znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0bb933abd4f0217d4d1e2d521b60b9ef" resname="sylius.address.postcode.not_blank">
|
||||||
|
<source>sylius.address.postcode.not_blank</source>
|
||||||
|
<target>Proszę podać kod pocztowy.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0a5ba0dfc005b06148f006a3e51a2643" resname="sylius.address.province.valid">
|
||||||
|
<source>sylius.address.province.valid</source>
|
||||||
|
<target>Proszę wybrać prawidłowe województwo.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="79a20c64ff0131a40b96664c3b7555d7" resname="sylius.address.street.max_length">
|
||||||
|
<source>sylius.address.street.max_length</source>
|
||||||
|
<target>Adres jest zbyt długi. Powinien mieć mniej niż 255 znaków|Adres jest zbyt długi. Powinien mieć mniej niż 255 znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="858516d3703954d8e45cb2f6a2ec0a66" resname="sylius.address.street.min_length">
|
||||||
|
<source>sylius.address.street.min_length</source>
|
||||||
|
<target>Adres jest zbyt krótki. Powinien mieć 2 lub więcej znaków|Adres jest zbyt krótki. Powinien mieć 2 lub więcej znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="cf60b55d4dbd7a0bfb9b770bfca9b1fb" resname="sylius.address.street.not_blank">
|
||||||
|
<source>sylius.address.street.not_blank</source>
|
||||||
|
<target>Proszę podać ulicę.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="297fe83c9650547bae5e88505cd9dd40" resname="sylius.country.iso_name.not_blank">
|
||||||
|
<source>sylius.country.iso_name.not_blank</source>
|
||||||
|
<target>Proszę podać kod ISO kraju.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="254a443f9ab6f5e0dd9574db7afcffa2" resname="sylius.country.name.max_length">
|
||||||
|
<source>sylius.country.name.max_length</source>
|
||||||
|
<target>Nazwa kraju jest zbyt długa. Powininna mieć mniej niż 255 znaków|Nazwa kraju jest zbyt długa. Powinienna mieć mniej niż 255 znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="8877699fed4ff2ec488e3f819fc5c777" resname="sylius.country.name.not_blank">
|
||||||
|
<source>sylius.country.name.not_blank</source>
|
||||||
|
<target>Proszę podać nazwę kraju.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7226e2da1b30b33c37f32f40d755a722" resname="sylius.province.name.max_length">
|
||||||
|
<source>sylius.province.name.max_length</source>
|
||||||
|
<target>Nazwa województwa jest zbyt długa. Powininna mieć mniej niż 255 znaków|Nazwa województwa jest zbyt długa. Powinienna mieć mniej niż 255 znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2dcf7777230a72d2c6f7c4f94f797150" resname="sylius.province.name.min_length">
|
||||||
|
<source>sylius.province.name.min_length</source>
|
||||||
|
<target>Nazwa województwa jest zbyt krótka. Powinna mieć 2 lub więcej znaków|Nazwa województwa jest zbyt krótka. Powinienna mieć 2 lub więcej znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9c7fe354d624dabeea17830a8e5973f" resname="sylius.province.name.not_blank">
|
||||||
|
<source>sylius.province.name.not_blank</source>
|
||||||
|
<target>Proszę podać nazwę województwa.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="b0f64f444c33a62394f6feb2ebcd743c" resname="sylius.zone.members.min_count">
|
||||||
|
<source>sylius.zone.members.min_count</source>
|
||||||
|
<target>Proszę podać conajmniej {{ limit }} kraj.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ef3addb393985a9e74e90c1e070dcdb7" resname="sylius.zone.name.max_length">
|
||||||
|
<source>sylius.zone.name.max_length</source>
|
||||||
|
<target>Nazwa strefy jest zbyt długa. Powininna mieć mniej niż 255 znaków|Nazwa strefy jest zbyt długa. Powinienna mieć mniej niż 255 znaków.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="104cd1e655781eb8b0401c01ca772463" resname="sylius.zone.name.not_blank">
|
||||||
|
<source>sylius.zone.name.not_blank</source>
|
||||||
|
<target>Proszę podać nazwę strefy.</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="ru" datatype="plaintext" original="file.ext">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="4cd9195643343df2e0718b76c84b0e61" resname="sylius.address.city.max_length">
|
||||||
|
<source>sylius.address.city.max_length</source>
|
||||||
|
<target>Название города не должно превышать 255 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="5e64f28e013767d9d9052c5962c52839" resname="sylius.address.city.min_length">
|
||||||
|
<source>sylius.address.city.min_length</source>
|
||||||
|
<target>Название города не должно быть короче 2 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="594a3a47d5f964256ec0b564afd517fc" resname="sylius.address.city.not_blank">
|
||||||
|
<source>sylius.address.city.not_blank</source>
|
||||||
|
<target>Пожалуйста укажите город.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="4d3a803eb489ffaeea16b07683fd39b6" resname="sylius.address.country.not_blank">
|
||||||
|
<source>sylius.address.country.not_blank</source>
|
||||||
|
<target>Пожалуйста выберите страну.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="e252a88f87165620971393df7c314712" resname="sylius.address.first_name.max_length">
|
||||||
|
<source>sylius.address.first_name.max_length</source>
|
||||||
|
<target>Имя не должно превышать 255 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="a5c95b252bcb6c28191bce06e8bfb207" resname="sylius.address.first_name.min_length">
|
||||||
|
<source>sylius.address.first_name.min_length</source>
|
||||||
|
<target>Имя не должно быть короче 2 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9655e0e8621e76ef71899cb818dfc20" resname="sylius.address.first_name.not_blank">
|
||||||
|
<source>sylius.address.first_name.not_blank</source>
|
||||||
|
<target>Пожалуйста введите имя.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="fb4e92106b0cceb7e0dfdf61b9b18407" resname="sylius.address.last_name.max_length">
|
||||||
|
<source>sylius.address.last_name.max_length</source>
|
||||||
|
<target>Фамилия не должна быть длиннее 255 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2480b94251a02c47bef7c3aba4b1ab93" resname="sylius.address.last_name.min_length">
|
||||||
|
<source>sylius.address.last_name.min_length</source>
|
||||||
|
<target>Фамилия не должна быть короче 2 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7fe433ec5724f8661f5abb73f802a100" resname="sylius.address.last_name.not_blank">
|
||||||
|
<source>sylius.address.last_name.not_blank</source>
|
||||||
|
<target>Пожалуйста введите фамилию.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0558d4aeb03ea384f20cc700dd82c82a" resname="sylius.address.postcode.max_length">
|
||||||
|
<source>sylius.address.postcode.max_length</source>
|
||||||
|
<target>Индекс не должен превышать 255 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7f21a001520d738294163c6846caea33" resname="sylius.address.postcode.min_length">
|
||||||
|
<source>sylius.address.postcode.min_length</source>
|
||||||
|
<target>Индекс не должен быть короче 2 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0bb933abd4f0217d4d1e2d521b60b9ef" resname="sylius.address.postcode.not_blank">
|
||||||
|
<source>sylius.address.postcode.not_blank</source>
|
||||||
|
<target>Пожалуйста укажите индекс.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="0a5ba0dfc005b06148f006a3e51a2643" resname="sylius.address.province.valid">
|
||||||
|
<source>sylius.address.province.valid</source>
|
||||||
|
<target>Пожалуйста укажите существующую область.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="79a20c64ff0131a40b96664c3b7555d7" resname="sylius.address.street.max_length">
|
||||||
|
<source>sylius.address.street.max_length</source>
|
||||||
|
<target>Название улицы не должно превышать 255 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="858516d3703954d8e45cb2f6a2ec0a66" resname="sylius.address.street.min_length">
|
||||||
|
<source>sylius.address.street.min_length</source>
|
||||||
|
<target>Название улицы не должно быть короче 2 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="cf60b55d4dbd7a0bfb9b770bfca9b1fb" resname="sylius.address.street.not_blank">
|
||||||
|
<source>sylius.address.street.not_blank</source>
|
||||||
|
<target>Пожалуйста укажите улицу.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="297fe83c9650547bae5e88505cd9dd40" resname="sylius.country.iso_name.not_blank">
|
||||||
|
<source>sylius.country.iso_name.not_blank</source>
|
||||||
|
<target>Пожалуйста введите ISO код страны.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="254a443f9ab6f5e0dd9574db7afcffa2" resname="sylius.country.name.max_length">
|
||||||
|
<source>sylius.country.name.max_length</source>
|
||||||
|
<target>Название страны не должно превышать 255 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="8877699fed4ff2ec488e3f819fc5c777" resname="sylius.country.name.not_blank">
|
||||||
|
<source>sylius.country.name.not_blank</source>
|
||||||
|
<target>Пожалуйста укажите страну.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="7226e2da1b30b33c37f32f40d755a722" resname="sylius.province.name.max_length">
|
||||||
|
<source>sylius.province.name.max_length</source>
|
||||||
|
<target>Название области не должно превышать 255 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="2dcf7777230a72d2c6f7c4f94f797150" resname="sylius.province.name.min_length">
|
||||||
|
<source>sylius.province.name.min_length</source>
|
||||||
|
<target>Название области не должно быть короче 2 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="f9c7fe354d624dabeea17830a8e5973f" resname="sylius.province.name.not_blank">
|
||||||
|
<source>sylius.province.name.not_blank</source>
|
||||||
|
<target>Пожалуйста укажите область.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="b0f64f444c33a62394f6feb2ebcd743c" resname="sylius.zone.members.min_count">
|
||||||
|
<source>sylius.zone.members.min_count</source>
|
||||||
|
<target>Пожалуйста, добавьте как минимум {{ limit }} область.|Пожалуйста, добавьте как минимум {{ limit }} области.|Пожалуйста, добавьте как минимум {{ limit }} областей.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="ef3addb393985a9e74e90c1e070dcdb7" resname="sylius.zone.name.max_length">
|
||||||
|
<source>sylius.zone.name.max_length</source>
|
||||||
|
<target>Наименование округа не должно превышать 255 символов.</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="104cd1e655781eb8b0401c01ca772463" resname="sylius.zone.name.not_blank">
|
||||||
|
<source>sylius.zone.name.not_blank</source>
|
||||||
|
<target>Пожалуйста укажите округ.</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<strong>{{ address.fullName}}</strong> <br />
|
||||||
|
{{ address.street }}, <br />
|
||||||
|
{{ address.city }} {{ address.postcode }}<br />
|
||||||
|
{{ address.country|upper }} {% if address.province is not empty %} {{ address.province }} {% endif %}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<h1>Creating address <small>Use this form to add new item to address book</small></h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form action="{{ path('sylius_address_create') }}" method="post" class="form-horizontal" novalidate>
|
||||||
|
{% include 'SyliusAddressingBundle:Address:_form.html.twig' %}
|
||||||
|
<div class="form-actions">
|
||||||
|
<input type="submit" value="create address" class="btn btn-large btn-primary" />
|
||||||
|
|
||||||
|
<input type="reset" value="cancel" class="btn btn-large" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{{ form_row(form.firstName, {'attr': {'class': 'input-large'}}) }}
|
||||||
|
{{ form_row(form.lastName, {'attr': {'class': 'input-large'}}) }}
|
||||||
|
{{ form_row(form.country, {'attr': {'class': 'select2 input-large country-select'}}) }}
|
||||||
|
{% if form.province is defined %}
|
||||||
|
{{ form_row(form.province, {'attr': {'class': 'select2 input-medium'}}) }}
|
||||||
|
{% endif %}
|
||||||
|
{{ form_row(form.street, {'attr': {'class': 'input-xlarge'}}) }}
|
||||||
|
{{ form_row(form.city, {'attr': {'class': 'input-medium'}}) }}
|
||||||
|
{{ form_row(form.postcode, {'attr': {'class': 'input-small'}}) }}
|
||||||
|
{{ form_rest(form) }}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{% import 'SyliusAddressingBundle:Address:macros.html.twig' as macros %}
|
||||||
|
|
||||||
|
<h1>Addresses list <small>All addresses saved in the system</small></h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<div class="well">
|
||||||
|
<a href="{{ path('sylius_address_create') }}" class="btn btn-primary">
|
||||||
|
<i class="icon-plus icon-white"></i> new address
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if addresses.haveToPaginate()|default(false) %}
|
||||||
|
{{ pagerfanta(addresses, 'twitter_bootstrap_translated') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros.list(addresses) }}
|
||||||
|
|
||||||
|
{% if addresses.haveToPaginate()|default(false) %}
|
||||||
|
{{ pagerfanta(addresses, 'twitter_bootstrap_translated') }}
|
||||||
|
{% endif %}
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
<h1>Address details <small>{{ address.fullName }}</small></h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<div class="well well-small">
|
||||||
|
<a href="{{ path('sylius_address_update', {'id': address.id}) }}" class="btn">
|
||||||
|
<i class="icon-pencil icon-white"></i> edit
|
||||||
|
</a>
|
||||||
|
<a href="{{ path('sylius_address_delete', {'id': address.id}) }}" class="btn btn-danger">
|
||||||
|
<i class="icon-trash icon-white"></i>
|
||||||
|
</a>
|
||||||
|
<a href="{{ path('sylius_address_create') }}" class="btn btn-primary">
|
||||||
|
<i class="icon-plus icon-white"></i> new address
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#{{ address.id }} for "{{ address.fullName }}"</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<address class="code">
|
||||||
|
<hr />
|
||||||
|
{% include 'SyliusAddressingBundle:Address:_address.html.twig' %}
|
||||||
|
</address>
|
||||||
|
</td>
|
||||||
|
<tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<h1>Address updating <small>Use this form to edit existing address</small></h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form action="{{ path('sylius_address_update', {'id': address.id}) }}" method="post" class="form-horizontal" novalidate>
|
||||||
|
{% include 'SyliusAddressingBundle:Address:_form.html.twig' %}
|
||||||
|
<div class="form-actions">
|
||||||
|
<input type="submit" value="save changes" class="btn btn-large btn-primary" />
|
||||||
|
|
||||||
|
<a href="{{ path('sylius_address_show', {'id': address.id})}}" class="btn btn-large">cancel</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
{% extends 'SyliusResourceBundle::layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block sylius_javascripts %}
|
||||||
|
{% javascripts
|
||||||
|
'@SyliusAddressingBundle/Resources/assets/js/sylius-addressing.js'
|
||||||
|
%}
|
||||||
|
{{ parent() }}
|
||||||
|
<script type="text/javascript" src="{{ asset_url }}"></script>
|
||||||
|
{% endjavascripts %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block sylius_content %}
|
||||||
|
{% include 'SyliusAddressingBundle:Address:_create.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{% extends 'SyliusResourceBundle::layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block sylius_content %}
|
||||||
|
{% include 'SyliusAddressingBundle:Address:_index.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
{% macro list(addresses) %}
|
||||||
|
|
||||||
|
{% if addresses|length > 0 %}
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{{ sylius_resource_sort('id', '#id') }}</th>
|
||||||
|
<th>{{ sylius_resource_sort('firstName', 'first name') }}</th>
|
||||||
|
<th>{{ sylius_resource_sort('lastName', 'last name') }}</th>
|
||||||
|
<th>{{ sylius_resource_sort('country') }}</th>
|
||||||
|
<th>{{ sylius_resource_sort('province') }}</th>
|
||||||
|
<th>{{ sylius_resource_sort('city') }}</th>
|
||||||
|
<th>{{ sylius_resource_sort('street') }}</th>
|
||||||
|
<th>{{ sylius_resource_sort('postcode') }}</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for address in addresses %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ address.id }}</td>
|
||||||
|
<td>{{ address.firstname }}</td>
|
||||||
|
<td>{{ address.lastname }}</td>
|
||||||
|
<td>{{ address.country }}</td>
|
||||||
|
<td>{{ address.province|default('---') }}</td>
|
||||||
|
<td>{{ address.city }}</td>
|
||||||
|
<td>{{ address.street }}</td>
|
||||||
|
<td>{{ address.postcode }}</td>
|
||||||
|
<td>
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<a href="{{ path('sylius_address_show', {'id': address.id}) }}" class="btn">
|
||||||
|
<i class="icon-book"></i> details
|
||||||
|
</a>
|
||||||
|
<a href="{{ path('sylius_address_update', {'id': address.id}) }}" class="btn">
|
||||||
|
<i class="icon-pencil"></i> edit
|
||||||
|
</a>
|
||||||
|
<a href="{{ path('sylius_address_delete', {'id': address.id}) }}" class="btn btn-danger confirmer"
|
||||||
|
data-confirmer-question="Do you really want to delete address <strong>{{ address.firstname ~ ' ' ~ address.lastname }}</strong>?"
|
||||||
|
>
|
||||||
|
<i class="icon-trash icon-white"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<h4 class="alert-heading">Information</h4>
|
||||||
|
Your address book is empty
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endmacro %}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{% extends 'SyliusResourceBundle::layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block sylius_content %}
|
||||||
|
{% include 'SyliusAddressingBundle:Address:_show.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
{% extends 'SyliusResourceBundle::layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block sylius_javascripts %}
|
||||||
|
{% javascripts
|
||||||
|
'@SyliusAddressingBundle/Resources/assets/js/sylius-addressing.js'
|
||||||
|
%}
|
||||||
|
{{ parent() }}
|
||||||
|
<script type="text/javascript" src="{{ asset_url }}"></script>
|
||||||
|
{% endjavascripts %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block sylius_content %}
|
||||||
|
{% include 'SyliusAddressingBundle:Address:_update.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<h1>Creating country <small>Use this form to add new item to country book</small></h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form action="{{ path('sylius_country_create') }}" method="post" class="form-horizontal" novalidate>
|
||||||
|
{% include 'SyliusAddressingBundle:Country:_form.html.twig' %}
|
||||||
|
<div class="form-actions">
|
||||||
|
<input type="submit" value="create country" class="btn btn-large btn-primary" />
|
||||||
|
|
||||||
|
<input type="reset" value="cancel" class="btn btn-large" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{{ form_errors(form) }}
|
||||||
|
<fieldset>
|
||||||
|
{{ form_row(form.name, {'attr': {'class': 'input-xlarge'}}) }}
|
||||||
|
{{ form_row(form.isoName, {'attr': {'class': 'input-small'}}) }}
|
||||||
|
</fieldset>
|
||||||
|
{{ form_rest(form) }}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{% import 'SyliusAddressingBundle:Country:macros.html.twig' as macros %}
|
||||||
|
|
||||||
|
<h1>Countries list <small>Here you can configure countries and provinces</small></h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<div class="well">
|
||||||
|
<a href="{{ path('sylius_country_create') }}" class="btn btn-primary">
|
||||||
|
<i class="icon-plus icon-white"></i> add country
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if countries.haveToPaginate()|default(false) %}
|
||||||
|
{{ pagerfanta(countries, 'twitter_bootstrap_translated') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ macros.list(countries) }}
|
||||||
|
|
||||||
|
{% if countries.haveToPaginate() %}
|
||||||
|
{{ pagerfanta(countries, 'twitter_bootstrap_translated') }}
|
||||||
|
{% endif %}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<h1>Country updating <small>Use this form to edit existing country</small></h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form action="{{ path('sylius_country_update', {'id': country.id}) }}" method="post" class="form-horizontal" novalidate>
|
||||||
|
{% include 'SyliusAddressingBundle:Country:_form.html.twig' %}
|
||||||
|
<div class="form-actions">
|
||||||
|
<input type="submit" value="save changes" class="btn btn-large btn-primary" />
|
||||||
|
|
||||||
|
<a href="{{ path('sylius_country_list') }}" class="btn btn-large">cancel</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{% extends 'SyliusResourceBundle::layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block sylius_content %}
|
||||||
|
{% include 'SyliusAddressingBundle:Country:_create.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{% extends 'SyliusResourceBundle::layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block sylius_content %}
|
||||||
|
{% include 'SyliusAddressingBundle:Country:_index.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
{% macro list(countries) %}
|
||||||
|
|
||||||
|
{% if countries|length > 0 %}
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{{ sylius_resource_sort('id', '#id') }}</th>
|
||||||
|
<th>{{ sylius_resource_sort('name') }}</th>
|
||||||
|
<th>{{ sylius_resource_sort('isoName', 'iso name') }}</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for country in countries %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ country.id }}</td>
|
||||||
|
<td>{{ country.name }}</td>
|
||||||
|
<td>{{ country.isoName }}</td>
|
||||||
|
<td>
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<a href="{{ path('sylius_province_create', {'countryId': country.id}) }}" class="btn">
|
||||||
|
<i class="icon-globe"></i> add province
|
||||||
|
</a>
|
||||||
|
<a href="{{ path('sylius_country_update', {'id': country.id}) }}" class="btn">
|
||||||
|
<i class="icon-pencil"></i> edit
|
||||||
|
</a>
|
||||||
|
<a href="{{ path('sylius_country_delete', {'id': country.id}) }}" class="btn btn-danger confirmer"
|
||||||
|
data-confirmer-question="Do you really want to delete country <strong>{{ country.name }}</strong>?"
|
||||||
|
>
|
||||||
|
<i class="icon-trash icon-white"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% if country.hasProvinces %}
|
||||||
|
<tr style="background-color: #f1f1f1;">
|
||||||
|
<td colspan="4"><strong>Provinces</strong></td>
|
||||||
|
</tr>
|
||||||
|
{% for province in country.provinces %}
|
||||||
|
<tr style="background-color: #f1f1f1;">
|
||||||
|
<td>{{ province.id }}</td>
|
||||||
|
<td>{{ province.name }}</td>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<a href="{{ path('sylius_province_update', {'countryId': country.id, 'id': province.id}) }}" class="btn">
|
||||||
|
<i class="icon-pencil"></i> edit
|
||||||
|
</a>
|
||||||
|
<a href="{{ path('sylius_province_delete', {'countryId': country.id, 'id': province.id}) }}" class="btn btn-danger confirmer"
|
||||||
|
data-confirmer-question="Do you really want to delete province <strong>{{ province.name }}</strong>?"
|
||||||
|
>
|
||||||
|
<i class="icon-trash icon-white"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<h4 class="alert-heading">Information</h4>
|
||||||
|
There are no countries configured
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endmacro %}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{% extends 'SyliusResourceBundle::layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block sylius_content %}
|
||||||
|
{% include 'SyliusAddressingBundle:Country:_update.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<h1>Creating province <small>Use this form to add new item to province book</small></h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form action="{{ path('sylius_province_create', {'countryId': province.country.id}) }}" method="post" class="form-horizontal" novalidate>
|
||||||
|
{% include 'SyliusAddressingBundle:Province:_form.html.twig' %}
|
||||||
|
<div class="form-actions">
|
||||||
|
<input type="submit" value="create province" class="btn btn-large btn-primary" />
|
||||||
|
|
||||||
|
<input type="reset" value="cancel" class="btn btn-large" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<fieldset>
|
||||||
|
{{ form_row(form.name, {'attr': {'class': 'input-xlarge'}}) }}
|
||||||
|
</fieldset>
|
||||||
|
{{ form_rest(form) }}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{{ form_row(form, {'attr': {'class': 'select2 input-medium'}}) }}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<h1>province updating <small>Use this form to edit existing province</small></h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<form action="{{ path('sylius_province_update', {'countryId': province.country.id, 'id': province.id}) }}" method="post" class="form-horizontal" novalidate>
|
||||||
|
{% include 'SyliusAddressingBundle:Province:_form.html.twig' %}
|
||||||
|
<div class="form-actions">
|
||||||
|
<input type="submit" value="save changes" class="btn btn-large btn-primary" />
|
||||||
|
|
||||||
|
<a href="{{ path('sylius_country_list') }}" class="btn btn-large">cancel</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{% extends 'SyliusResourceBundle::layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block sylius_content %}
|
||||||
|
{% include 'SyliusAddressingBundle:Province:_create.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue