Properties

$currentNews

$currentNews : array

Currently displayed news.

Type

array — City/Object/News

Methods

newsList()

newsList() : \Generator|void

Formatted news list Returns the entries for the current page.

Returns

\Generator|void

newsArchiveList()

newsArchiveList() : \Generator|void

Formatted news archive list Returns the entries for the current page.

Returns

\Generator|void

currentNews()

currentNews() : array

Current news.

Returns

array —

The properties of the current news

featNews()

featNews() : \Generator

Returns

\Generator

nextNews()

nextNews() : array

Next news in list.

Returns

array —

The next news properties.

prevNews()

prevNews() : array

Next news in list.

Returns

array —

The next news properties.

numNews()

numNews() : integer

Amount of news (total)

Returns

integer —

How many news?

numNewsPages()

numNewsPages() : float

Returns

float

newsHasPager()

newsHasPager() : boolean

Returns

boolean

newsCategoryList()

newsCategoryList() : \Generator

Returns

\Generator

newsCategory()

newsCategory(\Charcoal\Cms\NewsInterface  $news) : \Charcoal\Object\CategoryInterface

Parameters

\Charcoal\Cms\NewsInterface $news

Charcoal\Cms\NewsInterface.

Returns

\Charcoal\Object\CategoryInterface

getNewsDateFormat()

getNewsDateFormat(\Charcoal\Cms\NewsInterface  $news) : string

Parameters

\Charcoal\Cms\NewsInterface $news

Charcoal\Cms\NewsInterface.

Returns

string

newsFormatShort()

newsFormatShort(\Charcoal\Cms\NewsInterface  $news) : array

Formatting expected in templates

Parameters

\Charcoal\Cms\NewsInterface $news

A single news.

Returns

array —

The needed news properties.

newsFormatNav()

newsFormatNav(\Charcoal\Cms\NewsInterface  $news) : array

Formatting expected in templates

Parameters

\Charcoal\Cms\NewsInterface $news

A single news.

Returns

array —

The needed news properties.

newsFormatFull()

newsFormatFull(\Charcoal\Cms\NewsInterface  $news) : array

Parameters

\Charcoal\Cms\NewsInterface $news

The current news.

Returns

array —

The needed properties.

newsFormatCategory()

newsFormatCategory(\Charcoal\Object\CategoryInterface  $category) : array

Parameters

\Charcoal\Object\CategoryInterface $category

The category item.

Returns

array —

The formatted category item.

dateHelper()

dateHelper() : mixed

dateHelperAwareTrait dependency

Returns

mixed