\Charcoal\CmsEvent

CMS Event

Summary

Methods
Properties
Constants
__construct()
verifyDates()
adminDateFilter()
setTitle()
title()
setSubtitle()
subtitle()
setSummary()
summary()
setContent()
content()
setImage()
image()
setStartDate()
startDate()
setEndDate()
endDate()
canonicalUrl()
defaultMetaTitle()
defaultMetaDescription()
defaultMetaImage()
keywords()
preSave()
preUpdate()
postSave()
postUpdate()
isActiveRoute()
setMetaTitle()
metaTitle()
setMetaDescription()
metaDescription()
setMetaImage()
metaImage()
setMetaAuthor()
metaAuthor()
metaTags()
setFacebookAppId()
facebookAppId()
setOpengraphTitle()
opengraphTitle()
setOpengraphSiteName()
opengraphSiteName()
setOpengraphDescription()
opengraphDescription()
setOpengraphType()
opengraphType()
setOpengraphImage()
opengraphImage()
setOpengraphAuthor()
opengraphAuthor()
setOpengraphPulisher()
opengraphPublisher()
opengraphTags()
generateDefaultMetaTags()
isEmptyMeta()
setSearchProperties()
searchProperties()
setSearchKeywords()
searchKeywords()
setTemplateIdent()
templateIdent()
setControllerIdent()
controllerIdent()
setTemplateOptions()
templateOptions()
categoryType()
No public properties found
No constants found
translator()
$keywords
$metaTitle
$metaDescription
$metaImage
$metaAuthor
$facebookAppId
$opengraphTitle
$opengraphSiteName
$opengraphDescription
$opengraphType
$opengraphImage
$opengraphAuthor
$opengraphPublisher
N/A
No private methods found
$title
$subtitle
$summary
$content
$image
$startDate
$endDate
$searchProperties
$searchKeywords
$templateIdent
$controllerIdent
$templateOptions
N/A

Properties

$keywords

$keywords : array

Type

array

$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

$title

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

Type

\Charcoal\Translator\Translation|string|null

$subtitle

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

Type

\Charcoal\Translator\Translation|string|null

$summary

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

Type

\Charcoal\Translator\Translation|string|null

$content

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

Type

\Charcoal\Translator\Translation|string|null

$image

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

Type

\Charcoal\Translator\Translation|string|null

$startDate

$startDate : \DateTimeInterface|null

Type

\DateTimeInterface|null

$endDate

$endDate : \DateTimeInterface|null

Type

\DateTimeInterface|null

$searchProperties

$searchProperties : array

Type

array

$searchKeywords

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

Type

\Charcoal\Translator\Translation|string|null

$templateIdent

$templateIdent : mixed

The object's template identifier.

Type

mixed

$controllerIdent

$controllerIdent : mixed

The object's template controller identifier.

Type

mixed

$templateOptions

$templateOptions : array

The customized template options.

Type

array

Methods

__construct()

__construct(array  $data = null) 

Section constructor.

Parameters

array $data

The data.

verifyDates()

verifyDates() : void

Some dates cannot be null

adminDateFilter()

adminDateFilter() : string

Returns

string —

The date filtered for admin dual select input and others.

setTitle()

setTitle(mixed  $title) : self

Parameters

mixed $title

The event title (localized).

Returns

self

title()

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

Returns

\Charcoal\Translator\Translation|string|null

setSubtitle()

setSubtitle(mixed  $subtitle) : self

Parameters

mixed $subtitle

The event subtitle (localized).

Returns

self

subtitle()

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

Returns

\Charcoal\Translator\Translation|string|null

setSummary()

setSummary(mixed  $summary) : self

Parameters

mixed $summary

The news summary (localized).

Returns

self

summary()

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

Returns

\Charcoal\Translator\Translation|string|null

setContent()

setContent(mixed  $content) : self

Parameters

mixed $content

The event content (localized).

Returns

self

content()

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

Returns

\Charcoal\Translator\Translation|string|null

setImage()

setImage(mixed  $image) : self

Parameters

mixed $image

The section main image (localized).

Returns

self

image()

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

Returns

\Charcoal\Translator\Translation|string|null

setStartDate()

setStartDate(string|\DateTimeInterface  $startDate) : self

Parameters

string|\DateTimeInterface $startDate

Event starting date.

Throws

\InvalidArgumentException

If the timestamp is invalid.

Returns

self

startDate()

startDate() : \DateTimeInterface|null

Returns

\DateTimeInterface|null

setEndDate()

setEndDate(string|\DateTimeInterface  $endDate) : self

Parameters

string|\DateTimeInterface $endDate

Event end date.

Throws

\InvalidArgumentException

If the timestamp is invalid.

Returns

self

endDate()

endDate() : \DateTimeInterface|null

Returns

\DateTimeInterface|null

canonicalUrl()

canonicalUrl() : string

MetatagTrait > canonical_url

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

keywords()

keywords() : array<mixed,string>

Retrieve the object's keywords.

Returns

array<mixed,string>

preSave()

preSave() : boolean

{@inheritdoc}

Returns

boolean

preUpdate()

preUpdate(array  $properties = null) : boolean

{@inheritdoc}

Parameters

array $properties

Optional properties to update.

Returns

boolean

postSave()

postSave() : boolean

Returns

boolean —

Parent postSave().

postUpdate()

postUpdate(array|null  $properties = null) : boolean

Parameters

array|null $properties

Properties.

Returns

boolean

isActiveRoute()

isActiveRoute() : boolean

GenericRoute checks if the route is active.

Default in RoutableTrait.

Returns

boolean

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.

setSearchProperties()

setSearchProperties(array  $properties) : self

Parameters

array $properties

The properties to search into.

Returns

self

searchProperties()

searchProperties() : array

Returns

array

setSearchKeywords()

setSearchKeywords(mixed  $keywords) : self

Parameters

mixed $keywords

The search keywords (localized).

Returns

self

searchKeywords()

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

Returns

\Charcoal\Translator\Translation|string|null

setTemplateIdent()

setTemplateIdent(mixed  $template) : self

Set the renderable object's template identifier.

Parameters

mixed $template

The template ID.

Returns

self

templateIdent()

templateIdent() : mixed

Retrieve the renderable object's template identifier.

Returns

mixed

setControllerIdent()

setControllerIdent(mixed  $ident) : self

Set the renderable object's template controller identifier.

Parameters

mixed $ident

The template controller identifier.

Returns

self

controllerIdent()

controllerIdent() : mixed

Retrieve the renderable object's template controller identifier.

Returns

mixed

setTemplateOptions()

setTemplateOptions(mixed  $options) : self

Customize the template's options.

Parameters

mixed $options

Template options.

Returns

self

templateOptions()

templateOptions() : array

Retrieve the template's customized options.

Returns

array

categoryType()

categoryType() : string

CategorizableTrait > category_type()

Returns

string

translator()

translator() : \Charcoal\Translator\Translator

Returns

\Charcoal\Translator\Translator