Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us//ExtensionArchitecture/HowTo/BackendModule/CreateModuleWithExtbase.html #4962

Open
garvinhicking opened this issue Oct 30, 2024 · 1 comment

Comments

@garvinhicking
Copy link
Contributor

The docs are missing the deprecation of https://forge.typo3.org/issues/96903 and contain an outdated example with moduleTemplate->setContent() which has been removed in TYPO3v13.

Reported on https://forge.typo3.org/issues/105496 and moved here

@garvinhicking
Copy link
Contributor Author

My answer in the ticket:

The old moduleTemplate API has been removed: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Deprecation-96903-DeprecateOldModuleTemplateAPI.html

Most likely you should be able to use:

 public function dashboardAction(): ResponseInterface
    {
        $moduleTemplate = $this->moduleTemplateFactory->create($this->request);
        $moduleTemplate->assign('someVar', 'someContent');
        return $moduleTemplate->renderResponse('MyTemplate');
    }

with an accompanying Layout file as outlined in https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-96730-SimplifiedExtbackendModuleTemplateAPI.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant