Currently we basically check for a token type key in the entity info and use that for the token type and fall back to the entity type.

Token module, however, provides a hook to alter these mappings (hook_token_entity_mapping_alter()), plus an API function to retrieve a mapping properly (token_get_entity_mapping()). I think we should at least provide optional integration with Token module (i.e. if (module_exists('token') so that this module still works, if other modules implement that hook.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler created an issue. See original summary.

maximpodorov’s picture

Could you provide a patch for this?

tstoeckler’s picture

Status: Active » Needs review
FileSize
1.19 KB

This is what I was thinking.

Status: Needs review » Needs work

The last submitted patch, 3: field-default-token-get-entity-mapping.patch, failed testing.