[TYPO3-core] RFC: #14860: Pagerenderer - use better method for adding meta tags

Dmitry Dulepov dmitry.dulepov at gmail.com
Fri Jun 25 09:35:19 CEST 2010


Hi!

Ernesto Baschny [cron IT] wrote:
> I prefer the method with this signature:
> 
> function addMetaTag($name, $content = '', $isHttpEquiv = FALSE, array
> $additionalParameters = array())
> 
> 
> So you always use the $name + $content parameters and set $isHttpEquiv
> to TRUE if you want a http-equiv instead of a name:

Yes, this would be simpler and allows to add schema. +1 in general.

Just for the sake of readability, I would prefer to have constants instead
of TRUE. Something like:

	$renderer->addMetaTag('refresh', '0; url=...',
t3lib_PageRenderer::HTTP_EQUIV);

This is more readable than

	$renderer->addMetaTag('refresh', '0; url=...', true);

So the signature could be:

public function addMetaTag($nameAttributeValue, $contentAttributeValue,
$metaTagType = t3lib_PageRenderer::NAME, $additionalParamaeters = array())

-- 
Dmitry Dulepov
TYPO3 expert / TYPO3 core&security teams member
Twitter: http://twitter.com/dmitryd
Read more @ http://dmitry-dulepov.com/


More information about the TYPO3-team-core mailing list