How to use other properties in hook_entity_property_info_alter() I want to extend the entity properties of OG-Membership to use it as a token in rules. 

It works fine adding the property (for example the string 'test' as returned in the getter_callback is printed in a reaction rule (sending email)).
But I could not find out, or how to debug/access, the other properties present in OG-Membership in the rules context. To put it differently:

How can I access the group id ($gid) of the OG-Membership in my getter callback?

This works well:

function mymodule_entity_property_info_alter(&amp;$info){
  $properties = &amp;$info['og_membership']['properties'];

  $properties['og_custom_property'] = array(
    'label' =&gt; t('My custom Label'),
    'type' =&gt; 'test',
    'description' =&gt; t('OG Membership Custom Property.'),
    'getter callback' =&gt; 'mymodule_callback'
    );
  return $info;
}


But here I cannot access the $gid, or anything, for that matter:

function mymodule_callback(){
  //do some stuff with the $gid and $etid of the OG-Membership
}


Any help is appreciated; maybe someone knows how to debug the in rules available properties?
Thanks.
If you use hook_entity_property_info_alter() you have access to the entity in question in the callback as well.

function mymodule_callback($item){
  //$item is the entity in question in my case $og_membership
  //hence I can acces the gid like this:
  $og_membership = $item; //redundant, just to show what I mean
  $gid = $og_membership-&gt;gid;

  //either do some more stuff or just return the gid as an example
  return $gid;
}


Now I can access the property and it returns the gid. For example in rules:

[og_membership:og_custom_property]


Hope this is useful to others as well.