partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

XmlExcelFormatPass.php (540B)


      1 <?php
      2 
      3 namespace PartKeepr\ExportBundle\DependencyInjection\Compiler;
      4 
      5 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
      6 use Symfony\Component\DependencyInjection\ContainerBuilder;
      7 
      8 class XmlExcelFormatPass implements CompilerPassInterface
      9 {
     10     public function process(ContainerBuilder $container)
     11     {
     12         $container->getDefinition('api.format_negotiator')->addMethodCall('registerFormat', [
     13             'xlsx', ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'], true,
     14         ]);
     15     }
     16 }