Actions
Bug #86924
closedMetaTagManagerRegistry has no method "getInstance"
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Documentation
Target version:
-
Start date:
2018-11-14
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The documentation to create a MetaTagManagerRegistry is wrong:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Documentation/Changelog/9.3/Feature-81464-AddAPIForMetaTagManagement.rst
$metaTagManager = \TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry::getInstance()->getManagerForProperty('og:title');
There is no method getInstance. It was removed with #85197.
The documentation should be
$metaTagManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry::class)->getManagerForProperty('og:title'); // or $metaTagManagerRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry::class); $metaTagManager = $metaTagManagerRepository->getManagerForProperty('og:title');
Actions