app/Module/ModuleThemeTrait.php
public function icon(Fact $fact): string
    {
        $asset = 'public/css/' . $this->name() . '/images/facts/' . $fact->getTag() . '.png';
        if (file_exists(Webtrees::ROOT_DIR . 'public' . $asset)) {
            return '<img src="' . e(asset($asset)) . '" title="' . GedcomTag::getLabel($fact->getTag()) . '">';
        }

        // Spacer image - for alignment - until we move to a sprite.
        $asset = 'public/css/' . $this->name() . '/images/facts/NULL.png';
        if (file_exists(Webtrees::ROOT_DIR . 'public' . $asset)) {
            return '<img src="' . e(asset($asset)) . '">';
        }

        return '';
    }
public function icon(Fact $fact): string
    {
        $asset = 'public/css/' . $this->name() . '/images/facts/' . $fact->getTag() . '.png';
        if (file_exists(Webtrees::ROOT_DIR . 'public' . $asset)) {
            return '<img src="' . e(asset($asset)) . '" title="' . GedcomTag::getLabel($fact->getTag()) . '">';
        }

        // Spacer image - for alignment - until we move to a sprite.
        $asset = 'public/css/' . $this->name() . '/images/facts/NULL.png';
        if (file_exists(Webtrees::ROOT_DIR . 'public' . $asset)) {
            return '<img src="' . e(asset($asset)) . '">';
        }

        return '';
    }
public function icon ( Fact $ fact ) : string { $ asset = 'public/css/' . $ this -> name ( ) . '/images/facts/' . $ fact -> getTag ( ) . '.png' ; if ( file_exists ( Webtrees :: ROOT_DIR . 'public' . $ asset ) ) { return '<img src="' . e ( asset ( $ asset ) ) . '" title="' . GedcomTag :: getLabel ( $ fact -> getTag ( ) ) . '">' ; } // Spacer image - for alignment - until we move to a sprite. $ asset = 'public/css/' . $ this -> name ( ) . '/images/facts/NULL.png' ; if ( file_exists ( Webtrees :: ROOT_DIR . 'public' . $ asset ) ) { return '<img src="' . e ( asset ( $ asset ) ) . '">' ; } return '' ; }
Display an icon for this fact.

@TODO use CSS for this

@param Fact $fact

@return string
Display an icon for this fact .