Project

General

Profile

Actions

Feature #72306

closed

Add a additional vars hook in the View Module

Added by Dave no-lastname-given almost 9 years ago. Updated 5 months ago.

Status:
Closed
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 2 (0 open2 closed)

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

Actions
Related to TYPO3 Core - Feature #97544: Replace hooks with events for Preview URL generationClosed2022-05-03

Actions
Actions #1

Updated by Benni Mack over 5 years ago

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

Updated by Christian Eßl about 5 years ago

  • Category set to Backend API
Actions #3

Updated by Georg Ringer over 4 years ago

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

Updated by Susanne Moog over 2 years ago

  • Sprint Focus set to On Location Sprint

Should probably be implemented as PSR-14 event.

Actions #5

Updated by Michael Blunck over 2 years ago

  • Status changed from Accepted to In Progress

I try to implement the psr Event

Actions #6

Updated by Oliver Hader about 2 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #7

Updated by Georg Ringer 5 months ago

  • Status changed from In Progress to Closed

solved with #97544

Actions #8

Updated by Georg Ringer 5 months ago

  • Related to Feature #97544: Replace hooks with events for Preview URL generation added
Actions

Also available in: Atom PDF