Talk:Plugin types: Difference between revisions
From MoodleDocs
David Mudrak (talk | contribs) (Mudrd8mz moved page Talk:Plugin types to talk: The page title needed for more prominent contents) |
David Mudrak (talk | contribs) m (Add request on how to perform further updates of the page) |
||
Line 1: | Line 1: | ||
== Updating the Plugin types page == | |||
* The order of plugin types to match the order in which <tt>core_plugin_manager::get_plugin_types()</tt> returns them | |||
* Legacy plugin types to be at the end of the list | |||
To generate the full list, use the following script and manually merge it into the existing page. | |||
<code php> | |||
<?php | |||
// Put the file to the root directory of your Moodle installation and execute | |||
// it via command line. | |||
define('CLI_SCRIPT', true); | |||
require('config.php'); | |||
require_once($CFG->libdir.'/clilib.php'); | |||
$pluginman = core_plugin_manager::instance(); | |||
cli_writeln('{| class="nicetable" | |||
|- | |||
! Plugin type | |||
! Component name ([[Frankenstyle]]) | |||
! Moodle path | |||
! Description | |||
! Moodle versions'); | |||
foreach ($pluginman->get_plugin_types() as $type => $dir) { | |||
cli_writeln('|-'); | |||
cli_writeln('| [['.$pluginman->plugintype_name_plural($type).']]'); | |||
cli_writeln('| '.$type); | |||
cli_writeln('| '.substr($dir, strlen($CFG->dirroot))); | |||
cli_writeln('| description'); | |||
cli_writeln('| versions'); | |||
} | |||
cli_writeln('|}'); | |||
</code> | |||
--[[User:David Mudrak|David Mudrak]] ([[User talk:David Mudrak|talk]]) 18:58, 20 May 2016 (AWST) | |||
---- |
Revision as of 11:01, 20 May 2016
Updating the Plugin types page
- The order of plugin types to match the order in which core_plugin_manager::get_plugin_types() returns them
- Legacy plugin types to be at the end of the list
To generate the full list, use the following script and manually merge it into the existing page.
<?php
// Put the file to the root directory of your Moodle installation and execute
// it via command line.
define('CLI_SCRIPT', true);
require('config.php');
require_once($CFG->libdir.'/clilib.php');
$pluginman = core_plugin_manager::instance();
cli_writeln('{| class="nicetable"
|-
! Plugin type
! Component name (Frankenstyle)
! Moodle path
! Description
! Moodle versions');
foreach ($pluginman->get_plugin_types() as $type => $dir) {
cli_writeln('|-');
cli_writeln('| [['.$pluginman->plugintype_name_plural($type).']]');
cli_writeln('| '.$type);
cli_writeln('| '.substr($dir, strlen($CFG->dirroot)));
cli_writeln('| description');
cli_writeln('| versions');
}
cli_writeln('|}');
--David Mudrak (talk) 18:58, 20 May 2016 (AWST)