app/Http/Controllers/Admin/MediaController.php
private function mediaObjectInfo(Media $media): string
    {
        $html = '<b><a href="' . e($media->url()) . '">' . $media->fullName() . '</a></b>' . '<br><i>' . e($media->getNote()) . '</i></br><br>';

        $linked = [];
        foreach ($media->linkedIndividuals('OBJE') as $link) {
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        foreach ($media->linkedFamilies('OBJE') as $link) {
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        foreach ($media->linkedSources('OBJE') as $link) {
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        foreach ($media->linkedNotes('OBJE') as $link) {
            // Invalid GEDCOM - you cannot link a NOTE to an OBJE
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        foreach ($media->linkedRepositories('OBJE') as $link) {
            // Invalid GEDCOM - you cannot link a REPO to an OBJE
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        if (!empty($linked)) {
            $html .= '<ul>';
            foreach ($linked as $link) {
                $html .= '<li>' . $link . '</li>';
            }
            $html .= '</ul>';
        } else {
            $html .= '<div class="alert alert-danger">' . I18N::translate('There are no links to this media object.') . '</div>';
        }

        return $html;
    }
private function mediaObjectInfo(Media $media): string
    {
        $html = '<b><a href="' . e($media->url()) . '">' . $media->fullName() . '</a></b>' . '<br><i>' . e($media->getNote()) . '</i></br><br>';

        $linked = [];
        foreach ($media->linkedIndividuals('OBJE') as $link) {
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        foreach ($media->linkedFamilies('OBJE') as $link) {
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        foreach ($media->linkedSources('OBJE') as $link) {
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        foreach ($media->linkedNotes('OBJE') as $link) {
            // Invalid GEDCOM - you cannot link a NOTE to an OBJE
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        foreach ($media->linkedRepositories('OBJE') as $link) {
            // Invalid GEDCOM - you cannot link a REPO to an OBJE
            $linked[] = '<a href="' . e($link->url()) . '">' . $link->fullName() . '</a>';
        }
        if (!empty($linked)) {
            $html .= '<ul>';
            foreach ($linked as $link) {
                $html .= '<li>' . $link . '</li>';
            }
            $html .= '</ul>';
        } else {
            $html .= '<div class="alert alert-danger">' . I18N::translate('There are no links to this media object.') . '</div>';
        }

        return $html;
    }
private function mediaObjectInfo ( Media $ media ) : string { $ html = '<b><a href="' . e ( $ media -> url ( ) ) . '">' . $ media -> fullName ( ) . '</a></b>' . '<br><i>' . e ( $ media -> getNote ( ) ) . '</i></br><br>' ; $ linked = [ ] ; foreach ( $ media -> linkedIndividuals ( 'OBJE' ) as $ link ) { $ linked [ ] = '<a href="' . e ( $ link -> url ( ) ) . '">' . $ link -> fullName ( ) . '</a>' ; } foreach ( $ media -> linkedFamilies ( 'OBJE' ) as $ link ) { $ linked [ ] = '<a href="' . e ( $ link -> url ( ) ) . '">' . $ link -> fullName ( ) . '</a>' ; } foreach ( $ media -> linkedSources ( 'OBJE' ) as $ link ) { $ linked [ ] = '<a href="' . e ( $ link -> url ( ) ) . '">' . $ link -> fullName ( ) . '</a>' ; } foreach ( $ media -> linkedNotes ( 'OBJE' ) as $ link ) { // Invalid GEDCOM - you cannot link a NOTE to an OBJE $ linked [ ] = '<a href="' . e ( $ link -> url ( ) ) . '">' . $ link -> fullName ( ) . '</a>' ; } foreach ( $ media -> linkedRepositories ( 'OBJE' ) as $ link ) { // Invalid GEDCOM - you cannot link a REPO to an OBJE $ linked [ ] = '<a href="' . e ( $ link -> url ( ) ) . '">' . $ link -> fullName ( ) . '</a>' ; } if ( ! empty ( $ linked ) ) { $ html .= '<ul>' ; foreach ( $ linked as $ link ) { $ html .= '<li>' . $ link . '</li>' ; } $ html .= '</ul>' ; } else { $ html .= '<div class="alert alert-danger">' . I18N :: translate ( 'There are no links to this media object.' ) . '</div>' ; } return $ html ; }
Generate some useful information and links about a media object.

@param Media $media

@return string HTML
Generate some useful information and links about a media object .