/**
  * {@inheritdoc}
  */
 public function deleteBlocks($idLanguage, $idPage, $remove = false)
 {
     $blocks = BlockQuery::create()->_if($idLanguage)->filterByLanguageId($idLanguage)->_endif()->_if($idPage)->filterByPageId($idPage)->_endif();
     if ($remove) {
         $blocks->delete();
     } else {
         $blocks->update(array('ToDelete' => '1'));
     }
 }
 private function getDeletedBlocks($idLanguage, $idPage)
 {
     return \RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Model\BlockQuery::create()->filterByPageId($idPage)->filterByLanguageId($idLanguage)->orderBySlotName()->orderByContentPosition()->find();
 }