CodeCraft\Announce\Model\Announcement
Synopsis
class Announcement
extends ViewableData
{
- // constants
- const DEFAULT = 'default';
- const MODAL = 'modal';
- const TRAY = 'tray';
- const MESSAGE = 'message';
- const CALLOUT = 'callout';
- // members
- protected boolean $dismissable = true;
- protected boolean $storable = true;
- protected $name;
- protected $title;
- protected $type;
- protected $heading;
- protected $content;
- protected $footer;
- protected ActionList $actions;
- protected string|array $template;
- private static array $casting = ;
- // methods
- public void __construct()
- public boolean canStore()
- public Announcement setStoreable()
- public boolean canDismiss()
- public Announcement setDismissable()
- public Announcement setName()
- public string getName()
- public Announcement setTitle()
- public string getTitle()
- public void setType()
- public string getType()
- public Announcement setHeading()
- public string getHeading()
- public Announcement setContent()
- public string getContent()
- public Announcement setFooter()
- public string getFooter()
- public Announcement addAction()
- public array getActions()
- public void setTemplate()
- public string|array getTemplate()
- public string forTemplate()
Hierarchy
Extends
- SilverStripe\View\ViewableData
Constants
Name | Value |
---|---|
DEFAULT | 'default' |
MODAL | 'modal' |
TRAY | 'tray' |
MESSAGE | 'message' |
CALLOUT | 'callout' |
Members
private
- $casting
protected
- $actions — CodeCraft\Announce\Model\ActionList
- $content — string
- $dismissable — boolean
- $heading — string
- $name — string
- $storable — boolean
- $template — CodeCraft\Announce\Model\string|array
- $title — string
- $type — string
Methods
public
- __construct()
- addAction()
- canDismiss()
- canStore()
- forTemplate()
- getActions()
- getContent()
- getHeading()
- getName()
- getTemplate() — Return the template to render this announcement with
- getTitle()
- getType()
- setContent() — Set the content of this announcement
- setDismissable() — Define if announcement can be dismissed
- setHeading() — Set the heading of this announcement
- setName() — Set the name of this announcement
- setStoreable()
- setTemplate() — Set the SS template that this announcement should use to render with. The default is the FQCN
- setTitle() — Set the title of this announcement
- setType()