Moodle - snippets & autocompleteThis extension for Visual Studio Code adds Moodle v. 3.4.6 snippets and autocompletion of functions, classes. FeaturesSnippets for all public methods for GLOBAL variables:
Snippets for all methods from:
Also there are some snippets for file comments. UsageType part of snippet, press Comments Snippets
|
Snippet | Purpose |
---|---|
$Of |
$OUTPUT->footer(); |
$Oh |
$OUTPUT->header(); |
$Opi |
$OUTPUT->pix_icon(...); |
$Opu |
$OUTPUT->pix_url(...); |
$Orft |
$OUTPUT->render_from_template(...); |
$DB
Snippets
Snippet | Purpose |
---|---|
$DBgr |
$DB->get_record(...); |
$DBgrs |
$DB->get_records(...); |
$DBre |
$DB->record_exists(...); |
$DBcr |
$DB->count_records(...); |
$DBir |
$DB->insert_record(...); |
$DBirs |
$DB->insert_records(...); |
$DBur |
$DB->update_record(...); |
$DBdrs |
$DB->delete_records(...); |
$PAGE
Snippets
Snippet | Purpose |
---|---|
$Prcss |
$PAGE->requires->css(...) |
$Prjic |
$PAGE->requires->js_init_call(...) |
$Prjs |
$PAGE->requires->js(...) |
$Psc |
$PAGE->set_context(...) |
$Psh |
$PAGE->set_heading(...) |
$Pspl |
$PAGE->set_pagelayout(...) |
$Pst |
$PAGE->set_title(...) |
$Psu |
$PAGE->set_url(...) |
moodlelib.php
Snippets
Snippet | Purpose |
---|---|
cl |
current_language(...); |
gs |
get_string(...); |
op |
optional_param(...); |
rl |
require_login(...) |
rp |
required_param(...); |
Requirements
VSCode 1.30.0
Release Notes
1.0.0-3.4.6
- Initial release