Do we need this?

Eg, if we have a contrib module profile_address that defines a whizzy address type with ponies, should we have a hook for it to do that?

Comments

fago’s picture

I don't think we need that - it can be create via the API funciton as the profile2 module does itself too. Also the field API works that way - having a function to create it but no hook.

But anyway, I'd be fine a hook too.

fago’s picture

Category: feature » task

I've just ported the current code to the entity API, thus we can easily implement that by defining the types as exportable. I've already done so, it's working fine.

However currently it's called as by default: hook_default_profile_type(), but we could easily change it by setting the appropriate property in hook_entity_info and adapting the code.

I think hook_default_profile_type() is fine, as it says that types can be defined outside of this hook too. Also the hook doesn't return info about types, it does return types defined by default. So I think the current hook name is even better, however I don't feel strong about this so feel free to change that.

fago’s picture

Version: » 7.x-1.x-dev
Status: Active » Fixed

We have hook_default_profile_type().

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.