Core Theme Components

PageMeta extends HtmlMeta

Generates meta tags for the <head> section of a web page.

Tags
version
1.0.0

Table of Contents

$articleFeed  : string
$canonicalUrl  : string
$description  : string
$facebookMeta  : FacebookMeta|null
$keywords  : array<string|int, mixed>
$podcastFeed  : string
$robots  : string
$twitterMeta  : TwitterMeta|null
$withKeywords  : bool
__construct()  : mixed
__toString()  : string
addKeyword()  : self
Add a keyword.
createFromCorePost()  : PageMeta
getArticleFeed()  : string
getCanonicalUrl()  : string
getDescription()  : string
getFacebookMeta()  : FacebookMeta|null
getKeywords()  : array<string|int, string>
Returns a list of strings (keywords).
getPodcastFeed()  : string
getRobots()  : string
getTwitterMeta()  : TwitterMeta|null
getWithKeywords()  : bool
Returns true if keywords meta tag is to be added.
render()  : string
Render the component to HTML.
setArticleFeed()  : self
setCanonicalUrl()  : self
setDescription()  : self
setFacebookMeta()  : self
setKeywords()  : self
Add a list keywords. $keywords may also be set as a single string or tokenized (e.g. CSV, piped).
setPodcastFeed()  : self
setRobots()  : self
setTwitterMeta()  : self
setWithKeywords()  : self
Adds keywords meta tag if $withKeywords is true.

Properties

$articleFeed

private string $articleFeed = ''

$canonicalUrl

private string $canonicalUrl = ''

$description

private string $description = ''

$keywords

private array<string|int, mixed> $keywords = []

$podcastFeed

private string $podcastFeed = ''

$withKeywords

private bool $withKeywords = false

Methods

__toString()

public __toString() : string
Return values
string

addKeyword()

Add a keyword.

public addKeyword(mixed $keyword) : self
Parameters
$keyword : mixed
Return values
self

getArticleFeed()

public getArticleFeed() : string
Return values
string

getCanonicalUrl()

public getCanonicalUrl() : string
Return values
string

getDescription()

public getDescription() : string
Return values
string

getKeywords()

Returns a list of strings (keywords).

public getKeywords() : array<string|int, string>
Return values
array<string|int, string>

getPodcastFeed()

public getPodcastFeed() : string
Return values
string

getRobots()

public getRobots() : string
Return values
string

getWithKeywords()

Returns true if keywords meta tag is to be added.

public getWithKeywords() : bool
Return values
bool

render()

Render the component to HTML.

public render() : string
Return values
string

setArticleFeed()

public setArticleFeed(mixed $articleFeed) : self
Parameters
$articleFeed : mixed
Return values
self

setCanonicalUrl()

public setCanonicalUrl(mixed $canonicalUrl) : self
Parameters
$canonicalUrl : mixed
Return values
self

setDescription()

public setDescription(mixed $description) : self
Parameters
$description : mixed
Return values
self

setKeywords()

Add a list keywords. $keywords may also be set as a single string or tokenized (e.g. CSV, piped).

public setKeywords(array<string|int, mixed>|string $keywords[, string $token = '' ]) : self
Parameters
$keywords : array<string|int, mixed>|string
$token : string = ''

Optional

Return values
self

setPodcastFeed()

public setPodcastFeed(mixed $podcastFeed) : self
Parameters
$podcastFeed : mixed
Return values
self

setRobots()

public setRobots(mixed $robots) : self
Parameters
$robots : mixed
Return values
self

setWithKeywords()

Adds keywords meta tag if $withKeywords is true.

public setWithKeywords(bool $withKeywords) : self
Parameters
$withKeywords : bool
Return values
self

Search results