MDL-20438 Refactoring pluginlib before adding anything new
These changes are motivated by feedback from Tim Hunt (17 October 2011 in the developers chat room). The combination of using an interface, but then putting all the useful information in public fields, was not good design of this library. So I am merging the plugin_information interface and the plugintype_base class into a new abstract class plugininfo_base. This new class defines the basic API of all information holding subclasses. This does not change the code, just puts the documentation closer to the methods they are actually implemented.
This commit is contained in:
+2
-2
@@ -594,12 +594,12 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
|
||||
/**
|
||||
* Formats the information that needs to go in the 'Requires' column.
|
||||
* @param plugin_information $plugin the plugin we are rendering the row for.
|
||||
* @param plugininfo_base $plugin the plugin we are rendering the row for.
|
||||
* @param plugin_manager $pluginman provides data on all the plugins.
|
||||
* @param string $version
|
||||
* @return string HTML code
|
||||
*/
|
||||
protected function required_column(plugin_information $plugin, plugin_manager $pluginman, $version) {
|
||||
protected function required_column(plugininfo_base $plugin, plugin_manager $pluginman, $version) {
|
||||
$requires = array();
|
||||
|
||||
if (!empty($plugin->versionrequires)) {
|
||||
|
||||
Reference in New Issue
Block a user