public function stopParent()
    {
        if (!empty($this->currentBlockName)) {
            throw new InvalidParamException("Unclosed startBlock detected in '{$this->processingViewFile}'");
        }
        if (empty($this->_extendingParent[$this->processingViewFile])) {
            throw new InvalidParamException("stopParent unexpected here without startParent in '{$this->processingViewFile}'");
        }
        $this->_extendingParent[$this->processingViewFile] = false;

        $lost = ob_get_clean(); // lost all non-block info between startParent...stopParent
        
        // render parent view with blocks inclusions
        $parentFile = $this->findParentViewFile($this->processingViewFile);
        if ($parentFile) {
            $this->_currentViewFile[$this->viewFile] = $parentFile;

            $parentDataFile = $this->viewFile;
            $params = empty($this->_viewsParams[$parentDataFile]) ? [] : $this->_viewsParams[$parentDataFile];
            if (!empty($this->_addParentData[$parentDataFile])) {
                $addParentData = $this->_addParentData[$parentDataFile];
                $params = ArrayHelper::merge($params, $addParentData);
            }
            $result = $this->renderPhpFile($parentFile, $params);
            $n = $this->hasParentBlock($result);
            while ($n--) {
                $result = $this->replaceParentBlock($result);
            }
            if ($this->hasParentBlock($result)) {
                throw new InvalidParamException("Unprocessed nested parentBlock found in '{$this->processingViewFile}'");
            }            
            echo $result;
        }
    }