-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,097 changed files
with
41,683 additions
and
5,206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Marello"> | ||
<description>PSR2 ruleset with Marello configuration</description> | ||
<rule ref="PSR2"/> | ||
<exclude-pattern>*/marellocommerce/*/*/*/*/*/Tests/*</exclude-pattern> | ||
<exclude-pattern>*/marellocommerce/*/*/*/*/*/Migrations/Schema/*</exclude-pattern> | ||
|
||
<arg name="extensions" value="php"/> | ||
<arg name="report" value="checkstyle"/> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
src/Marello/Bundle/AddressBundle/Entity/Repository/MarelloAddressRepository.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?php | ||
|
||
namespace Marello\Bundle\AddressBundle\Entity\Repository; | ||
|
||
use Doctrine\ORM\EntityRepository; | ||
use Marello\Bundle\AddressBundle\Entity\MarelloAddress; | ||
use MarelloEnterprise\Bundle\AddressBundle\Entity\MarelloEnterpriseAddress; | ||
use Oro\Bundle\SecurityBundle\ORM\Walker\AclHelper; | ||
|
||
class MarelloAddressRepository extends EntityRepository | ||
{ | ||
/** | ||
* @var AclHelper | ||
*/ | ||
private $aclHelper; | ||
|
||
/** | ||
* @param AclHelper $aclHelper | ||
*/ | ||
public function setAclHelper(AclHelper $aclHelper) | ||
{ | ||
$this->aclHelper = $aclHelper; | ||
} | ||
|
||
/** | ||
* @param MarelloAddress $address | ||
* | ||
* @return MarelloEnterpriseAddress[] | ||
*/ | ||
public function findByAddressParts(MarelloAddress $address) | ||
{ | ||
$qb = $this->createQueryBuilder('addr'); | ||
$qb | ||
->innerJoin('addr.country', 'country') | ||
->andWhere($qb->expr()->eq('country.iso2Code', ':countryIso2')) | ||
->andWhere($qb->expr()->eq('addr.city', ':city')) | ||
->andWhere($qb->expr()->eq('addr.street', ':street')) | ||
->setParameter('countryIso2', $address->getCountryIso2()) | ||
->setParameter('city', $address->getCity()) | ||
->setParameter('street', $address->getStreet()); | ||
|
||
if ($address->getRegion() === null) { | ||
$qb->andWhere('addr.region IS NULL'); | ||
} else { | ||
$qb | ||
->innerJoin('addr.region', 'region') | ||
->andWhere($qb->expr()->eq('region.code', ':regionCode')) | ||
->setParameter('regionCode', $address->getRegionCode()); | ||
} | ||
if ($address->getRegionText() === null) { | ||
$qb->andWhere('addr.regionText IS NULL'); | ||
} else { | ||
$qb | ||
->andWhere($qb->expr()->eq('addr.regionText', ':regionText')) | ||
->setParameter('regionText', $address->getRegionText()); | ||
} | ||
if ($address->getStreet2() === null) { | ||
$qb->andWhere('addr.street2 IS NULL'); | ||
} else { | ||
$qb | ||
->andWhere($qb->expr()->eq('addr.street2', ':street2')) | ||
->setParameter('street2', $address->getStreet2()); | ||
} | ||
if ($address->getPostalCode() === null) { | ||
$qb->andWhere('addr.postalCode IS NULL'); | ||
} else { | ||
$qb | ||
->andWhere($qb->expr()->eq('addr.postalCode', ':postalCode')) | ||
->setParameter('postalCode', $address->getPostalCode()); | ||
} | ||
|
||
return $this->aclHelper->apply($qb)->getResult(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/Marello/Bundle/AddressBundle/Resources/config/jsmodules.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dynamic-imports: | ||
marelloaddress: | ||
- marelloaddress/js/address | ||
- marelloaddress/js/app/components/address-component |
10 changes: 10 additions & 0 deletions
10
src/Marello/Bundle/AddressBundle/Resources/config/oro/placeholders.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
placeholders: | ||
placeholders: | ||
marello_address_map: | ||
items: | ||
marello_address_item_map: | ||
order: 100 | ||
|
||
items: | ||
marello_address_item_map: | ||
template: MarelloAddressBundle:Address:addressMap.html.twig |
3 changes: 0 additions & 3 deletions
3
src/Marello/Bundle/AddressBundle/Resources/config/requirejs.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/Marello/Bundle/AddressBundle/Resources/public/js/app/components/address-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
define(function(require) { | ||
'use strict'; | ||
|
||
const BaseComponent = require('oroui/js/app/components/base/component'); | ||
const widgetManager = require('oroui/js/widget-manager'); | ||
const Address = require('marelloaddress/js/address'); | ||
const routing = require('routing'); | ||
const _ = require('underscore'); | ||
|
||
const AddressWidgetComponent = BaseComponent.extend({ | ||
optionNames: BaseComponent.prototype.optionNames.concat([ | ||
'wid', 'addressCreateUrl', 'addressUpdateRoute', 'addressDeleteRoute' | ||
]), | ||
|
||
options: null, | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
constructor: function AddressWidgetComponent(options) { | ||
AddressWidgetComponent.__super__.constructor.call(this, options); | ||
}, | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
initialize: function(options) { | ||
this.options = options; | ||
AddressWidgetComponent.__super__.initialize.call(this, options); | ||
widgetManager.getWidgetInstance(this.wid, this._initializeAddress.bind(this)); | ||
}, | ||
|
||
_initializeAddress: function(widget) { | ||
const options = this.options; | ||
return new Address({ | ||
el: this.options.el, | ||
addressId: this.options.addressId, | ||
addressUpdateUrl: function() { | ||
return routing.generate(options.addressUpdateRoute.route, {'id': options.addressUpdateRoute.id }) | ||
}, | ||
widget: widget | ||
}); | ||
} | ||
|
||
}); | ||
|
||
return AddressWidgetComponent; | ||
}); |
2 changes: 1 addition & 1 deletion
2
...ews/Customer/customerAddressMap.html.twig → ...ources/views/Address/addressMap.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Marello/Bundle/BankTransferBundle/DependencyInjection/MarelloBankTransferExtension.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Marello\Bundle\BankTransferBundle\DependencyInjection; | ||
|
||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Loader; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
|
||
class MarelloBankTransferExtension extends Extension | ||
{ | ||
const ALIAS = 'marello_bank_transfer'; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function load(array $configs, ContainerBuilder $container) | ||
{ | ||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | ||
$loader->load('payment.yml'); | ||
$loader->load('integration.yml'); | ||
$loader->load('factory.yml'); | ||
$loader->load('services.yml'); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function getAlias() | ||
{ | ||
return self::ALIAS; | ||
} | ||
} |
Oops, something went wrong.