ts('Contact'), 'civicrm_group' => ts('Group'), ); } return self::$_entityTable; } /** * @param array $params * * @return CRM_ACL_DAO_EntityRole */ static function create(&$params) { $dao = new CRM_ACL_DAO_EntityRole(); $dao->copyValues($params); $dao->save(); return $dao; } /** * @param array $params * @param $defaults */ static function retrieve(&$params, &$defaults) { CRM_Core_DAO::commonRetrieve('CRM_ACL_DAO_EntityRole', $params, $defaults); } /** * Update the is_active flag in the db * * @param int $id id of the database record * @param boolean $is_active value we want to set the is_active field * * @return Object DAO object on sucess, null otherwise * @static */ static function setIsActive($id, $is_active) { return CRM_Core_DAO::setFieldValue('CRM_ACL_DAO_EntityRole', $id, 'is_active', $is_active); } /** * 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(); } }