code/LeftAndMain.php
public static function menu_icon_for_class($class)
    {
        $icon = Config::inst()->get($class, 'menu_icon');
        if (!empty($icon)) {
            $iconURL = ModuleResourceLoader::resourceURL($icon);
            $class = strtolower(Convert::raw2htmlname(str_replace('\\', '-', $class)));
            return ".icon.icon-16.icon-{$class} { background-image: url('{$iconURL}'); } ";
        }
        return '';
    }
public static function menu_icon_for_class($class)
    {
        $icon = Config::inst()->get($class, 'menu_icon');
        if (!empty($icon)) {
            $iconURL = ModuleResourceLoader::resourceURL($icon);
            $class = strtolower(Convert::raw2htmlname(str_replace('\\', '-', $class)));
            return ".icon.icon-16.icon-{$class} { background-image: url('{$iconURL}'); } ";
        }
        return '';
    }
public static function menu_icon_for_class ( $ class ) { $ icon = Config :: inst ( ) -> get ( $ class , 'menu_icon' ) ; if ( ! empty ( $ icon ) ) { $ iconURL = ModuleResourceLoader :: resourceURL ( $ icon ) ; $ class = strtolower ( Convert :: raw2htmlname ( str_replace ( '\\' , '-' , $ class ) ) ) ; return ".icon.icon-16.icon-{$class} { background-image: url('{$iconURL}'); } " ; } return '' ; }
Return styling for the menu icon, if a custom icon is set for this class

Example: static $menu-icon = '/path/to/image/';
@param string $class
@return string
Return styling for the menu icon if a custom icon is set for this class