Skip to content
Snippets Groups Projects
Unverified Commit 5aed1881 authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #21209 from colemanw/removeUnusedFunctions

Remove unused, duplicate functions getEntitiesByTag
parents 81e4aa09 8ce0aec8
Branches
Tags
No related merge requests found
......@@ -448,27 +448,6 @@ AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )";
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.
*
......
......@@ -290,26 +290,6 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag {
}
}
/**
* 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.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment