web/UniView.php
protected function replaceParentBlock($savedContent)
    {
       $pattern = sprintf(self::TMPL_RENDER_PARENT, "([^']+)", "([^|]+)");
       $result = preg_match("/{$pattern}/", $savedContent, $matches);
       if (!$result) {
           return $savedContent;
       } else { // processing parentBlock()
           $fullBlockName = $matches[1];
           $viewFileName = $matches[2];
           $replacement = $this->findParentBlock($fullBlockName, $viewFileName);
           $out = preg_replace("/{$pattern}/", $replacement, $savedContent);
           return $out;
       }
    }
protected function replaceParentBlock($savedContent)
    {
       $pattern = sprintf(self::TMPL_RENDER_PARENT, "([^']+)", "([^|]+)");
       $result = preg_match("/{$pattern}/", $savedContent, $matches);
       if (!$result) {
           return $savedContent;
       } else { // processing parentBlock()
           $fullBlockName = $matches[1];
           $viewFileName = $matches[2];
           $replacement = $this->findParentBlock($fullBlockName, $viewFileName);
           $out = preg_replace("/{$pattern}/", $replacement, $savedContent);
           return $out;
       }
    }
protected function replaceParentBlock ( $ savedContent ) { $ pattern = sprintf ( self :: TMPL_RENDER_PARENT , "([^']+)" , "([^|]+)" ) ; $ result = preg_match ( "/{$pattern}/" , $ savedContent , $ matches ) ; if ( ! $ result ) { return $ savedContent ; } else { // processing parentBlock() $ fullBlockName = $ matches [ 1 ] ; $ viewFileName = $ matches [ 2 ] ; $ replacement = $ this -> findParentBlock ( $ fullBlockName , $ viewFileName ) ; $ out = preg_replace ( "/{$pattern}/" , $ replacement , $ savedContent ) ; return $ out ; } }
Replace in block tag with parentBlock info.
@param string $savedContent
@return string
Replace in block tag with parentBlock info .