amitaibu / og

A fork to work on OG8
https://github.com/Gizra/og
29 stars 16 forks source link

Have OgMembership reference groups via entity reference field #270

Closed amitaibu closed 7 years ago

amitaibu commented 8 years ago

Not sure about it, just an idea.

Currently in \Drupal\og\Entity\OgMembership::baseFieldDefinitions we get the reference thank to those fields:

$fields['entity_type'] = BaseFieldDefinition::create('string')
  ->setLabel(t('Group entity type'))
  ->setDescription(t('The entity type of the group.'));

$fields['entity_id'] = BaseFieldDefinition::create('string')
  ->setLabel(t('Group entity id.'))
  ->setDescription(t("The entity ID of the group."));

What if instead of those we had a (configurable) entity reference field?

Pros

/cc @pfrenssen @damiankloip

amitaibu commented 8 years ago

Lets keep as is.