Custom code navigation Follow
I use Livestreet CMF, and have to deal with Livestreet's specific syntax for calling some methonds.
For example, if I call method $this->Blog_GetBlogsRating it means that I call GetBlogRating method from Blog_Module class.
I need correct code navigation, so if I ctrl+click on $this->Blog_GetBlogsRating PhpStorm should open method GetBlogRating in Blog_Module class, how can I achieve this?
Writing my own plugin is acceptable method, but please give me a hint what hooks/methods and so on I can use for it.
Thanks
Please sign in to leave a comment.
Unfortunately, you can't do that with Advanced Metadata currently. Please vote for the request: https://youtrack.jetbrains.com/issue/WI-36647
What you can do is to add
@method
PHPDoc blocks in every class (or their parent), like:class Blog { function getBlogsRating() { return new DateTime(); } } /** * @method DateTime Blog_GetBlogsRating */ class Invoker { function test() { $this->Blog_GetBlogsRating(); } }
For obvious reasons, you'll need to adjust the docblock each time you change the method itself.
As for the plugin development, you can get hints here: https://confluence.jetbrains.com/display/PhpStorm/Plugin+Development