General Tech Bugs & Fixes . 1 year ago

TYPO3 v8. Override function in Core class

TYPO3 v8. Override function in Core class

5 views   1   0 likes   0 shares Tuteehub forum manpreet 1 answers
Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.


Tuteehub forum answer Answers (1)

manpreet Tuteehub forum best answer Best Answer 1 year ago

I need to override the function

protected function getLanguageParameter()
    $states = $this->getBackendUser()->uc['moduleData']['web_view']['States'];
    $languages = $this->getPreviewLanguages();
    $languageParameter = '';
    if (isset($states['languageSelectorValue']) && isset($languages[$states['languageSelectorValue']])) {
        $languageParameter = '&L=' . (int)$states['languageSelectorValue'];
    $languageParameter = '&L=1';
    return $languageParameter;

in the class TYPO3\CMS\Viewpage\Controller\ViewModuleController. It get called when you are open the View in the backend.

Lets say I would extend the class in my own extension. I already need a Hook that calls the function? But how can I get that hook?

5 views   0 shares
Related Tags

AskAnything Ask Anything

Ask Me Anything

ask me anything tuteehub

Hello! How can I assist you today?
Whether you have questions, need information, or just want to chat, feel free to let me know