Code Duplication    Length = 16-22 lines in 4 locations

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

@@ 373-388 (lines=16) @@
370
     * @access private
371
     * @deprecated since TYPO3 v9, will be removed in TYPO3 v10
372
     */
373
    public function fwd_rwd_HTML($type, $pointer, $table = '')
374
    {
375
        $content = '';
376
        $tParam = $table ? '&table=' . rawurlencode($table) : '';
377
        switch ($type) {
378
            case 'fwd':
379
                $href = $this->listURL() . '&pointer=' . ($pointer - $this->iLimit) . $tParam;
380
                $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon('actions-move-up', Icon::SIZE_SMALL)->render() . '</a> <i>[1 - ' . $pointer . ']</i>';
381
                break;
382
            case 'rwd':
383
                $href = $this->listURL() . '&pointer=' . $pointer . $tParam;
384
                $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon('actions-move-down', Icon::SIZE_SMALL)->render() . '</a> <i>[' . ($pointer + 1) . ' - ' . $this->totalItems . ']</i>';
385
                break;
386
        }
387
        return $content;
388
    }
389
390
    /**
391
     * Creates the URL to this script, including all relevant GPvars

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

@@ 686-707 (lines=22) @@
683
     * @return string
684
     * @access private
685
     */
686
    public function fwd_rwd_HTML($type, $pointer, $table = '')
687
    {
688
        $content = '';
689
        $tParam = $table ? '&table=' . rawurlencode($table) : '';
690
        switch ($type) {
691
            case 'fwd':
692
                $href = $this->listURL() . '&pointer=' . ($pointer - $this->iLimit) . $tParam;
693
                $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
694
                        'actions-move-up',
695
                        Icon::SIZE_SMALL
696
                    )->render() . '</a> <i>[1 - ' . $pointer . ']</i>';
697
                break;
698
            case 'rwd':
699
                $href = $this->listURL() . '&pointer=' . $pointer . $tParam;
700
                $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
701
                        'actions-move-down',
702
                        Icon::SIZE_SMALL
703
                    )->render() . '</a> <i>[' . ($pointer + 1) . ' - ' . $this->totalItems . ']</i>';
704
                break;
705
        }
706
        return $content;
707
    }
708
709
    /**
710
     * Returning JavaScript for ClipBoard functionality.

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

@@ 4217-4238 (lines=22) @@
4214
     * @return string
4215
     * @access private
4216
     */
4217
    public function fwd_rwd_HTML($type, $pointer, $table = '')
4218
    {
4219
        $content = '';
4220
        $tParam = $table ? '&table=' . rawurlencode($table) : '';
4221
        switch ($type) {
4222
            case 'fwd':
4223
                $href = $this->listURL() . '&pointer=' . ($pointer - $this->iLimit) . $tParam;
4224
                $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
4225
                        'actions-move-up',
4226
                        Icon::SIZE_SMALL
4227
                    )->render() . '</a> <i>[1 - ' . $pointer . ']</i>';
4228
                break;
4229
            case 'rwd':
4230
                $href = $this->listURL() . '&pointer=' . $pointer . $tParam;
4231
                $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
4232
                        'actions-move-down',
4233
                        Icon::SIZE_SMALL
4234
                    )->render() . '</a> <i>[' . ($pointer + 1) . ' - ' . $this->totalItems . ']</i>';
4235
                break;
4236
        }
4237
        return $content;
4238
    }
4239
4240
    /**
4241
     * @return string

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

@@ 4085-4106 (lines=22) @@
4082
     * @return string
4083
     * @access private
4084
     */
4085
    public function fwd_rwd_HTML($type, $pointer, $table = '')
4086
    {
4087
        $content = '';
4088
        $tParam = $table ? '&table=' . rawurlencode($table) : '';
4089
        switch ($type) {
4090
            case 'fwd':
4091
                $href = $this->listURL() . '&pointer=' . ($pointer - $this->iLimit) . $tParam;
4092
                $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
4093
                        'actions-move-up',
4094
                        Icon::SIZE_SMALL
4095
                    )->render() . '</a> <i>[1 - ' . $pointer . ']</i>';
4096
                break;
4097
            case 'rwd':
4098
                $href = $this->listURL() . '&pointer=' . $pointer . $tParam;
4099
                $content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
4100
                        'actions-move-down',
4101
                        Icon::SIZE_SMALL
4102
                    )->render() . '</a> <i>[' . ($pointer + 1) . ' - ' . $this->totalItems . ']</i>';
4103
                break;
4104
        }
4105
        return $content;
4106
    }
4107
4108
    /**
4109
     * Returning JavaScript for ClipBoard functionality.