lib/Core/Service/BlockService.php
private function filterUntranslatedBlocks(iterable $blocks, ?array $locales, bool $useMainLocale): Generator
    {
        foreach ($blocks as $block) {
            try {
                yield $this->mapper->mapBlock($block, $locales, $useMainLocale);
            } catch (NotFoundException $e) {
                // Block does not have the translation, skip it
            }
        }
    }
private function filterUntranslatedBlocks(iterable $blocks, ?array $locales, bool $useMainLocale): Generator
    {
        foreach ($blocks as $block) {
            try {
                yield $this->mapper->mapBlock($block, $locales, $useMainLocale);
            } catch (NotFoundException $e) {
                // Block does not have the translation, skip it
            }
        }
    }
private function filterUntranslatedBlocks ( iterable $ blocks , ? array $ locales , bool $ useMainLocale ) : Generator { foreach ( $ blocks as $ block ) { try { yield $ this -> mapper -> mapBlock ( $ block , $ locales , $ useMainLocale ) ; } catch ( NotFoundException $ e ) { // Block does not have the translation, skip it } } }
Returns all blocks from provided input, with all untranslated blocks filtered out.
Returns all blocks from provided input with all untranslated blocks filtered out .