$supportedFormats =
$this->writer->
getFormats();
if (!\
in_array($format,
$supportedFormats, true
)) { $errorIo->
error(['Wrong output format', 'Supported formats are: '.
implode(', ',
$supportedFormats).', xlf12 and xlf20.'
]);
return 1;
} /** @var KernelInterface $kernel */
$kernel =
$this->
getApplication()->
getKernel();
// Define Root Paths
$transPaths =
$this->
getRootTransPaths();
$codePaths =
$this->
getRootCodePaths($kernel);
$currentName = 'default directory';
// Override with provided Bundle info
if (null !==
$input->
getArgument('bundle'
)) { try { $foundBundle =
$kernel->
getBundle($input->
getArgument('bundle'
));
$bundleDir =
$foundBundle->
getPath();
$transPaths =
[is_dir($bundleDir.'/Resources/translations'
) ?
$bundleDir.'/Resources/translations' :
$bundleDir.'/translations'
];
$codePaths =
[is_dir($bundleDir.'/Resources/views'
) ?
$bundleDir.'/Resources/views' :
$bundleDir.'/templates'
];