Overview

Namespaces

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

Classes

  • AbstractManager
  • EventManager
  • NewsManager
  • Overview
  • Namespace
  • Class

Class EventManager

Event manager

Charcoal\Cms\Service\Manager\AbstractManager uses Charcoal\Translator\TranslatorAwareTrait (not available)
Extended by Charcoal\Cms\Service\Manager\EventManager uses Charcoal\Object\CategoryTrait (not available)
Namespace: Charcoal\Cms\Service\Manager
Located at Charcoal/Cms/Service/Manager/EventManager.php
Methods summary
public
# __construct( array $data )

EventManager constructor.

EventManager constructor.

Parameters

$data
The Data.

Throws

Exception
When $data index is not set.

Overrides

Charcoal\Cms\Service\Manager\AbstractManager::__construct()
public mixed
# entries( )

To be displayed events list.

To be displayed events list.

Returns

mixed
The event collection.
public mixed
# entry( integer|null $id = null )

Parameters

$id
The event id.

Returns

mixed
public Charcoal\Cms\EventInterface[]|Charcoal\Model\Collection
# all( )

All available events

All available events

Returns

Charcoal\Cms\EventInterface[]|Charcoal\Model\Collection
The events collection
public Charcoal\Object\CategoryInterface|Charcoal\Model\Collection
# loadCategoryItems( )

Returns

Charcoal\Object\CategoryInterface|Charcoal\Model\Collection
The category collection.
public Charcoal\Object\CategoryInterface|Charcoal\Cms\EventCategory
# categoryItem( integer $id )

Parameters

$id
The category id.

Returns

Charcoal\Object\CategoryInterface|Charcoal\Cms\EventCategory
public mixed
# featList( array $options = [] )

Get featured events from config objects with custom filters as options.

Get featured events from config objects with custom filters as options.

Parameters

$options
The options for the collection loader.

Returns

mixed

Throws

Exception
When featured news ident is not valid.
public Charcoal\Cms\EventInterface[]|Charcoal\Model\Collection
# archive( )

Returns

Charcoal\Cms\EventInterface[]|Charcoal\Model\Collection
public Charcoal\Cms\EventInterface|array
# latest( )

Get the latest event.

Get the latest event.

Returns

Charcoal\Cms\EventInterface|array
The latest event.
public mixed
# prev( )

Returns

mixed
The previous event
public mixed
# next( )

Returns

mixed
The next event
public float|integer
# currentPage( )

Returns

float|integer
The current event index page ident.
public array
# getEventsByDate( mixed $date )

Parameters

$date
The date from which to load.

Returns

array
public mixed
# currentEvent( )

Returns

mixed
public integer
# numPerPage( )

Returns

integer
public boolean
# entryCycle( )

Returns

boolean
public integer
# numEvent( )

Amount of event (total)

Amount of event (total)

Returns

integer
How many event?
public float
# numPages( )

The total amount of pages.

The total amount of pages.

Returns

float
public boolean
# hasPager( )

Is there a pager.

Is there a pager.

Returns

boolean
public integer
# page( )

Returns

integer
public integer
# category( )

Returns

integer
public mixed
# objType( )

Returns

mixed
public mixed
# featIdent( )

Returns

mixed
public Charcoal\Cms\Service\Loader\EventLoader
# loader( )

Returns

Charcoal\Cms\Service\Loader\EventLoader
public mixed
# date( )

Datetime object OR null.

Datetime object OR null.

Returns

mixed
Datetime or null.
public integer
# year( )

Full year

Full year

Returns

integer
Full year.
public mixed
# month( )

Month

Month

Returns

mixed
month.
public mixed
# day( )

Day

Day

Returns

mixed
day.
public Charcoal\Cms\Service\Manager\EventManager
# setCurrentEvent( mixed $currentEvent )

Parameters

$currentEvent
The current event context.

Returns

Charcoal\Cms\Service\Manager\EventManager
public Charcoal\Cms\Service\Manager\EventManager
# setNumPerPage( integer $numPerPage )

Parameters

$numPerPage
The number of event per page.

Returns

Charcoal\Cms\Service\Manager\EventManager
public Charcoal\Cms\Service\Manager\EventManager
# setEntryCycle( boolean $entryCycle )

Parameters

$entryCycle
Next and Prev cycles indefinitely.

Returns

Charcoal\Cms\Service\Manager\EventManager
public Charcoal\Cms\Service\Manager\EventManager
# setPage( integer $page )

Parameters

$page
The page number to load.

Returns

Charcoal\Cms\Service\Manager\EventManager
public Charcoal\Cms\Service\Manager\EventManager
# setCategory( integer $category )

Parameters

$category
The current entry category.

Returns

Charcoal\Cms\Service\Manager\EventManager
public Charcoal\Cms\Service\Manager\EventManager
# setObjType( mixed $objType )

Parameters

$objType
The object type.

Returns

Charcoal\Cms\Service\Manager\EventManager
public Charcoal\Cms\Service\Manager\EventManager
# setFeatIdent( mixed $featIdent )

Parameters

$featIdent
The featured list ident.

Returns

Charcoal\Cms\Service\Manager\EventManager
public Charcoal\Cms\Service\Manager\EventManager
# setLoader( Charcoal\Cms\Service\Loader\EventLoader|null $loader )

Parameters

$loader
The event loader provider.

Returns

Charcoal\Cms\Service\Manager\EventManager
public Charcoal\Cms\Service\Manager\EventManager
# setDate( DateTime $date )

Set date filter.

Set date filter.

Parameters

$date
Date filter.

Returns

Charcoal\Cms\Service\Manager\EventManager
public Charcoal\Cms\Service\Manager\EventManager
# setYear( mixed $year )

Full year.

Full year.

Parameters

$year
Full year.

Returns

Charcoal\Cms\Service\Manager\EventManager

Throws

Exception
If argument is not scalar.
public Charcoal\Cms\Service\Manager\EventManager
# setMonth( mixed $month )

Month.

Month.

Parameters

$month
Specific month.

Returns

Charcoal\Cms\Service\Manager\EventManager

Throws

Exception
If argument is not scalar.
public Charcoal\Cms\Service\Manager\EventManager
# setDay( mixed $day )

Day.

Day.

Parameters

$day
Specific day.

Returns

Charcoal\Cms\Service\Manager\EventManager

Throws

Exception
If argument is not scalar.
public
# setPrevNext( )

Set the Prev and Next event

Set the Prev and Next event

Returns


$this
public array
# mapEvents( )

Mapping between events and dates

Mapping between events and dates

Returns

array
The array containing events stored as [$year][$month][$day][event]
Methods inherited from Charcoal\Cms\Service\Manager\AbstractManager
adminConfig(), collectionLoader(), modelFactory(), setAdminConfig(), setCollectionLoader(), setModelFactory()
Properties inherited from Charcoal\Cms\Service\Manager\AbstractManager
$adminConfig, $collectionLoader, $modelFactory
API documentation generated by ApiGen