-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathECommercePackage.php
24 lines (20 loc) · 1.05 KB
/
ECommercePackage.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
namespace UVDesk\CommunityPackages\UVDesk\ECommerce;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Webkul\UVDesk\ExtensionFrameworkBundle\Definition\Package\Package;
use Webkul\UVDesk\ExtensionFrameworkBundle\Definition\Package\PackageInterface;
use UVDesk\CommunityPackages\UVDesk\ECommerce\Utils\ECommercePlatformInterface;
use Webkul\UVDesk\ExtensionFrameworkBundle\Definition\Package\ContainerBuilderAwarePackageInterface;
class ECommercePackage extends Package implements PackageInterface, ContainerBuilderAwarePackageInterface
{
public function process(ContainerBuilder $container)
{
if ($container->has(ECommerce::class)) {
$eCommerceConfiguration = $container->findDefinition(ECommerce::class);
foreach ($container->findTaggedServiceIds(ECommercePlatformInterface::class) as $reference => $tags) {
$eCommerceConfiguration->addMethodCall('addECommercePlatform', array(new Reference($reference), $tags));
}
}
}
}