Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106133850
HeraldPonderQuestionAdapter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Mar 22, 23:06
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Mar 24, 23:06 (2 d)
Engine
blob
Format
Raw Data
Handle
25121019
Attached To
rPH Phabricator
HeraldPonderQuestionAdapter.php
View Options
<?php
final
class
HeraldPonderQuestionAdapter
extends
HeraldAdapter
{
private
$question
;
protected
function
newObject
()
{
return
new
PonderQuestion
();
}
public
function
getAdapterApplicationClass
()
{
return
'PhabricatorPonderApplication'
;
}
public
function
getAdapterContentDescription
()
{
return
pht
(
'React to questions being created or updated.'
);
}
protected
function
initializeNewAdapter
()
{
$this
->
question
=
$this
->
newObject
();
}
public
function
supportsApplicationEmail
()
{
return
true
;
}
public
function
getRepetitionOptions
()
{
return
array
(
HeraldRepetitionPolicyConfig
::
EVERY
,
HeraldRepetitionPolicyConfig
::
FIRST
,
);
}
public
function
supportsRuleType
(
$rule_type
)
{
switch
(
$rule_type
)
{
case
HeraldRuleTypeConfig
::
RULE_TYPE_GLOBAL
:
case
HeraldRuleTypeConfig
::
RULE_TYPE_PERSONAL
:
return
true
;
case
HeraldRuleTypeConfig
::
RULE_TYPE_OBJECT
:
default
:
return
false
;
}
}
public
function
setQuestion
(
PonderQuestion
$question
)
{
$this
->
question
=
$question
;
return
$this
;
}
public
function
getObject
()
{
return
$this
->
question
;
}
public
function
getAdapterContentName
()
{
return
pht
(
'Ponder Questions'
);
}
public
function
getHeraldName
()
{
return
'Q'
.
$this
->
getObject
()->
getID
();
}
}
Event Timeline
Log In to Comment