\Charcoal\CmsAbstractNews

News

Summary

Methods
Properties
Constants
canonicalUrl()
defaultMetaTitle()
defaultMetaDescription()
defaultMetaImage()
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()
__construct()
dateTimeDate()
verifyDates()
adminDateFilter()
setTitle()
setSubtitle()
setSummary()
setContent()
setImage()
setInfoUrl()
setNewsDate()
setKeywords()
title()
subtitle()
summary()
infoUrl()
newsDate()
content()
image()
keywords()
parseAsMultiple()
preSave()
preUpdate()
postSave()
postUpdate()
isActiveRoute()
No public properties found
No constants found
translator()
$metaTitle
$metaDescription
$metaImage
$metaAuthor
$facebookAppId
$opengraphTitle
$opengraphSiteName
$opengraphDescription
$opengraphType
$opengraphImage
$opengraphAuthor
$opengraphPublisher
$keywords
N/A
No private methods found
$searchProperties
$searchKeywords
$templateIdent
$controllerIdent
$templateOptions
$title
$subtitle
$summary
$content
$image
$newsDate
$infoUrl
N/A

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

$keywords

$keywords : array

Type

array

$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

$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

$newsDate

$newsDate : \DateTimeInterface|null

Type

\DateTimeInterface|null

$infoUrl

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

Type

\Charcoal\Translator\Translation|string|null

Methods

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

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

__construct()

__construct(array  $data = null) 

Section constructor.

Parameters

array $data

The data.

dateTimeDate()

dateTimeDate() : string

In the datetime attribute of the <time> tag

Returns

string —

The datetime attribute formatted.

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 news title (localized).

Returns

self

setSubtitle()

setSubtitle(mixed  $subtitle) : self

Parameters

mixed $subtitle

The news subtitle (localized).

Returns

self

setSummary()

setSummary(mixed  $summary) : self

Parameters

mixed $summary

The news summary (localized).

Returns

self

setContent()

setContent(mixed  $content) : self

Parameters

mixed $content

The news content (localized).

Returns

self

setImage()

setImage(mixed  $image) : self

Parameters

mixed $image

The section main image (localized).

Returns

self

setInfoUrl()

setInfoUrl(mixed  $url) : self

Parameters

mixed $url

The info URL (news source or where to find more information; localized).

Returns

self

setNewsDate()

setNewsDate(string|\DateTimeInterface  $newsDate) : self

Parameters

string|\DateTimeInterface $newsDate

The news date.

Throws

\InvalidArgumentException

If the timestamp is invalid.

Returns

self

setKeywords()

setKeywords(string|array<mixed,string>  $keywords) : self

Set the object's keywords.

Parameters

string|array<mixed,string> $keywords

One or more entries.

Returns

self

title()

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

Returns

\Charcoal\Translator\Translation|string|null

subtitle()

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

Returns

\Charcoal\Translator\Translation|string|null

summary()

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

Returns

\Charcoal\Translator\Translation|string|null

infoUrl()

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

Returns

\Charcoal\Translator\Translation|string|null

newsDate()

newsDate() : \DateTimeInterface|null

Returns

\DateTimeInterface|null

content()

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

Returns

\Charcoal\Translator\Translation|string|null

image()

image() : \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>

parseAsMultiple()

parseAsMultiple(mixed  $value, string|\Charcoal\Cms\PropertyInterface  $separator = ',') : array

Parse the property value as a "multiple" value type.

Parameters

mixed $value

The value being converted to an array.

string|\Charcoal\Cms\PropertyInterface $separator

The boundary string.

Returns

array

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

translator()

translator() : \Charcoal\Translator\Translator

Returns

\Charcoal\Translator\Translator