Code Duplication    Length = 4-6 lines in 7 locations

typo3/sysext/backend/Classes/Template/Components/ButtonBar.php 1 location

@@ 169-174 (lines=6) @@
166
            ksort($this->buttons[$position]);
167
        }
168
        // Hook for manipulating the docHeaderButtons
169
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Backend\Template\Components\ButtonBar']['getButtonsHook'] ?? [] as $funcRef) {
170
            $params = [
171
                'buttons' => $this->buttons
172
            ];
173
            $this->buttons = GeneralUtility::callUserFunction($funcRef, $params, $this);
174
        }
175
        return $this->buttons;
176
    }
177
}

typo3/sysext/backend/Classes/Template/DocumentTemplate.php 1 location

@@ 506-511 (lines=6) @@
503
        $this->pageRenderer->addJsFile('EXT:core/Resources/Public/JavaScript/Contrib/bootstrap/bootstrap.js');
504
505
        // hook for additional headerData
506
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preHeaderRenderHook'] ?? [] as $hookFunction) {
507
            $hookParameters = [
508
                'pageRenderer' => &$this->pageRenderer
509
            ];
510
            GeneralUtility::callUserFunction($hookFunction, $hookParameters, $this);
511
        }
512
        // Construct page header.
513
        $str = $this->pageRenderer->render(PageRenderer::PART_HEADER);
514
        $this->JScode = '';

typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php 1 location

@@ 433-438 (lines=6) @@
430
            $this->setSessionCookie();
431
        }
432
        // Hook for alternative ways of filling the $this->user array (is used by the "timtaw" extension)
433
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postUserLookUp'] ?? [] as $funcName) {
434
            $_params = [
435
                'pObj' => $this,
436
            ];
437
            GeneralUtility::callUserFunction($funcName, $_params, $this);
438
        }
439
        // Set $this->gc_time if not explicitly specified
440
        if ($this->gc_time === 0) {
441
            // Default to 86400 seconds (1 day) if $this->sessionTimeout is 0

typo3/sysext/frontend/Classes/Imaging/GifBuilder.php 1 location

@@ 124-127 (lines=4) @@
121
            // Let's you pre-process the gifbuilder configuration. for
122
            // example you can split a string up into lines and render each
123
            // line as TEXT obj, see extension julle_gifbconf
124
            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_gifbuilder.php']['gifbuilder-ConfPreProcess'] ?? [] as $_funcRef) {
125
                $_params = $this->setup;
126
                $this->setup = GeneralUtility::callUserFunction($_funcRef, $_params, $this);
127
            }
128
            // Initializing global Char Range Map
129
            $this->charRangeMap = [];
130
            if (is_array($GLOBALS['TSFE']->tmpl->setup['_GIFBUILDER.']['charRangeMap.'])) {

typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php 2 locations

@@ 1069-1072 (lines=4) @@
1066
    public function determineId()
1067
    {
1068
        // Call pre processing function for id determination
1069
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing'] ?? [] as $functionReference) {
1070
            $parameters = ['parentObject' => $this];
1071
            GeneralUtility::callUserFunction($functionReference, $parameters, $this);
1072
        }
1073
        // If there is a Backend login we are going to check for any preview settings:
1074
        $this->getTimeTracker()->push('beUserLogin', '');
1075
        $originalFrontendUser = null;
@@ 1358-1361 (lines=4) @@
1355
        if ($this->register['SYS_LASTCHANGED'] < (int)$this->page['SYS_LASTCHANGED']) {
1356
            $this->register['SYS_LASTCHANGED'] = (int)$this->page['SYS_LASTCHANGED'];
1357
        }
1358
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['fetchPageId-PostProcessing'] ?? [] as $functionReference) {
1359
            $parameters = ['parentObject' => $this];
1360
            GeneralUtility::callUserFunction($functionReference, $parameters, $this);
1361
        }
1362
    }
1363
1364
    /**

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

@@ 545-548 (lines=4) @@
542
            $this->body .= '<div class="db_list-dashboard">' . $dblist->clipObj->printClipboard() . '</div>';
543
        }
544
        // Additional footer content
545
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/Modules/Recordlist/index.php']['drawFooterHook'] ?? [] as $hook) {
546
            $params = [];
547
            $this->body .= GeneralUtility::callUserFunction($hook, $params, $this);
548
        }
549
        // Setting up the buttons for docheader
550
        $dblist->getDocHeaderButtons($this->moduleTemplate);
551
        // searchbox toolbar