Adding event StartShowNoticeItemNotice with corresponding End
Runs just before outputting the "top" part of a NoticeListItem to HTML so plugins can jump in and do their thing.
This commit is contained in:
parent
7a4bfbce18
commit
9f8761f709
16
EVENTS.txt
16
EVENTS.txt
@ -257,6 +257,22 @@ StartShowNoticeItem: just before showing the notice item
|
|||||||
EndShowNoticeItem: just after showing the notice item
|
EndShowNoticeItem: just after showing the notice item
|
||||||
- $item: the NoticeListItem object being shown
|
- $item: the NoticeListItem object being shown
|
||||||
|
|
||||||
|
StartShowNoticeItemNotice: just before outputting the "top" notice part of a NoticeListItem to HTML
|
||||||
|
- $item: The NoticeListItem object being shown
|
||||||
|
|
||||||
|
EndShowNoticeItemNotice: just after outputting the "top" notice part of a NoticeListItem to HTML
|
||||||
|
- $item: The NoticeListItem object being shown
|
||||||
|
|
||||||
|
StartShowNoticeContent: just before outputting the content part of a Notice
|
||||||
|
- $stored: The Notice object
|
||||||
|
- $out: HTMLOutputter for writing to
|
||||||
|
- $scoped: optional Profile object for permission scoping
|
||||||
|
|
||||||
|
EndShowNoticeContent: just after outputting the content part of a Notice, plugins must call this manually
|
||||||
|
- $stored: The Notice object
|
||||||
|
- $out: HTMLOutputter for writing to
|
||||||
|
- $scoped: optional Profile object for permission scoping
|
||||||
|
|
||||||
StartShowNoticeInfo: just before showing notice info
|
StartShowNoticeInfo: just before showing notice info
|
||||||
- $item: The NoticeListItem object being shown
|
- $item: The NoticeListItem object being shown
|
||||||
|
|
||||||
|
@ -113,10 +113,13 @@ class NoticeListItem extends Widget
|
|||||||
|
|
||||||
function showNotice()
|
function showNotice()
|
||||||
{
|
{
|
||||||
$this->showNoticeTitle();
|
if (Event::handle('StartShowNoticeItemNotice', array($this))) {
|
||||||
$this->showAuthor();
|
$this->showNoticeTitle();
|
||||||
$this->showAddressees();
|
$this->showAuthor();
|
||||||
$this->showContent();
|
$this->showAddressees();
|
||||||
|
$this->showContent();
|
||||||
|
Event::handle('EndShowNoticeItemNotice', array($this-));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showNoticeTitle()
|
function showNoticeTitle()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user