Skip to content

Instantly share code, notes, and snippets.

@stronk7
Created June 26, 2020 15:53
Show Gist options
  • Save stronk7/0c30de590621fc95f70405c2aefe9e59 to your computer and use it in GitHub Desktop.
Save stronk7/0c30de590621fc95f70405c2aefe9e59 to your computer and use it in GitHub Desktop.
Why on hell icon_system_standard doesn't extend icon_system?
diff --git a/lib/classes/output/icon_system_standard.php b/lib/classes/output/icon_system_standard.php
index 8119a2d6812..c9a2f77e18d 100644
--- a/lib/classes/output/icon_system_standard.php
+++ b/lib/classes/output/icon_system_standard.php
@@ -38,7 +38,7 @@ defined('MOODLE_INTERNAL') || die();
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class icon_system_standard {
+class icon_system_standard extends icon_system {
public function render_pix_icon(renderer_base $output, pix_icon $icon) {
$data = $icon->export_for_template($output);
diff --git a/theme/classic/config.php b/theme/classic/config.php
index 6955eb353a1..ca373a5e0c0 100644
--- a/theme/classic/config.php
+++ b/theme/classic/config.php
@@ -157,3 +157,4 @@ $THEME->scss = function($theme) {
};
$THEME->usefallback = true;
$THEME->iconsystem = '\\theme_classic\\output\\icon_system_fontawesome';
+$THEME->iconsystem = \core\output\icon_system::STANDARD;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment