Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F83528364
AlmanacBindingTransaction.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, Sep 17, 15:28
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Sep 19, 15:28 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20827676
Attached To
rPH Phabricator
AlmanacBindingTransaction.php
View Options
<?php
final
class
AlmanacBindingTransaction
extends
PhabricatorApplicationTransaction
{
const
TYPE_INTERFACE
=
'almanac:binding:interface'
;
public
function
getApplicationName
()
{
return
'almanac'
;
}
public
function
getApplicationTransactionType
()
{
return
AlmanacBindingPHIDType
::
TYPECONST
;
}
public
function
getApplicationTransactionCommentObject
()
{
return
null
;
}
public
function
getRequiredHandlePHIDs
()
{
$phids
=
parent
::
getRequiredHandlePHIDs
();
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_INTERFACE
:
if
(
$old
)
{
$phids
[]
=
$old
;
}
if
(
$new
)
{
$phids
[]
=
$new
;
}
break
;
}
return
$phids
;
}
public
function
getTitle
()
{
$author_phid
=
$this
->
getAuthorPHID
();
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
switch
(
$this
->
getTransactionType
())
{
case
self
::
TYPE_INTERFACE
:
if
(
$old
===
null
)
{
return
pht
(
'%s created this binding.'
,
$this
->
renderHandleLink
(
$author_phid
));
}
else
{
return
pht
(
'%s changed this binding from %s to %s.'
,
$this
->
renderHandleLink
(
$author_phid
),
$this
->
renderHandleLink
(
$old
),
$this
->
renderHandleLink
(
$new
));
}
break
;
}
return
parent
::
getTitle
();
}
}
Event Timeline
Log In to Comment