source/Core/Module/ModuleTemplateBlockRepository.php
public function getBlocks($shopTemplateName, $activeModulesId, $shopId, $themesId = [])
    {
        $modulesId = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($activeModulesId));

        $activeThemesIdQuery = $this->formActiveThemesIdQuery($themesId);
        $sql = "select *
                    from oxtplblocks
                    where oxactive=1
                        and oxshopid=?
                        and oxtemplate=?
                        and oxmodule in ( " . $modulesId . " )
                        and oxtheme in (" . $activeThemesIdQuery . ")
                        order by oxpos asc, oxtheme asc, oxid asc";
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);

        return $db->getAll($sql, [$shopId, $shopTemplateName]);
    }
public function getBlocks($shopTemplateName, $activeModulesId, $shopId, $themesId = [])
    {
        $modulesId = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($activeModulesId));

        $activeThemesIdQuery = $this->formActiveThemesIdQuery($themesId);
        $sql = "select *
                    from oxtplblocks
                    where oxactive=1
                        and oxshopid=?
                        and oxtemplate=?
                        and oxmodule in ( " . $modulesId . " )
                        and oxtheme in (" . $activeThemesIdQuery . ")
                        order by oxpos asc, oxtheme asc, oxid asc";
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);

        return $db->getAll($sql, [$shopId, $shopTemplateName]);
    }
public function getBlocks ( $ shopTemplateName , $ activeModulesId , $ shopId , $ themesId = [ ] ) { $ modulesId = implode ( ", " , \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) -> quoteArray ( $ activeModulesId ) ) ; $ activeThemesIdQuery = $ this -> formActiveThemesIdQuery ( $ themesId ) ; $ sql = "select *
                    from oxtplblocks
                    where oxactive=1
                        and oxshopid=?
                        and oxtemplate=?
                        and oxmodule in ( " . $ modulesId . " )
                        and oxtheme in (" . $ activeThemesIdQuery . ")
                        order by oxpos asc, oxtheme asc, oxid asc" ; $ db = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: FETCH_MODE_ASSOC ) ; return $ db -> getAll ( $ sql , [ $ shopId , $ shopTemplateName ] ) ; }
Get modules template blocks information filtered by provided parameters.

@param string $shopTemplateName shop template file name.
@param array  $activeModulesId  list of modules to get information about.
@param string $shopId           in which Shop modules must be active.
@param array  $themesId         list of themes to get information about.

@return array
Get modules template blocks information filtered by provided parameters .