Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F574021
HeraldPonderQuestionAdapter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
HeraldPonderQuestionAdapter.php
View Options
<?php
final
class
HeraldPonderQuestionAdapter
extends
HeraldAdapter
{
private
$question
;
protected
function
newObject
()
{
return
new
PonderQuestion
();
}
public
function
getAdapterApplicationClass
()
{
return
PhabricatorPonderApplication
::
class
;
}
public
function
getAdapterContentDescription
()
{
return
pht
(
'React to questions being created or updated.'
);
}
protected
function
initializeNewAdapter
()
{
$this
->
question
=
$this
->
newObject
();
}
public
function
isTestAdapterForObject
(
$object
)
{
return
(
$object
instanceof
PonderQuestion
);
}
public
function
getAdapterTestDescription
()
{
return
pht
(
'Test rules which run when a question is created or updated.'
);
}
public
function
setObject
(
$object
)
{
$this
->
question
=
$object
;
return
$this
;
}
public
function
supportsApplicationEmail
()
{
return
true
;
}
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
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 6:16 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
125274
Default Alt Text
HeraldPonderQuestionAdapter.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment