Add Start/EndFavorNoticeForm and Start/EndDisFavorNoticeForm hooks
This commit is contained in:
parent
9109fe3c63
commit
0ac333ec80
16
EVENTS.txt
16
EVENTS.txt
@ -774,6 +774,22 @@ EndDisfavorNotice: After saving a notice as a favorite
|
|||||||
- $profile: profile of the person faving (can be remote!)
|
- $profile: profile of the person faving (can be remote!)
|
||||||
- $notice: notice being faved
|
- $notice: notice being faved
|
||||||
|
|
||||||
|
StartFavorNoticeForm: starting the data in the form for favoring a notice
|
||||||
|
- $FavorForm: the favor form being shown
|
||||||
|
- $notice: notice being favored
|
||||||
|
|
||||||
|
EndFavorNoticeForm: Ending the data in the form for favoring a notice
|
||||||
|
- $FavorForm: the favor form being shown
|
||||||
|
- $notice: notice being favored
|
||||||
|
|
||||||
|
StartDisFavorNoticeForm: starting the data in the form for disfavoring a notice
|
||||||
|
- $DisfavorForm: the disfavor form being shown
|
||||||
|
- $notice: notice being difavored
|
||||||
|
|
||||||
|
EndDisFavorNoticeForm: Ending the data in the form for disfavoring a notice
|
||||||
|
- $DisfavorForm: the disfavor form being shown
|
||||||
|
- $notice: notice being disfavored
|
||||||
|
|
||||||
StartFindMentions: start finding mentions in a block of text
|
StartFindMentions: start finding mentions in a block of text
|
||||||
- $sender: sender profile
|
- $sender: sender profile
|
||||||
- $text: plain text version of the notice
|
- $text: plain text version of the notice
|
||||||
|
@ -123,9 +123,13 @@ class DisfavorForm extends Form
|
|||||||
|
|
||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
$this->out->hidden('notice-n'.$this->notice->id,
|
if (Event::handle('StartDisFavorNoticeForm', array($this, $this->notice))) {
|
||||||
$this->notice->id,
|
$this->out->hidden('notice-n'.$this->notice->id,
|
||||||
'notice');
|
$this->notice->id,
|
||||||
|
'notice');
|
||||||
|
Event::handle('EndDisFavorNoticeForm', array($this, $this->notice));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -123,9 +123,12 @@ class FavorForm extends Form
|
|||||||
|
|
||||||
function formData()
|
function formData()
|
||||||
{
|
{
|
||||||
$this->out->hidden('notice-n'.$this->notice->id,
|
if (Event::handle('StartFavorNoticeForm', array($this, $this->notice))) {
|
||||||
$this->notice->id,
|
$this->out->hidden('notice-n'.$this->notice->id,
|
||||||
'notice');
|
$this->notice->id,
|
||||||
|
'notice');
|
||||||
|
Event::handle('EndFavorNoticeForm', array($this, $this->notice));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user