IDE auto-completion for $CFG

IDE auto-completion for $CFG

by Tomasz Muras -
Number of replies: 1
Picture of Core developers Picture of Plugin developers Picture of Plugins guardians Picture of Translators
Moodle Developers,

Something you may be interested in, if you keep thinking if it's rootdir or dirroot each time you use it. I've created moosh command that generates fake class moodle_config which is used only to provide auto completion and documentation for $CFG object. You can use moosh to generate your own or simply download one I've generated for Moodle 2.9 to get that feature, see here: http://moosh-online.com/#cfg-auto-completion .


I've tested it with netbeans and phpstorm, let me know if it does (or does not) work with your favourite IDEs.

cheers,
Tomek

Average of ratings: Useful (3)
In reply to Tomasz Muras

Re: IDE auto-completion for $CFG

by Urs Hunkler -
Picture of Core developers

Thanks Tomek - the $CFG class support in the IDE is really helpful.