source/Core/SystemRequirements.php
protected function _checkTemplateBlock($sTemplate, $sBlockName)
    {
        $sTplFile = Registry::getConfig()->getTemplatePath($sTemplate, false);
        if (!$sTplFile || !file_exists($sTplFile)) {
            // check if file is in admin theme
            $sTplFile = Registry::getConfig()->getTemplatePath($sTemplate, true);
            if (!$sTplFile || !file_exists($sTplFile)) {
                return false;
            }
        }

        $sFile = file_get_contents($sTplFile);
        $sBlockNameQuoted = preg_quote($sBlockName, '/');

        return (bool) preg_match('/\[\{\s*block\s+name\s*=\s*([\'"])' . $sBlockNameQuoted . '\1\s*\}\]/is', $sFile);
    }
protected function _checkTemplateBlock($sTemplate, $sBlockName)
    {
        $sTplFile = Registry::getConfig()->getTemplatePath($sTemplate, false);
        if (!$sTplFile || !file_exists($sTplFile)) {
            // check if file is in admin theme
            $sTplFile = Registry::getConfig()->getTemplatePath($sTemplate, true);
            if (!$sTplFile || !file_exists($sTplFile)) {
                return false;
            }
        }

        $sFile = file_get_contents($sTplFile);
        $sBlockNameQuoted = preg_quote($sBlockName, '/');

        return (bool) preg_match('/\[\{\s*block\s+name\s*=\s*([\'"])' . $sBlockNameQuoted . '\1\s*\}\]/is', $sFile);
    }
protected function _checkTemplateBlock ( $ sTemplate , $ sBlockName ) { $ sTplFile = Registry :: getConfig ( ) -> getTemplatePath ( $ sTemplate , false ) ; if ( ! $ sTplFile || ! file_exists ( $ sTplFile ) ) { // check if file is in admin theme $ sTplFile = Registry :: getConfig ( ) -> getTemplatePath ( $ sTemplate , true ) ; if ( ! $ sTplFile || ! file_exists ( $ sTplFile ) ) { return false ; } } $ sFile = file_get_contents ( $ sTplFile ) ; $ sBlockNameQuoted = preg_quote ( $ sBlockName , '/' ) ; return ( bool ) preg_match ( '/\[\{\s*block\s+name\s*=\s*([\'"])' . $ sBlockNameQuoted . '\1\s*\}\]/is' , $ sFile ) ; }
check if given template contains the given block

@param string $sTemplate  template file name
@param string $sBlockName block name

@see getMissingTemplateBlocks

@return bool
check if given template contains the given block