Project

General

Profile

Actions

Feature #72306

open

Add a additional vars hook in the View Module

Added by Dave no-lastname-given over 8 years ago. Updated over 1 year ago.

Status:
In Progress
Priority:
Could have
Assignee:
-
Category:
Backend API
Start date:
2015-12-18
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

It would be nice to have a hook in the pageview sysext so that additional vars could be added to the page preview target url.
I can hook into the viewOnClick in the BackendUtility to add additional vars but not in the pageview extension itself.

Something like:
(in sysext/viewpage/Classes/Controller/ViewModuleController.php->getTargetUrl() @line:~154)

// Hook to append additional get vars.
$additionalGetVars = '';
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['viewpage/ViewModuleController.php']['getTargetUrl']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['viewpage/ViewModuleController.php']['getTargetUrl'])) {
    foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['viewpage/ViewModuleController.php']['getTargetUrl'] as $funcRef) {
        $hookObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($funcRef);
        if (method_exists($hookObj, 'setAdditionalGetVars')) {
            $hookObj->setAdditionalGetVars($additionalGetVars);
        }
    }
}
return $protocolAndHost . '/index.php?id=' . $finalPageIdToShow . $this->getTypeParameterIfSet($finalPageIdToShow) . $mountPointMpParameter . $adminCommand . $languageParameter . $additionalGetVars;


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Epic #88027: Properly handle Hooks/Signals and EventsClosedBenni Mack2022-04-22

Actions
Actions #1

Updated by Benni Mack about 5 years ago

  • Related to Epic #88027: Properly handle Hooks/Signals and Events added
Actions #2

Updated by Christian Eßl over 4 years ago

  • Category set to Backend API
Actions #3

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Accepted
  • Target version set to Candidate for Major Version
Actions #4

Updated by Susanne Moog over 1 year ago

  • Sprint Focus set to On Location Sprint

Should probably be implemented as PSR-14 event.

Actions #5

Updated by Michael Blunck over 1 year ago

  • Status changed from Accepted to In Progress

I try to implement the psr Event

Actions #6

Updated by Oliver Hader over 1 year ago

  • Sprint Focus deleted (On Location Sprint)
Actions

Also available in: Atom PDF