class Newsflow (View source)

Class Newsflow.

A class used for retrieving the latest news and updates from Concrete5. This is a singleton class that should be instantiated via Newsflow::getInstance(). This object is prevented from being created if the config file has the 'concrete.external.news' setting set to false.

\@package Concrete\Core\Activity

Constants

E_NEWSFLOW_SUPPORT_MANUALLY_DISABLED

Constant for if newsflow is manually disabled (like through a config entry).

Properties

protected bool $isConnected
protected bool|int $connectionError
protected null|NewsflowSlotItem[] $slots

Methods

__construct()

No description

bool
hasConnectionError()

No description

bool|int
getConnectionError()

No description

getEditionByID(int $cID)

Retrieves a NewsflowItem object for a given collection ID.

getEditionByPath($cPath)

Retrieves a NewsflowItem object for a given collection path.

getSlotContents()

Retrieves an array of NewsflowSlotItems.

Details

__construct()

bool hasConnectionError()

Return Value

bool Returns true if there is a connection error, false if there is no error.

bool|int getConnectionError()

Return Value

bool|int Returns false if there are no errors, or an int corresponding to one of the E_* class constants

bool|NewsflowItem getEditionByID(int $cID)

Retrieves a NewsflowItem object for a given collection ID.

Parameters

int $cID

Return Value

bool|NewsflowItem Returns a NewsflowItem object, false if there was an error or one could not be located.

bool|NewsflowItem getEditionByPath($cPath)

Retrieves a NewsflowItem object for a given collection path.

Parameters

$cPath

Return Value

bool|NewsflowItem

NewsflowSlotItem[]|null getSlotContents()

Retrieves an array of NewsflowSlotItems.

Return Value

NewsflowSlotItem[]|null