i'm creating a child theme of boost and want to alter some icons, but keep the fontawesome icon system
is it possible to override the icon map from /lib/classes/output/icon_system_fontawesome.php in a theme without changing the overall icon system?
$THEME->iconsystem = '\\theme_sth\\output\\icon_system_fa_custom';
<?php namespace theme_sth\output; defined('MOODLE_INTERNAL') || die(); class icon_system_fa_custom extends \core\output\icon_system_fontawesome { public function get_core_icon_map() { $map = parent::get_core_icon_map(); $map['core:i/navigationitem'] = 'fa-caret-right'; return $map; } }
namespace theme_{themename}\output;And in config.php:
defined('MOODLE_INTERNAL') || die();
class icon_system_fontawesome extends \core\output\icon_system_fontawesome {
public function get_core_icon_map(){
$iconmap = parent::get_core_icon_map();
$overrides = Array(
'core:i/dashboard' => 'tachometer alternate icon',
);
$merged = array_merge($iconmap, $overrides);
return $merged;
}
}
$THEME->iconsystem = '\\theme_{themename}\\output\\icon_system_fontawesome';