List of functions using a method

Migrated issue

Reported by: avpaderno

Problem/Motivation

Currently, on API sites (such as api.drupal.org), if you are on a class method page, you don't get a list of "123 functions call ClassName::methodName()", like you have on ordinary function pages. It would be nice to have this.

Proposed resolution

The only list we can reliably generate from parsing code is a list of all functions calling this method or methods from other classes with the same method name. For instance, on the EntityFieldQuery::execute() page, we would see a list of 1261 functions that call things such as DeleteQuery::execute() and SelectQuery::execute(), as well as EntityFieldQuery::execute().

So the only viable options I see are:
a) Close this issue as "wont' fix" or
b) Display the full list, but instead of having a list header/link that says "1261 functions call EntityFieldQuery::execute()", as you would get on a function page, have it say "1261 functions call ::execute() methods" instead, when you're on a class method page.

Remaining tasks

If we go with option (b), the patch in comment #5 below needs to be modified to change the header/link text, and the tests also need to be updated to this text.

User interface changes

Methods would have a new section showing which functions call this method or other methods with the same name.

API changes

None.

Original report by kiamlaluno

In a documentation page for a function there is a list of functions which use that function. It would be good if a similar list would be present in the documentation page for a method; it would allow to see how the method is invoked in existing code.

I don't know if the code is able to extract that information from the code; if it is not possible to do that, the module could use a Doxygen tag that would be manually added in the Doxygen comment of any function.