Commit 66f6b2a3 authored by Evan Prodromou's avatar Evan Prodromou

Events to hook for NoticeListElement <li> generation

parent 5d7f5212
...@@ -1045,3 +1045,15 @@ StartProfileSettingsActions: when we're showing account-management action list ...@@ -1045,3 +1045,15 @@ StartProfileSettingsActions: when we're showing account-management action list
EndProfileSettingsActions: when we're showing account-management action list EndProfileSettingsActions: when we're showing account-management action list
- $action: Action being shown (use for output) - $action: Action being shown (use for output)
StartOpenNoticeListItemElement: Before the opening <li> of a notice list element
- $nli: The notice list item being shown
EndOpenNoticeListItemElement: After the opening <li> of a notice list element
- $nli: The notice list item being shown
StartCloseNoticeListItemElement: Before the closing </li> of a notice list element
- $nli: The notice list item being shown
EndCloseNoticeListItemElement: After the closing </li> of a notice list element
- $nli: The notice list item being shown
...@@ -263,11 +263,12 @@ class NoticeListItem extends Widget ...@@ -263,11 +263,12 @@ class NoticeListItem extends Widget
function showStart() function showStart()
{ {
// XXX: RDFa if (Event::handle('StartOpenNoticeListItemElement', array($this))) {
// TODO: add notice_type class e.g., notice_video, notice_image $id = (empty($this->repeat)) ? $this->notice->id : $this->repeat->id;
$id = (empty($this->repeat)) ? $this->notice->id : $this->repeat->id; $this->out->elementStart('li', array('class' => 'hentry notice',
$this->out->elementStart('li', array('class' => 'hentry notice', 'id' => 'notice-' . $id));
'id' => 'notice-' . $id)); Event::handle('EndOpenNoticeListItemElement', array($this));
}
} }
/** /**
...@@ -706,6 +707,9 @@ class NoticeListItem extends Widget ...@@ -706,6 +707,9 @@ class NoticeListItem extends Widget
function showEnd() function showEnd()
{ {
$this->out->elementEnd('li'); if (Event::handle('StartCloseNoticeListItemElement', array($this))) {
$this->out->elementEnd('li');
Event::handle('EndCloseNoticeListItemElement', array($this));
}
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment