CodeCraft\Announce\Announcements
Synopsis
class Announcements
extends ArrayList
{
- // members
- private static string $store = SessionStore::class;
- // methods
- public void __construct()
- public AnnouncementStoreInterface getStore()
- public static Announcements queue()
- public static Announcements get()
- public static Announcements clear()
- public Announcements merge()
- public Announcements push()
- public array getByType()
- public Announcement|null getByName()
- public Announcements removeByName()
- public void forTemplate()
Hierarchy
Extends
- SilverStripe\ORM\ArrayList
Members
private
- $store
—
string
FQCN of an AnnouncementStoreInterface
Methods
public
- __construct()
- clear() — Clear the announcement queue
- forTemplate() — Default template rendering of announcements
- get() — Get the announcement queue
- getByName() — Get an announcement by its name
- getByType() — Get announcementsby type
- getStore() — Get the announcement store
- merge() — Merges one Announcements list with another. If any item's names conflict, the items from the $with announcements will overwrite this object's list.
- push() — Add an announcement to the announce stack Will also accept arguments for @see Announcement::__construct()
- queue() — Queue an announcement in the announce stack
- removeByName() — Remove an announcement by its name