Future major features

Element Library

Re: Element Library
Core developersParticularly helpful MoodlersPlugin developers

You can also create a local plugin that contains it's own renderer factory and then get all themes to use that.


class local_mylocal_renderer_factory extends theme_overridden_renderer_factory {
    public function __construct(theme_config $theme) {
        array_unshift($this->prefixes, 'local_mylocal');

Then in your theme config.php:

$THEME->rendererfactory = 'local_mylocal_renderer_factory';

This will give your local plugin the final say on any renderers. With the major proviso that, for any renderer classes you create in your local plugin, any renderers overriding the same classes in your themes will be ignored (unless you subclass your local renderers from the theme renderers).

Average of ratings: -