Skip to content

Commit

Permalink
Merge branch 'lexik:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
raziel057 authored Oct 24, 2023
2 parents e267837 + 6bd4e3d commit e05cbf9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions DependencyInjection/LexikTranslationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ protected function buildTranslationStorageDefinition(ContainerBuilder $container
throw new \RuntimeException(sprintf('Unsupported storage "%s".', $storage));
}

$args[] = ['trans_unit' => new Parameter(sprintf('lexik_translation.%s.trans_unit.class', $storage)), 'translation' => new Parameter(sprintf('lexik_translation.%s.translation.class', $storage)), 'file' => new Parameter(sprintf('lexik_translation.%s.file.class', $storage))];
$args[] = [
'trans_unit' => new Parameter(sprintf('lexik_translation.%s.trans_unit.class', $storage)),
'translation' => new Parameter(sprintf('lexik_translation.%s.translation.class', $storage)),
'file' => new Parameter(sprintf('lexik_translation.%s.file.class', $storage))
];

$storageDefinition = new Definition();
$storageDefinition->setClass($container->getParameter(sprintf('lexik_translation.%s.translation_storage.class', $storage)));
Expand All @@ -194,7 +198,10 @@ protected function buildTranslationStorageDefinition(ContainerBuilder $container
*/
protected function createDoctrineMappingDriver(ContainerBuilder $container, $driverId, $driverClass)
{
$driverDefinition = new Definition($driverClass, [[realpath(__DIR__.'/../Resources/config/model') => 'Lexik\Bundle\TranslationBundle\Model'], SimplifiedXmlDriver::DEFAULT_FILE_EXTENSION, true]);
$driverDefinition = new Definition($driverClass, [
[realpath(__DIR__.'/../Resources/config/model') => 'Lexik\Bundle\TranslationBundle\Model'],
SimplifiedXmlDriver::DEFAULT_FILE_EXTENSION, true
]);
$driverDefinition->setPublic(false);

$container->setDefinition($driverId, $driverDefinition);
Expand Down

0 comments on commit e05cbf9

Please sign in to comment.