public function clearPageBlocks($languageId, $pageId, $skipRepeated = true)
    {
        try {
            $this->blockRepository->startTransaction();

            $pageBlocks = clone($this->pageBlocks);
            $this->pageBlocks->refresh($languageId, $pageId);

            $result = $this->clearBlocks($skipRepeated);
            $this->pageBlocks = $pageBlocks;

            if ($result !== false) {
                $this->blockRepository->commit();

                return $result;
            }

            $this->blockRepository->rollBack();

            return $result;
        } catch (\Exception $e) {
            $this->blockRepository->rollBack();

            throw $e;
        }
    }
public function clearPageBlocks($languageId, $pageId, $skipRepeated = true)
    {
        try {
            $this->blockRepository->startTransaction();

            $pageBlocks = clone($this->pageBlocks);
            $this->pageBlocks->refresh($languageId, $pageId);

            $result = $this->clearBlocks($skipRepeated);
            $this->pageBlocks = $pageBlocks;

            if ($result !== false) {
                $this->blockRepository->commit();

                return $result;
            }

            $this->blockRepository->rollBack();

            return $result;
        } catch (\Exception $e) {
            $this->blockRepository->rollBack();

            throw $e;
        }
    }
public function clearPageBlocks ( $ languageId , $ pageId , $ skipRepeated = true ) { try { $ this -> blockRepository -> startTransaction ( ) ; $ pageBlocks = clone ( $ this -> pageBlocks ) ; $ this -> pageBlocks -> refresh ( $ languageId , $ pageId ) ; $ result = $ this -> clearBlocks ( $ skipRepeated ) ; $ this -> pageBlocks = $ pageBlocks ; if ( $ result !== false ) { $ this -> blockRepository -> commit ( ) ; return $ result ; } $ this -> blockRepository -> rollBack ( ) ; return $ result ; } catch ( \ Exception $ e ) { $ this -> blockRepository -> rollBack ( ) ; throw $ e ; } }
Clear the blocks from the whole slot managers managed by the template manager,
for a page identified by the required parameters

@param  int        $languageId
@param  int        $pageId
@param  boolean    $skipRepeated
@return boolean
@throws \Exception

@api
Clear the blocks from the whole slot managers managed by the template manager for a page identified by the required parameters