diff --git a/theme/classic/classes/output/icon_system_fontawesome.php b/theme/classic/classes/output/icon_system_fontawesome.php new file mode 100644 index 00000000000..ae2a43ae4bf --- /dev/null +++ b/theme/classic/classes/output/icon_system_fontawesome.php @@ -0,0 +1,56 @@ +. + +/** + * Overridden fontawesome icons. + * + * @package theme_classic + * @copyright 2019 Moodle + * @author Bas Brands + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +namespace theme_classic\output; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Class overriding some of the Moodle default FontAwesome icons. + * + * @package theme_classic + * @copyright 2019 Moodle + * @author Bas Brands + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class icon_system_fontawesome extends \core\output\icon_system_fontawesome { + + /** + * @var array $map Cached map of moodle icon names to font awesome icon names. + */ + private $map = []; + + + /** + * Change the core icon map + * @return Array replaced icons. + */ + public function get_core_icon_map() { + $iconmap = parent::get_core_icon_map(); + + $iconmap['core:i/navigationitem'] = 'fa-square'; + + return $iconmap; + } +} \ No newline at end of file diff --git a/theme/classic/config.php b/theme/classic/config.php index dc6c1b8a5a8..6955eb353a1 100644 --- a/theme/classic/config.php +++ b/theme/classic/config.php @@ -156,3 +156,4 @@ $THEME->scss = function($theme) { return theme_classic_get_main_scss_content($theme); }; $THEME->usefallback = true; +$THEME->iconsystem = '\\theme_classic\\output\\icon_system_fontawesome';