public function getPageIconURL()
    {
        $icon = $this->config()->get('icon');
        if (!$icon) {
            return null;
        }
        if (strpos($icon, 'data:image/') !== false) {
            return $icon;
        }

        // Icon is relative resource
        $iconResource = ModuleResourceLoader::singleton()->resolveResource($icon);
        if ($iconResource instanceof ModuleResource) {
            return $iconResource->getURL();
        }

        // Full path to file
        if (Director::fileExists($icon)) {
            return ModuleResourceLoader::resourceURL($icon);
        }

        // Skip invalid files
        return null;
    }
public function getPageIconURL()
    {
        $icon = $this->config()->get('icon');
        if (!$icon) {
            return null;
        }
        if (strpos($icon, 'data:image/') !== false) {
            return $icon;
        }

        // Icon is relative resource
        $iconResource = ModuleResourceLoader::singleton()->resolveResource($icon);
        if ($iconResource instanceof ModuleResource) {
            return $iconResource->getURL();
        }

        // Full path to file
        if (Director::fileExists($icon)) {
            return ModuleResourceLoader::resourceURL($icon);
        }

        // Skip invalid files
        return null;
    }
public function getPageIconURL ( ) { $ icon = $ this -> config ( ) -> get ( 'icon' ) ; if ( ! $ icon ) { return null ; } if ( strpos ( $ icon , 'data:image/' ) !== false ) { return $ icon ; } // Icon is relative resource $ iconResource = ModuleResourceLoader :: singleton ( ) -> resolveResource ( $ icon ) ; if ( $ iconResource instanceof ModuleResource ) { return $ iconResource -> getURL ( ) ; } // Full path to file if ( Director :: fileExists ( $ icon ) ) { return ModuleResourceLoader :: resourceURL ( $ icon ) ; } // Skip invalid files return null ; }
Generate link to this page's icon

@return string
Generate link to this page s icon