CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • What is the syntax for calling tag_entities_get?
Pages: [1]

Author Topic: What is the syntax for calling tag_entities_get?  (Read 686 times)

Jeremy Proffitt

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
    • Mobius New Media
  • CiviCRM version: 4.4.x
  • CMS version: Joomla 2.5.x/3.x / D7
  • MySQL version: 5.1.x
  • PHP version: 5.3.10+, 5.4.x
What is the syntax for calling tag_entities_get?
July 07, 2012, 06:55:25 pm
What is the PHP api syntax for calling the tag_entities_get method on the EntityTag API class? Because it uses a non-standard naming convention, it seems to be unavailable to the civicrm_api method.

I need to generate a list of tags that are assigned to a group of contacts, so this is really the only way to get that information.

Thanks!
Jeremy Proffitt
Mobius New Media
IRC: JP_EzoD

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: What is the syntax for calling tag_entities_get?
July 08, 2012, 04:45:26 am
Why do you think it's non standard? Works like the others EntityTag.

Use civicrm/api/explorer to see what entities are available

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: What is the syntax for calling tag_entities_get?
July 08, 2012, 01:53:37 pm
Nope - tag_entities_get is api v2 - in api v3 the call is

civicrm_api('entity_tag','get',array('version' => 3);

http://api.civicrm.org/v3/CiviCRM_APIv3/API_EntityTag/_api---v3---EntityTag.php.html#functioncivicrm_api3_entity_tag_get

tag_entities get has actually been entirely removed from v3 on the basis it never worked via the api wrapper so we can be sure it's not in use in v3. However, I see the phpdoc hasn't been updated since 26 March so it's still in there.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Jeremy Proffitt

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
    • Mobius New Media
  • CiviCRM version: 4.4.x
  • CMS version: Joomla 2.5.x/3.x / D7
  • MySQL version: 5.1.x
  • PHP version: 5.3.10+, 5.4.x
Re: What is the syntax for calling tag_entities_get?
July 28, 2012, 10:40:58 am
Since the API docs aren't completely up to date, it might be better to explain the goal. I've implemented a auto completing tag-driven search via Joomla module in the frontend. Via tag_get, I can get the full list of tags. What I need is to only get the tags that have been assigned to members of a particular group. This would mean I'd need to be able to use EntityTag and provide a list of entity_ids for an WHERE.. IN query.

Jeremy Proffitt
Mobius New Media
IRC: JP_EzoD

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • What is the syntax for calling tag_entities_get?

This forum was archived on 2017-11-26.