Overview

Namespaces

  • Charcoal
    • Admin
      • Widget
        • Cms
    • Cms
      • Config
      • Mixin
        • Traits
      • Route
      • Section
      • Service
        • Loader
        • Manager
      • ServiceProvider
      • Support
        • Helpers
        • Interfaces
        • Traits
    • Property

Traits

  • DateHelperAwareTrait
  • EventManagerAwareTrait
  • NewsManagerAwareTrait
  • SectionLoaderAwareTrait
  • Overview
  • Namespace
  • Class

Trait NewsManagerAwareTrait

Namespace: Charcoal\Cms\Support\Traits
Located at Charcoal/Cms/Support/Traits/NewsManagerAwareTrait.php
Methods summary
public Generator|
# newsList( )

Formatted news list Returns the entries for the current page.

Formatted news list Returns the entries for the current page.

Returns

Generator|
public Generator|
# newsArchiveList( )

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

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

Returns

Generator|
public array
# currentNews( )

Current news.

Current news.

Returns

array
The properties of the current news
public Generator
# featNews( )

Returns

Generator
public array
# nextNews( )

Next news in list.

Next news in list.

Returns

array
The next news properties.
public array
# prevNews( )

Next news in list.

Next news in list.

Returns

array
The next news properties.
public integer
# numNews( )

Amount of news (total)

Amount of news (total)

Returns

integer
How many news?
public float
# numNewsPages( )

Returns

float
public boolean
# newsHasPager( )

Returns

boolean
public Generator
# newsCategoryList( )

Returns

Generator
public Charcoal\Object\CategoryInterface
# newsCategory( Charcoal\Cms\NewsInterface $news )

Parameters

$news
Charcoal\Cms\NewsInterface.

Returns

Charcoal\Object\CategoryInterface
protected string
# getNewsDateFormat( Charcoal\Cms\NewsInterface $news )

Parameters

$news
Charcoal\Cms\NewsInterface.

Returns

string
protected array
# newsFormatShort( Charcoal\Cms\NewsInterface $news )

Formatting expected in templates

Formatting expected in templates

Parameters

$news
A single news.

Returns

array
The needed news properties.
protected array
# newsFormatNav( Charcoal\Cms\NewsInterface $news )

Formatting expected in templates

Formatting expected in templates

Parameters

$news
A single news.

Returns

array
The needed news properties.
protected array
# newsFormatFull( Charcoal\Cms\NewsInterface $news )

Parameters

$news
The current news.

Returns

array
The needed properties.
protected array
# newsFormatCategory( Charcoal\Object\CategoryInterface $category )

Parameters

$category
The category item.

Returns

array
The formatted category item.
protected Charcoal\Cms\Service\Manager\NewsManager
# newsManager( )

Returns

Charcoal\Cms\Service\Manager\NewsManager

Throws

Slim\Exception\ContainerException
When dependency is missing.
protected Charcoal\Cms\Support\Traits\NewsManagerAwareTrait
# setNewsManager( Charcoal\Cms\Service\Manager\NewsManager $newsManager )

Parameters

$newsManager
The news Manager class.

Returns

Charcoal\Cms\Support\Traits\NewsManagerAwareTrait
abstract protected mixed
# dateHelper( )

dateHelperAwareTrait dependency

dateHelperAwareTrait dependency

Returns

mixed
API documentation generated by ApiGen