/**
  * Function to delete Entity Role records
  *
  * @param  int  $entityRoleId ID of the EntityRole record to be deleted.
  *
  * @access public
  * @static
  */
 static function del($entityRoleId)
 {
     $entityDAO = new CRM_ACL_DAO_EntityRole();
     $entityDAO->id = $entityRoleId;
     $entityDAO->find(TRUE);
     $entityDAO->delete();
 }
 static function updateCiviACLEntityRole(&$params, $op)
 {
     $dao = new CRM_ACL_DAO_EntityRole();
     $dao->entity_table = 'civicrm_group';
     $dao->entity_id = $params['acl_group_id'];
     if ($op == 'delete') {
         $dao->delete();
         return;
     }
     $dao->acl_role_id = $params['acl_role_id'];
     $dao->find(TRUE);
     $dao->is_active = TRUE;
     $dao->save();
     $params['acl_entity_role_id'] = $dao->id;
 }
Esempio n. 3
0
 static function updateCiviACLEntityRole(&$params, $op)
 {
     require_once 'CRM/ACL/DAO/EntityRole.php';
     $dao = new CRM_ACL_DAO_EntityRole();
     $dao->entity_table = 'civicrm_group';
     $dao->entity_id = $params['acl_group_id'];
     if ($op == 'delete') {
         $dao->delete();
         return;
     }
     $dao->acl_role_id = $params['acl_role_id'];
     $dao->find(true);
     $dao->is_active = true;
     $dao->save();
     $params['acl_entity_role_id'] = $dao->id;
 }