Need a hint. With civicrm_entity (3.5) i haven't the possibility to get multiple items in a views row. So i wrote a custom field and now I want to filter it.
I think this works for the contact type (Organization), but I need to filter the related contacts (Individual) by the attached tags.
if (!empty($this->value)) {
$configuration = [
'table' => 'civicrm_entity_tag',
'field' => 'entity_id',
'left_table' => 'civicrm_contact',
'left_field' => 'id',
'operator' => '=',
];
$join = Views::pluginManager('join')->createInstance('standard', $configuration);
$this->query->addRelationship('civicrm_entity_tag', $join, 'civicrm_contact');
$this->query->addWhere('AND', 'civicrm_entity_tag.tag_id', $this->value, 'IN');
dump($query->options['relationship']) // i get 'contact_id_a' thats correct with the relationship, but how can i use it?
}