use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class SnippetsFindMissingCommand extends ShopwareCommand
implements CompletionAwareInterface
{ /**
* {@inheritdoc}
*/
public function completeOptionValues($optionName, CompletionContext
$context) { if ($optionName === 'target'
) { return $this->
completeDirectoriesInDirectory();
} elseif ($optionName === 'fallback'
) { $localeRepository =
$this->
getContainer()->
get(ModelManager::
class)->
getRepository(Locale::
class);
$queryBuilder =
$localeRepository->
createQueryBuilder('locale'
);
if ($context->
getCurrentWord() !== ''
) { $queryBuilder->
andWhere($queryBuilder->
expr()->
like('locale.locale', ':search'
)) ->
setParameter('search',
addcslashes($context->
getCurrentWord(), '_%'
) . '%'
);
} $result =
$queryBuilder->
select(['locale.locale'
]) ->
getQuery()