AnnouncementView
in package
Uses
UtilsProvider
Show announcement notices.
Table of Contents
Properties
- $pool : AnnouncementPool
- Announcement pool.
Methods
- admin_notices() : mixed
- Output parsed announcement.
- getPluginConstantPrefix() : string
- Get the prefix of this package so we can utils package natively.
- getPool() : mixed
- Get pool instance.
- instance() : mixed
- New instance.
- setupConstants() : mixed
- Make sure the RPM_WP_CLIENT constants are available.
- dismissOnClickHandler() : mixed
- Dismiss-functionality is handled through a inline-onclick handler because we do not need to enqueue an extra script on each page.
- img() : mixed
- Return `<img ` for a given announcement. Can be empty if no graphic is set.
- srcset() : mixed
- Return `src` and `srcset` attributes as string for a given announcement.
- __construct() : mixed
- C'tor.
Properties
$pool
Announcement pool.
private
AnnouncementPool
$pool
Methods
admin_notices()
Output parsed announcement.
public
admin_notices() : mixed
getPluginConstantPrefix()
Get the prefix of this package so we can utils package natively.
public
getPluginConstantPrefix() : string
Return values
stringgetPool()
Get pool instance.
public
getPool() : mixed
Tags
instance()
New instance.
public
static instance(AnnouncementPool $pool) : mixed
Parameters
- $pool : AnnouncementPool
Tags
setupConstants()
Make sure the RPM_WP_CLIENT constants are available.
public
static setupConstants() : mixed
dismissOnClickHandler()
Dismiss-functionality is handled through a inline-onclick handler because we do not need to enqueue an extra script on each page.
protected
dismissOnClickHandler(Announcement $announcement) : mixed
Parameters
- $announcement : Announcement
img()
Return `<img ` for a given announcement. Can be empty if no graphic is set.
protected
img(Announcement $a) : mixed
Parameters
- $a : Announcement
srcset()
Return `src` and `srcset` attributes as string for a given announcement.
protected
srcset(Announcement $a) : mixed
Parameters
- $a : Announcement
__construct()
C'tor.
private
__construct(AnnouncementPool $pool) : mixed
Parameters
- $pool : AnnouncementPool