Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95880933
NuanceItemTransaction.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
Fri, Dec 20, 06:01
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Dec 22, 06:01 (2 d)
Engine
blob
Format
Raw Data
Handle
23067947
Attached To
rPH Phabricator
NuanceItemTransaction.php
View Options
<?php
final
class
NuanceItemTransaction
extends
NuanceTransaction
{
const
PROPERTY_KEY
=
'property.key'
;
const
TYPE_OWNER
=
'nuance.item.owner'
;
const
TYPE_REQUESTOR
=
'nuance.item.requestor'
;
const
TYPE_SOURCE
=
'nuance.item.source'
;
const
TYPE_PROPERTY
=
'nuance.item.property'
;
const
TYPE_QUEUE
=
'nuance.item.queue'
;
public
function
getApplicationTransactionType
()
{
return
NuanceItemPHIDType
::
TYPECONST
;
}
public
function
getApplicationTransactionCommentObject
()
{
return
new
NuanceItemTransactionComment
();
}
public
function
shouldHide
()
{
$old
=
$this
->
getOldValue
();
$type
=
$this
->
getTransactionType
();
switch
(
$type
)
{
case
self
::
TYPE_REQUESTOR
:
case
self
::
TYPE_SOURCE
:
return
(
$old
===
null
);
}
return
parent
::
shouldHide
();
}
public
function
getRequiredHandlePHIDs
()
{
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
$type
=
$this
->
getTransactionType
();
$phids
=
parent
::
getRequiredHandlePHIDs
();
switch
(
$type
)
{
case
self
::
TYPE_QUEUE
:
if
(
$old
)
{
$phids
[]
=
$old
;
}
if
(
$new
)
{
$phids
[]
=
$new
;
}
break
;
}
return
$phids
;
}
public
function
getTitle
()
{
$old
=
$this
->
getOldValue
();
$new
=
$this
->
getNewValue
();
$type
=
$this
->
getTransactionType
();
$author_phid
=
$this
->
getAuthorPHID
();
switch
(
$type
)
{
case
self
::
TYPE_QUEUE
:
return
pht
(
'%s routed this item to the %s queue.'
,
$this
->
renderHandleLink
(
$author_phid
),
$this
->
renderHandleLink
(
$new
));
}
return
parent
::
getTitle
();
}
}
Event Timeline
Log In to Comment