Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98061610
AlmanacInterfaceDestroyTransaction.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, 05:14
Size
748 B
Mime Type
text/x-php
Expires
Sat, Jan 11, 05:14 (1 d, 11 h)
Engine
blob
Format
Raw Data
Handle
23490947
Attached To
rPH Phabricator
AlmanacInterfaceDestroyTransaction.php
View Options
<?php
final
class
AlmanacInterfaceDestroyTransaction
extends
AlmanacInterfaceTransactionType
{
const
TRANSACTIONTYPE
=
'almanac:interface:destroy'
;
public
function
generateOldValue
(
$object
)
{
return
false
;
}
public
function
applyExternalEffects
(
$object
,
$value
)
{
id
(
new
PhabricatorDestructionEngine
())
->
destroyObject
(
$object
);
}
public
function
validateTransactions
(
$object
,
array
$xactions
)
{
$errors
=
array
();
if
(
$xactions
)
{
if
(
$object
->
loadIsInUse
())
{
$errors
[]
=
$this
->
newInvalidError
(
pht
(
'You can not delete this interface because it is currently in '
.
'use. One or more services are bound to it.'
));
}
}
return
$errors
;
}
}
Event Timeline
Log In to Comment