Permalink
Browse files

Register configuration as TCPDF defines.

  • Loading branch information...
1 parent 71c4c0d commit b796370e3ea71728221cf8948cdc237b2b42a56e @richsage richsage committed Feb 23, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 DependencyInjection/WhiteOctoberTCPDFExtension.php
@@ -28,5 +28,14 @@ public function load(array $configs, ContainerBuilder $container)
$processor = new Processor();
$configuration = new Configuration();
$config = $processor->processConfiguration($configuration, $configs);
+
+ // TCPDF needs these constants defining
+ foreach ($config as $k => $v)
+ {
+ define(strtoupper($k), $container->getParameterBag()->resolveValue($v));
+ }
+
+ // and the final one so that TCPDF uses our config and not the .php file one
+ define('K_TCPDF_EXTERNAL_CONFIG', true);
}
}

0 comments on commit b796370

Please sign in to comment.