OgDataInitTrait
Table of Contents
Properties
Methods
- initializeOgData() : void
- ogData() : OgDataDTO
- Returns the page OG data; filled by `initializeOgData()` in startup, an empty DTO before that.
- prepareOgData() : OgDataDTO
- buildDefaultOgImage() : OgImageDTO|null
- Builds the default OG image from the site identity (admin, settings, site identity).
Properties
$ogData
protected
OgDataDTO|null
$ogData
= null
Methods
initializeOgData()
protected
initializeOgData() : void
ogData()
Returns the page OG data; filled by `initializeOgData()` in startup, an empty DTO before that.
protected
ogData() : OgDataDTO
Return values
OgDataDTOprepareOgData()
protected
prepareOgData() : OgDataDTO
Return values
OgDataDTObuildDefaultOgImage()
Builds the default OG image from the site identity (admin, settings, site identity).
private
buildDefaultOgImage(string $alt) : OgImageDTO|null
Default only: detail pages override the image with their own
(OgDataTrait::prepareOgDataForDetail()),
after this call. Without a configured image og:image is not rendered at all.
Parameters
- $alt : string