Adding Group context for Blocks (and other Entities), with updated tests.
Proposed solution for #3170013 for 3.x branch.
Some changes to note from previous patch submissions:
- This uses a single new helper function to get additional group contexts/relationship beyond what Group currently provides without any patches. Group Content Menu can be used with Node and other entity types without any additional patches to Group. (Group issue #2815971 is a bit of a mess, especially tracking 2.x and 3.x branches.)
- This helper function pulls in all entity relationships, not just Nodes. This goes beyond the original scope of this issue, but it is the direction that Group contexts appears to be heading. It could be pulled back to just get Group Nodes if that is preferred, especially for backwards-compatibility. For example, Group Content Menus will be displayed on User pages for those in the Group.
- Tests have been added to confirm that Group Content Menus appear on the proper Group Node pages. These tests fail without the updates to GroupMenuBlock.
- One deprecation warning regarding calling get_class() without arguments has been fixed.
- One deprecation warning about using a translatable string as a category for field type remains unresolved. (Have not yet found the source of the warning.)