$data['preset_flags'] = array(); } if ($pcf_id != '' and isset($data['preset'])) { Debug::Text('Applying Preset!', __FILE__, __LINE__, __METHOD__, 10); $pf = new PermissionFactory(); $pf->applyPreset($pcf_id, $data['preset'], $data['preset_flags']); } } } //$pcf->FailTransaction(); $pcf->CommitTransaction(); Redirect::Page(URLBuilder::getURL(array(), 'PermissionControlList.php')); break; } } $pcf->FailTransaction(); default: $pf = new PermissionFactory(); $plf = new PermissionListFactory(); if (isset($id)) { BreadCrumb::setCrumb($title); $pclf = new PermissionControlListFactory(); $pclf->getByIdAndCompanyId($id, $current_company->getId()); foreach ($pclf as $pc_obj) { $data = array('id' => $pc_obj->getId(), 'name' => $pc_obj->getName(), 'description' => $pc_obj->getDescription(), 'user_ids' => $pc_obj->getUser(), 'created_date' => $pc_obj->getCreatedDate(), 'created_by' => $pc_obj->getCreatedBy(), 'updated_date' => $pc_obj->getUpdatedDate(), 'updated_by' => $pc_obj->getUpdatedBy(), 'deleted_date' => $pc_obj->getDeletedDate(), 'deleted_by' => $pc_obj->getDeletedBy()); } //$plf->getAllPermissionsByCompanyIdAndPermissionControlId($company_id, $id); $plf->getByCompanyIdAndPermissionControlId($current_company->getId(), $id); if ($plf->getRecordCount() > 0) { Debug::Text('Found Current Permissions!', __FILE__, __LINE__, __METHOD__, 10); foreach ($plf as $p_obj) {