final class Twitter extends AbstractMetaEntity (View source)

Renders Twitter Card metadata using page defaults and supported custom overrides.

Methods

Initializes a section with the metadata it will render.

renderTags(array $tags)

Renders only non-empty tags, separating each rendered tag by a newline.

string
string
render()

Renders the Twitter Card tag set and an optional creator declaration.

string

Details

__construct

__construct(MetaData $data)

Initializes a section with the metadata it will render.

Parameters

MetaData $data

renderTags

protected string renderTags(array $tags)

Renders only non-empty tags, separating each rendered tag by a newline.

Parameters

array $tags

Return Value

string

render

string render()

Renders the Twitter Card tag set and an optional creator declaration.

Return Value

string