hasDefinition('chill.main.form.pick_centers_type')) { throw new LogicException('The service chill.main.form.pick_centers_type does ' . 'not exists in container'); } $pickCenterType = $container->getDefinition('chill.main.form.pick_centers_type'); foreach ($container->findTaggedServiceIds('chill.grouping_center') as $serviceId => $tagged) { $pickCenterType->addMethodCall( 'addGroupingCenter', [new Reference($serviceId)] ); } } }