0

Is it possible to programmatically register a custom entity type as an Organic Groups group? I know I can add a group field to the entity type using the UI, but I would like to register the entity type as a group in the module code. Users should be able to add such an entity and then these entities should automatically be a group and the checkbox should be hidden from the administration form.

Of course I could 'check' the checkbox and hide it by altering $form and $form_state, but I feel it is a better practice to register it as group in the entity type definition, if possible at all.

0

To register content type grammatically you can by code and by the module - features. But I do not see a reason why you need to create it problematically.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy