Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F568288
ManiphestTaskCloseAsDuplicateRelationship.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
ManiphestTaskCloseAsDuplicateRelationship.php
View Options
<?php
final
class
ManiphestTaskCloseAsDuplicateRelationship
extends
ManiphestTaskRelationship
{
const
RELATIONSHIPKEY
=
'task.close-as-duplicate'
;
public
function
getEdgeConstant
()
{
return
ManiphestTaskIsDuplicateOfTaskEdgeType
::
EDGECONST
;
}
protected
function
getActionName
()
{
return
pht
(
'Close As Duplicate'
);
}
protected
function
getActionIcon
()
{
return
'fa-times'
;
}
public
function
canRelateObjects
(
$src
,
$dst
)
{
return
(
$dst
instanceof
ManiphestTask
);
}
public
function
shouldAppearInActionMenu
()
{
return
false
;
}
public
function
getDialogTitleText
()
{
return
pht
(
'Close As Duplicate'
);
}
public
function
getDialogHeaderText
()
{
return
pht
(
'Close This Task As a Duplicate Of'
);
}
public
function
getDialogButtonText
()
{
return
pht
(
'Merge Into Selected Task'
);
}
protected
function
newRelationshipSource
()
{
return
id
(
new
ManiphestTaskRelationshipSource
())
->
setSelectedFilter
(
'open'
);
}
public
function
getRequiredRelationshipCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
);
}
public
function
canUndoRelationship
()
{
return
false
;
}
public
function
getMaximumSelectionSize
()
{
return
1
;
}
public
function
willUpdateRelationships
(
$object
,
array
$add
,
array
$rem
)
{
$task
=
head
(
$add
);
return
$this
->
newMergeIntoTransactions
(
$task
);
}
public
function
didUpdateRelationships
(
$object
,
array
$add
,
array
$rem
)
{
$viewer
=
$this
->
getViewer
();
$content_source
=
$this
->
getContentSource
();
$task
=
head
(
$add
);
$xactions
=
$this
->
newMergeFromTransactions
(
array
(
$object
));
$task
->
getApplicationTransactionEditor
()
->
setActor
(
$viewer
)
->
setContentSource
(
$content_source
)
->
setContinueOnMissingFields
(
true
)
->
setContinueOnNoEffect
(
true
)
->
applyTransactions
(
$task
,
$xactions
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 1:21 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
121007
Default Alt Text
ManiphestTaskCloseAsDuplicateRelationship.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment