HrefLangGenerator
Class to add the hreflang tags to the page
Table of Contents
Properties
Methods
- __construct() : mixed
- __invoke() : void
- getAbsoluteUrl() : string
- getTranslatedPageRecord() : array<string|int, mixed>
Properties
$cObj
protected
ContentObjectRenderer
$cObj
$languageMenuProcessor
protected
LanguageMenuProcessor
$languageMenuProcessor
Methods
__construct()
public
__construct(ContentObjectRenderer $cObj, LanguageMenuProcessor $languageMenuProcessor) : mixed
Parameters
- $cObj : ContentObjectRenderer
- $languageMenuProcessor : LanguageMenuProcessor
__invoke()
public
__invoke(ModifyHrefLangTagsEvent $event) : void
Parameters
- $event : ModifyHrefLangTagsEvent
Attributes
- #[AsEventListener]
- 'typo3-seo/hreflangGenerator'
getAbsoluteUrl()
protected
getAbsoluteUrl(string $url, SiteLanguage $siteLanguage) : string
Parameters
- $url : string
- $siteLanguage : SiteLanguage
Return values
stringgetTranslatedPageRecord()
protected
getTranslatedPageRecord(int $pageId, int $languageId, Site $site) : array<string|int, mixed>
Parameters
- $pageId : int
- $languageId : int
- $site : Site