-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ACLEntityRole BAO tidy fixes #20504
ACLEntityRole BAO tidy fixes #20504
Conversation
(Standard links)
|
* | ||
* @param int $entityRoleId | ||
* ID of the EntityRole record to be deleted. | ||
* | ||
*/ | ||
public static function del($entityRoleId) { | ||
$entityDAO = new CRM_ACL_DAO_EntityRole(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we should remove this function OR add a warning that says:
\CRM_Core_Error::deprecatedWarning(__CLASS__ . '::' . __FUNCTION__ . ' is deprecated, use ' . __CLASS__ . '::deleteRecord.' );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - I think the api v3 would hit that? I'm happy to merge as is & we can look at that as a follow up
CRM/ACL/BAO/ACLEntityRole.php
Outdated
$entityDAO = new self(); | ||
$entityDAO->id = $entityRoleId; | ||
$entityDAO->find(TRUE); | ||
$entityDAO->delete(); | ||
} | ||
|
||
/** | ||
* @param array $record | ||
* @return CRM_Contact_DAO_DashboardContact | ||
* @throws CRM_Core_Exception | ||
*/ | ||
public static function deleteRecord(array $record) { | ||
return parent::deleteRecord($record); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$entityDAO = new self(); | |
$entityDAO->id = $entityRoleId; | |
$entityDAO->find(TRUE); | |
$entityDAO->delete(); | |
} | |
/** | |
* @param array $record | |
* @return CRM_Contact_DAO_DashboardContact | |
* @throws CRM_Core_Exception | |
*/ | |
public static function deleteRecord(array $record) { | |
return parent::deleteRecord($record); | |
return parent::deleteRecord(['id' => $entityRoleId]); |
57f6ced
to
29a0c5c
Compare
Overview
Miscellaneous fixes on
Technical Details
Followup PR of #20474
Comments
ping @eileenmcnaughton @seamuslee001 @colemanw