Beispiel #1
0
 /**
  * @param int $idCmsPage
  *
  * @throws \Exception
  *
  * @return void
  */
 public function delete($idCmsPage)
 {
     $this->cmsQueryContainer->getConnection()->beginTransaction();
     try {
         $cmsPageEntity = $this->findCmsPageEntity($idCmsPage);
         if ($cmsPageEntity) {
             $this->deletePageWithRelations($cmsPageEntity);
             $this->touchDeletedPage($idCmsPage);
         }
         $this->cmsQueryContainer->getConnection()->commit();
     } catch (\Exception $e) {
         $this->cmsQueryContainer->getConnection()->rollBack();
         throw $e;
     }
 }