Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98075497
AlmanacServiceTransaction.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
Thu, Jan 9, 13:02
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jan 11, 13:02 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23499963
Attached To
rPH Phabricator
AlmanacServiceTransaction.php
View Options
<?php
final
class
AlmanacServiceTransaction
extends
AlmanacTransaction
{
const
TYPE_NAME
=
'almanac:service:name'
;
const
TYPE_LOCK
=
'almanac:service:lock'
;
public
function
getApplicationTransactionType
()
{
return
AlmanacServicePHIDType
::
TYPECONST
;
}
public
function
getTitle
()
{
$author_phid
=
$this
->
getAuthorPHID
();
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_NAME
:
if
(
$old
===
null
)
{
return
pht
(
'%s created this service.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
else
{
return
pht
(
'%s renamed this service from "%s" to "%s".'
,
$this
->
renderHandleLink
(
$author_phid
),
$old
,
$new
);
}
break
;
case
self
::
TYPE_LOCK
:
if
(
$new
)
{
return
pht
(
'%s locked this service.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
else
{
return
pht
(
'%s unlocked this service.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
break
;
}
return
parent
::
getTitle
();
}
}
Event Timeline
Log In to Comment