I'm developing a plugin for Moodle and created a project inside my Moodle installation. I'm extending a class called block_base
but PhpStorm says undefined class block_base
. My guess is that is because all the moodle files (including the class block_base
) aren't in the project files.
How do I add this to the project files? I could just simply make the entire Moodle installation the project but I don't want that because i'm using GitHub and I then have to put all of the Moodle files on there as well and that is just pointless.
PHPStorm can handle multiple git roots within a single project (this is how I manage my plugins).
So, you can do the following:
Now, you can make changes to your plugin and update, without having to check in a full copy of Moodle (as an added bonus, it makes it nice and easy to pull the latest Moodle code, so you can test your plugin against upgrades).