Code Duplication    Length = 15-21 lines in 4 locations

typo3/sysext/backend/Classes/RecordList/AbstractRecordList.php 1 location

@@ 524-538 (lines=15) @@
521
     * @return string
522
     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10
523
     */
524
    protected function generateReferenceToolTip($references, $launchViewParameter = '')
525
    {
526
        if (!$references) {
527
            $htmlCode = '-';
528
        } else {
529
            $htmlCode = '<a href="#"';
530
            if ($launchViewParameter !== '') {
531
                $htmlCode .= ' onclick="' . htmlspecialchars(('top.launchView(' . $launchViewParameter . '); return false;')) . '"';
532
            }
533
            $htmlCode .= ' title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references') . ' (' . $references . ')') . '">';
534
            $htmlCode .= $references;
535
            $htmlCode .= '</a>';
536
        }
537
        return $htmlCode;
538
    }
539
540
    /**
541
     * Returns the language service

typo3/sysext/backend/Classes/View/PageLayoutView.php 1 location

@@ 4370-4390 (lines=21) @@
4367
     * @param string $launchViewParameter JavaScript String, which will be passed as parameters to top.launchView
4368
     * @return string
4369
     */
4370
    protected function generateReferenceToolTip($references, $launchViewParameter = '')
4371
    {
4372
        if (!$references) {
4373
            $htmlCode = '-';
4374
        } else {
4375
            $htmlCode = '<a href="#"';
4376
            if ($launchViewParameter !== '') {
4377
                $htmlCode .= ' onclick="' . htmlspecialchars(
4378
                        ('top.launchView(' . $launchViewParameter . '); return false;')
4379
                    ) . '"';
4380
            }
4381
            $htmlCode .= ' title="' . htmlspecialchars(
4382
                    $this->getLanguageService()->sL(
4383
                        'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references'
4384
                    ) . ' (' . $references . ')'
4385
                ) . '">';
4386
            $htmlCode .= $references;
4387
            $htmlCode .= '</a>';
4388
        }
4389
        return $htmlCode;
4390
    }
4391
4392
    /**
4393
     * Returns the language service

typo3/sysext/filelist/Classes/FileList.php 1 location

@@ 1563-1583 (lines=21) @@
1560
     * @param string $launchViewParameter JavaScript String, which will be passed as parameters to top.launchView
1561
     * @return string
1562
     */
1563
    protected function generateReferenceToolTip($references, $launchViewParameter = '')
1564
    {
1565
        if (!$references) {
1566
            $htmlCode = '-';
1567
        } else {
1568
            $htmlCode = '<a href="#"';
1569
            if ($launchViewParameter !== '') {
1570
                $htmlCode .= ' onclick="' . htmlspecialchars(
1571
                        ('top.launchView(' . $launchViewParameter . '); return false;')
1572
                    ) . '"';
1573
            }
1574
            $htmlCode .= ' title="' . htmlspecialchars(
1575
                    $this->getLanguageService()->sL(
1576
                        'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references'
1577
                    ) . ' (' . $references . ')'
1578
                ) . '">';
1579
            $htmlCode .= $references;
1580
            $htmlCode .= '</a>';
1581
        }
1582
        return $htmlCode;
1583
    }
1584
}
1585

typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php 1 location

@@ 4250-4270 (lines=21) @@
4247
     * @param string $launchViewParameter JavaScript String, which will be passed as parameters to top.launchView
4248
     * @return string
4249
     */
4250
    protected function generateReferenceToolTip($references, $launchViewParameter = '')
4251
    {
4252
        if (!$references) {
4253
            $htmlCode = '-';
4254
        } else {
4255
            $htmlCode = '<a href="#"';
4256
            if ($launchViewParameter !== '') {
4257
                $htmlCode .= ' onclick="' . htmlspecialchars(
4258
                        ('top.launchView(' . $launchViewParameter . '); return false;')
4259
                    ) . '"';
4260
            }
4261
            $htmlCode .= ' title="' . htmlspecialchars(
4262
                    $this->getLanguageService()->sL(
4263
                        'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references'
4264
                    ) . ' (' . $references . ')'
4265
                ) . '">';
4266
            $htmlCode .= $references;
4267
            $htmlCode .= '</a>';
4268
        }
4269
        return $htmlCode;
4270
    }
4271
4272
    /**
4273
     * If enabled, only translations are shown (= only with l10n_parent)