source/Core/UtilsView.php
private function fillTemplateBlockWithContent($blockTemplates)
    {
        $templateBlocksWithContent = [];

        foreach ($blockTemplates as $activeBlockTemplate) {
            try {
                if (!is_array($templateBlocksWithContent[$activeBlockTemplate['OXBLOCKNAME']])) {
                    $templateBlocksWithContent[$activeBlockTemplate['OXBLOCKNAME']] = [];
                }
                $templateBlocksWithContent[$activeBlockTemplate['OXBLOCKNAME']][] = $this->_getTemplateBlock($activeBlockTemplate['OXMODULE'], $activeBlockTemplate['OXFILE']);
            } catch (\OxidEsales\Eshop\Core\Exception\StandardException $exception) {
                \OxidEsales\Eshop\Core\Registry::getLogger()->error($exception->getMessage(), [$exception]);
            }
        }

        return $templateBlocksWithContent;
    }
private function fillTemplateBlockWithContent($blockTemplates)
    {
        $templateBlocksWithContent = [];

        foreach ($blockTemplates as $activeBlockTemplate) {
            try {
                if (!is_array($templateBlocksWithContent[$activeBlockTemplate['OXBLOCKNAME']])) {
                    $templateBlocksWithContent[$activeBlockTemplate['OXBLOCKNAME']] = [];
                }
                $templateBlocksWithContent[$activeBlockTemplate['OXBLOCKNAME']][] = $this->_getTemplateBlock($activeBlockTemplate['OXMODULE'], $activeBlockTemplate['OXFILE']);
            } catch (\OxidEsales\Eshop\Core\Exception\StandardException $exception) {
                \OxidEsales\Eshop\Core\Registry::getLogger()->error($exception->getMessage(), [$exception]);
            }
        }

        return $templateBlocksWithContent;
    }
private function fillTemplateBlockWithContent ( $ blockTemplates ) { $ templateBlocksWithContent = [ ] ; foreach ( $ blockTemplates as $ activeBlockTemplate ) { try { if ( ! is_array ( $ templateBlocksWithContent [ $ activeBlockTemplate [ 'OXBLOCKNAME' ] ] ) ) { $ templateBlocksWithContent [ $ activeBlockTemplate [ 'OXBLOCKNAME' ] ] = [ ] ; } $ templateBlocksWithContent [ $ activeBlockTemplate [ 'OXBLOCKNAME' ] ] [ ] = $ this -> _getTemplateBlock ( $ activeBlockTemplate [ 'OXMODULE' ] , $ activeBlockTemplate [ 'OXFILE' ] ) ; } catch ( \ OxidEsales \ Eshop \ Core \ Exception \ StandardException $ exception ) { \ OxidEsales \ Eshop \ Core \ Registry :: getLogger ( ) -> error ( $ exception -> getMessage ( ) , [ $ exception ] ) ; } } return $ templateBlocksWithContent ; }
Fill array with template content or skip if template does not exist.
Logs error message if template does not exist.

Example of $activeBlockTemplates:

OXTEMPLATE = "requested_template_name.tpl"  OXBLOCKNAME = "block_name_a"
"content_a_active"

OXTEMPLATE = "requested_template_name.tpl"  OXBLOCKNAME = "block_name_b"
OXFILE = "x"
"content_b_x_default"

OXTEMPLATE = "requested_template_name.tpl"  OXBLOCKNAME = "block_name_b"
OXFILE = "y"
"content_b_y_default"

Example of return:

$templateBlocks = [
block_name_a = [
0 => "content_a_active"
],
block_name_c = [
0 => "content_b_x_default",
1 => "content_b_y_default"
]
]

@param array $blockTemplates

@return array
Fill array with template content or skip if template does not exist . Logs error message if template does not exist .