1313
1414use TYPO3 \CMS \Core \MetaTag \MetaTagManagerRegistry ;
1515use TYPO3 \CMS \Core \Utility \GeneralUtility ;
16- use TYPO3Fluid \Fluid \Core \Rendering \RenderingContextInterface ;
1716use TYPO3Fluid \Fluid \Core \ViewHelper \AbstractViewHelper ;
18- use TYPO3Fluid \Fluid \Core \ViewHelper \Traits \CompileWithRenderStatic ;
1917
2018class MetaTagViewHelper extends AbstractViewHelper
2119{
22- use CompileWithRenderStatic;
23-
2420 /**
2521 * Initialize arguments
2622 */
27- public function initializeArguments ()
23+ public function initializeArguments (): void
2824 {
2925 $ this ->registerArgument ('property ' , 'string ' , 'Property to be set ' , true );
3026 $ this ->registerArgument ('value ' , 'string ' , 'value ' );
@@ -33,11 +29,11 @@ public function initializeArguments()
3329 /**
3430 * @return string
3531 */
36- public static function renderStatic ( array $ arguments , \ Closure $ renderChildrenClosure , RenderingContextInterface $ renderingContext )
32+ public function render ( )
3733 {
38- $ value = trim ($ arguments ['value ' ] ?: $ renderChildrenClosure ());
34+ $ value = trim ($ this -> arguments ['value ' ] ?: $ this -> renderChildren ());
3935 if ($ value ) {
40- $ property = $ arguments ['property ' ];
36+ $ property = $ this -> arguments ['property ' ];
4137 $ metaTagManager = GeneralUtility::makeInstance (MetaTagManagerRegistry::class)->getManagerForProperty ($ property );
4238 // @extensionScannerIgnoreLine
4339 $ metaTagManager ->addProperty ($ property , $ value );
0 commit comments