Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourBlue
titleDRUPAL 7 230706

...

You'll need to implement hook_entity_property_info(). See this Drupal.org page and the contrib documentation for the hook for more details.

For an ECK-built or Already Existing Entity:

You'll need to implement hook_entity_property_info_alter(). Typically, the only alter that is necessary is changing the default "type" of the property to a Drupal entity type, the default getter/setter methods provided by the Entity module will do the rest, so you don't even need to write extra code. Here's an example:

Gister macro
gistUrlhttps://gist.github.com/reynoldsalec/5ae42f3a8ecbd3e9c187

...