How to filter getRelationships()

Created on 14 March 2024, 4 months ago

Problem/Motivation

In Groups 1.6 I could do this $group->getContent($plugin_id, ['entity_id' => $eid]); to filter the results of GetContent() by a certain entity ID.

However, now in Groups 2 according to https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... β†’ filters are not supported anymore.

What is the recommended approach for filtering getRelationships($plugin_id) now?

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States RichardDavies Portland, Oregon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @RichardDavies
  • Status changed to Closed: works as designed 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States RichardDavies Portland, Oregon

    Nevermind, I think I just found the answer. It looks like in this specific case, I can use getRelationshipsByEntity($entity, $plugin_id)

Production build 0.69.0 2024