• Aaron Wells's avatar
    Display icons for 3rd-party blocktypes plugins · 4f849ed2
    Aaron Wells authored
    Bug 1510421
    
    Defines a new static PluginBlocktype method, get_css_icon(), which
    fetches the name of the CSS icon to use for this blocktype. It returns
    false by default, which tells the theme to "fall back" to the old
    thumbnail.png instead. 3rd-party plugins can override this to
    specify a particular icon to use.
    
    All the core blocktypes have been refactored to extend
    MaharaCoreBlocktype, which uses the blocktype name as the name
    of the CSS icon to use. I also deprecated the "SystemBlocktype"
    class while I was at it.
    
    PluginBlocktype::get_blocktypes_for_category() now returns both
    the results of get_css_icon() and the thumbnail.png path, so that
    themes can decide which they want to use. (And of course
    thumbnail.png is served via thumbnail.php, so 3rd party themes
    can provide their own custom image files if they wish.)
    
    behatnotneeded: Requires installing third-party plugins to test
    
    Change-Id: Idb1ecfc7b21175913708e695788906c11133b0c0
    4f849ed2
lib.php 20.4 KB