if ($action !== 'get') {
return FALSE;
}
+ if (CoreUtil::isContact($entity)) {
+ return TRUE;
+ }
$usedFor = \CRM_Core_OptionGroup::values('tag_used_for', FALSE, FALSE, FALSE, NULL, 'name');
return in_array($entity, $usedFor, TRUE);
}
use Civi\Api4\Contact;
use api\v4\Api4TestBase;
use Civi\Api4\EntityTag;
+use Civi\Api4\Individual;
use Civi\Api4\Tag;
use Civi\Test\TransactionalInterface;
$this->assertCount(1, $shouldReturnContact1);
$this->assertEquals($contact1['id'], $shouldReturnContact1->first()['id']);
- $shouldReturnContact2 = Contact::get(FALSE)
+ $shouldReturnContact2 = Individual::get(FALSE)
->addSelect('id')
->addWhere('tags', 'IN', [$setChild['id']])
->execute();