Skip to content
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

Remove unused, duplicate functions getEntitiesByTag #21209

Merged
merged 1 commit into from
Aug 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions CRM/Campaign/BAO/Petition.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,27 +448,6 @@ public static function getPetitionSignature($surveyId, $status_id = NULL) {
return $signature;
}

/**
* This function returns all entities assigned to a specific tag.
*
* @param object $tag
* An object of a tag.
*
* @return array
* array of contact ids
*/
public function getEntitiesByTag($tag) {
$contactIds = [];
$entityTagDAO = new CRM_Core_DAO_EntityTag();
$entityTagDAO->tag_id = $tag['id'];
$entityTagDAO->find();

while ($entityTagDAO->fetch()) {
$contactIds[] = $entityTagDAO->entity_id;
}
return $contactIds;
}

/**
* Check if contact has signed this petition.
*
Expand Down
20 changes: 0 additions & 20 deletions CRM/Core/BAO/EntityTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,26 +290,6 @@ public static function create(&$params, $entityTable, $entityID) {
}
}

/**
* This function returns all entities assigned to a specific tag.
*
* @param object $tag
* An object of a tag.
*
* @return array
* array of entity ids
*/
public function getEntitiesByTag($tag) {
$entityIds = [];
$entityTagDAO = new CRM_Core_DAO_EntityTag();
$entityTagDAO->tag_id = $tag->id;
$entityTagDAO->find();
while ($entityTagDAO->fetch()) {
$entityIds[] = $entityTagDAO->entity_id;
}
return $entityIds;
}

/**
* Get contact tags.
*
Expand Down