unset($pc_obj, $permission_arr);
         }
     }
     $pclf->CommitTransaction();
     Redirect::Page(URLBuilder::getURL(NULL, 'PermissionControlList.php'));
     break;
 case 'delete':
 case 'undelete':
     if (strtolower($action) == 'delete') {
         $delete = TRUE;
     } else {
         $delete = FALSE;
     }
     $pclf = new PermissionControlListFactory();
     foreach ($ids as $id) {
         $pclf->getByIdAndCompanyId($id, $current_company->getId());
         foreach ($pclf as $pc_obj) {
             $pc_obj->setDeleted($delete);
             if ($pc_obj->isValid()) {
                 $pc_obj->Save();
             }
         }
     }
     Redirect::Page(URLBuilder::getURL(NULL, 'PermissionControlList.php'));
     break;
 default:
     $pclf = new PermissionControlListFactory();
     $pclf->getByCompanyId($current_company->getId(), $current_user_prefs->getItemsPerPage(), $page, NULL, $sort_array);
     $pager = new Pager($pclf);
     foreach ($pclf as $pc_obj) {
         $rows[] = array('id' => $pc_obj->getId(), 'name' => $pc_obj->getColumn('name'), 'description' => $pc_obj->getColumn('description'), 'deleted' => $pc_obj->getDeleted());