src/AddressDataExtension.php
public static function getIconImage($svg = true)
    {
        $folders = [
            'client/dist/img/',
            'client/dist/images/',
            'dist/img/',
            'dist/images/',
            'img/',
            'images/',
        ];

        $extensions = [
            'png',
            'jpg',
            'jpeg',
            'gif',
        ];

        if ($svg === true) {
            array_unshift($extensions, 'svg');
        }

        $file = 'mapIcon';

        foreach ($folders as $folder) {
            foreach ($extensions as $extension) {
                if ($icon = ThemeResourceLoader::inst()->findThemedResource(
                    "{$folder}{$file}.{$extension}",
                    SSViewer::get_themes()
                )) {
                    return ModuleResourceLoader::resourceURL($icon);
                }
            }
        }

        return false;
    }
public static function getIconImage($svg = true)
    {
        $folders = [
            'client/dist/img/',
            'client/dist/images/',
            'dist/img/',
            'dist/images/',
            'img/',
            'images/',
        ];

        $extensions = [
            'png',
            'jpg',
            'jpeg',
            'gif',
        ];

        if ($svg === true) {
            array_unshift($extensions, 'svg');
        }

        $file = 'mapIcon';

        foreach ($folders as $folder) {
            foreach ($extensions as $extension) {
                if ($icon = ThemeResourceLoader::inst()->findThemedResource(
                    "{$folder}{$file}.{$extension}",
                    SSViewer::get_themes()
                )) {
                    return ModuleResourceLoader::resourceURL($icon);
                }
            }
        }

        return false;
    }
public static function getIconImage ( $ svg = true ) { $ folders = [ 'client/dist/img/' , 'client/dist/images/' , 'dist/img/' , 'dist/images/' , 'img/' , 'images/' , ] ; $ extensions = [ 'png' , 'jpg' , 'jpeg' , 'gif' , ] ; if ( $ svg === true ) { array_unshift ( $ extensions , 'svg' ) ; } $ file = 'mapIcon' ; foreach ( $ folders as $ folder ) { foreach ( $ extensions as $ extension ) { if ( $ icon = ThemeResourceLoader :: inst ( ) -> findThemedResource ( "{$folder}{$file}.{$extension}" , SSViewer :: get_themes ( ) ) ) { return ModuleResourceLoader :: resourceURL ( $ icon ) ; } } } return false ; }
Gets the maker icon image
@var boolean $svg if svgs should be included
@return null|string
Gets the maker icon image