Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F475370
PhabricatorProjectHeraldAdapter.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
PhabricatorProjectHeraldAdapter.php
View Options
<?php
final
class
PhabricatorProjectHeraldAdapter
extends
HeraldAdapter
{
private
$project
;
protected
function
newObject
()
{
return
new
PhabricatorProject
();
}
public
function
getAdapterApplicationClass
()
{
return
PhabricatorProjectApplication
::
class
;
}
public
function
getAdapterContentDescription
()
{
return
pht
(
'React to projects being created or updated.'
);
}
protected
function
initializeNewAdapter
()
{
$this
->
project
=
$this
->
newObject
();
}
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
setProject
(
PhabricatorProject
$project
)
{
$this
->
project
=
$project
;
return
$this
;
}
public
function
getProject
()
{
return
$this
->
project
;
}
public
function
getObject
()
{
return
$this
->
project
;
}
public
function
getAdapterContentName
()
{
return
pht
(
'Projects'
);
}
public
function
getHeraldName
()
{
return
pht
(
'Project %s'
,
$this
->
getProject
()->
getName
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 11:20 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
85181
Default Alt Text
PhabricatorProjectHeraldAdapter.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment