/**
* @param OptimizerInterface[] $capabilities
*/
private function displayCapabilities(OutputInterface
$output, array
$capabilities) { $table =
new Table($output);
$table->
setHeaders(['Optimizer', 'Runnable', 'Supported mime-types'
]);
foreach ($capabilities as $optimizer) { $table->
addRow([ $optimizer->
getName(),
$optimizer->
isRunnable() ? 'Yes' : 'No',
implode(', ',
$optimizer->
getSupportedMimeTypes()),
]);
} $table->
render();
} private function hasRunnableOptimizer(): bool
{ $optimizerService =
$this->
getContainer()->
get(\Shopware\Bundle\MediaBundle\OptimizerService::
class);
foreach ($optimizerService->
getOptimizers() as $optimizer) { if ($optimizer->
isRunnable()) {