Does anyone have any tips on how to quickly find the file that would contain the class definition of class in Joomla?
I often find myself wanting to look up the definition of an object to be sure that I know how it is defined, or to learn more about what it does and I would prefer to be able to quickly look through the source code on my wamp development folder.
For example, I am looking at an older component I wrote and want to remind myself what
In this case I ended up searching through the 'libraries' directory for a string 'function _(' until I found the right file. I have a feeling that this isn't the most efficient way to find the definition code! :)
I've tried using the api.joomla.com site but that doesn't see to point me back to the correct file in my installation (and I couldn't see how to easily search the api index, or how to view the source code)
Many thanks in advance ! ps. I also posted this on the Joomla forum, so apologies if you see it twice!
Use a decent IDE. For example, with PhpStorm, place the cursor on the method name (
_ in this case), and press
Ctrl-B. The IDE finds and opens the corresponding file and scrolls to the method.
I'm sure that other IDEs provide a similar function. Tooling is important in the end, if you want to be efficient.