Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F73668557
HarbormasterBuildPlanTransaction.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
Tue, Jul 23, 13:28
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Jul 25, 13:28 (2 d)
Engine
blob
Format
Raw Data
Handle
19244972
Attached To
rPH Phabricator
HarbormasterBuildPlanTransaction.php
View Options
<?php
final
class
HarbormasterBuildPlanTransaction
extends
PhabricatorApplicationTransaction
{
const
TYPE_NAME
=
'harbormaster:name'
;
const
TYPE_STATUS
=
'harbormaster:status'
;
public
function
getApplicationName
()
{
return
'harbormaster'
;
}
public
function
getApplicationTransactionType
()
{
return
HarbormasterPHIDTypeBuildPlan
::
TYPECONST
;
}
public
function
getApplicationTransactionCommentObject
()
{
return
new
HarbormasterBuildPlanTransactionComment
();
}
public
function
getIcon
()
{
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_NAME
:
if
(
$old
===
null
)
{
return
'create'
;
}
break
;
}
return
parent
::
getIcon
();
}
public
function
getColor
()
{
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_NAME
:
if
(
$old
===
null
)
{
return
'green'
;
}
break
;
}
return
parent
::
getIcon
();
}
public
function
getTitle
()
{
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
$author_handle
=
$this
->
renderHandleLink
(
$this
->
getAuthorPHID
());
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_NAME
:
if
(
$old
===
null
)
{
return
pht
(
'%s created this build plan.'
,
$author_handle
);
}
else
{
return
pht
(
'%s renamed this build plan from "%s" to "%s".'
,
$author_handle
,
$old
,
$new
);
}
case
self
::
TYPE_STATUS
:
if
(
$new
==
HarbormasterBuildPlan
::
STATUS_DISABLED
)
{
return
pht
(
'%s disabled this build plan.'
,
$author_handle
);
}
else
{
return
pht
(
'%s enabled this build plan.'
,
$author_handle
);
}
}
return
parent
::
getTitle
();
}
}
Event Timeline
Log In to Comment