Esempio n. 1
0
 private function deleteSub($id_sub = null)
 {
     if (is_null($id_sub)) {
         return false;
     }
     $blocks = $this->getAllBlocks($id_sub);
     $del = true;
     if ($blocks && count($blocks) > 0) {
         foreach ($blocks as $bl) {
             $del &= $this->deleteBlock($bl['id_block']);
         }
     }
     if ($del) {
         $sub = new Submenu($id_sub);
         return $sub->delete();
     }
     return false;
 }