Properties

$metaTitle

$metaTitle : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

$metaDescription

$metaDescription : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

$metaImage

$metaImage : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

$metaAuthor

$metaAuthor : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

$facebookAppId

$facebookAppId : string

Type

string

$opengraphTitle

$opengraphTitle : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

$opengraphSiteName

$opengraphSiteName : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

$opengraphDescription

$opengraphDescription : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

$opengraphType

$opengraphType : string

Type

string

$opengraphImage

$opengraphImage : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

$opengraphAuthor

$opengraphAuthor : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

$opengraphPublisher

$opengraphPublisher : \Charcoal\Translator\Translation|string|null

Type

\Charcoal\Translator\Translation|string|null

Methods

canonicalUrl()

canonicalUrl() : string

Returns

string

defaultMetaTitle()

defaultMetaTitle() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

defaultMetaDescription()

defaultMetaDescription() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

defaultMetaImage()

defaultMetaImage() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

setMetaTitle()

setMetaTitle(mixed  $title) : self

Parameters

mixed $title

The meta tile (localized).

Returns

self

metaTitle()

metaTitle() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

setMetaDescription()

setMetaDescription(mixed  $description) : self

Parameters

mixed $description

The meta description (localized).

Returns

self

metaDescription()

metaDescription() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

setMetaImage()

setMetaImage(mixed  $image) : self

Parameters

mixed $image

The meta image (localized).

Returns

self

metaImage()

metaImage() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

setMetaAuthor()

setMetaAuthor(mixed  $author) : self

Parameters

mixed $author

The meta author (localized).

Returns

self

metaAuthor()

metaAuthor() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

metaTags()

metaTags() : string

Returns

string

setFacebookAppId()

setFacebookAppId(string  $appId) : self

Parameters

string $appId

The facebook App ID (numeric string).

Returns

self

facebookAppId()

facebookAppId() : string

Returns

string

setOpengraphTitle()

setOpengraphTitle(mixed  $title) : self

Parameters

mixed $title

The opengraph title (localized).

Returns

self

opengraphTitle()

opengraphTitle() : \Charcoal\Translator\Translation|string|null

Get the opengraph title.

If not expilicitely defined, use the meta title as opengraph title.

Returns

\Charcoal\Translator\Translation|string|null

setOpengraphSiteName()

setOpengraphSiteName(mixed  $siteName) : self

Parameters

mixed $siteName

The site name (localized).

Returns

self

opengraphSiteName()

opengraphSiteName() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

setOpengraphDescription()

setOpengraphDescription(mixed  $description) : self

Parameters

mixed $description

The opengraph description (localized).

Returns

self

opengraphDescription()

opengraphDescription() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

setOpengraphType()

setOpengraphType(string  $type) : self

Parameters

string $type

The opengraph type.

Returns

self

opengraphType()

opengraphType() : string

Returns

string

setOpengraphImage()

setOpengraphImage(mixed  $image) : self

Parameters

mixed $image

The opengraph image (localized).

Returns

self

opengraphImage()

opengraphImage() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

setOpengraphAuthor()

setOpengraphAuthor(mixed  $author) : self

Parameters

mixed $author

The opengraph author (localized).

Returns

self

opengraphAuthor()

opengraphAuthor() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

setOpengraphPulisher()

setOpengraphPulisher(mixed  $publisher) : self

Parameters

mixed $publisher

The opengraph publisher (localized).

Returns

self

opengraphPublisher()

opengraphPublisher() : \Charcoal\Translator\Translation|string|null

Returns

\Charcoal\Translator\Translation|string|null

opengraphTags()

opengraphTags() : string

Returns

string

generateDefaultMetaTags()

generateDefaultMetaTags() : self

Generates the default metatags for the current object.

Prevents some problem where the defaultMetaTag method content isn't set at the moment of setting the meta. Should be called on preSave and preUpdate of the object.

Returns

self —

$this.

isEmptyMeta()

isEmptyMeta(mixed  $meta) : boolean

Check if the meta is empty. Method exists because at this point we don't really know what's in the meta.

Possible param type:

  • [ lang => value, lang => value ]
  • Translation
  • null

Parameters

mixed $meta

Current meta value.

Returns

boolean —

Empty or not.

translator()

translator() : \Charcoal\Translator\Translator

Returns

\Charcoal\Translator\Translator