1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Allow device bindings to be destroyed

Summary: Ref T9762. Currently it is not possible to destroy an Alamanac device because any associate bindings cannot be destroyed.

Test Plan: Destroyed an Almanac device.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T9762

Differential Revision: https://secure.phabricator.com/D14461
This commit is contained in:
Joshua Spence 2015-11-16 07:14:55 +11:00
parent 1f1c3f4075
commit 67b6c532bc
2 changed files with 13 additions and 1 deletions

View file

@ -3755,6 +3755,7 @@ phutil_register_library_map(array(
'PhabricatorCustomFieldInterface',
'PhabricatorApplicationTransactionInterface',
'AlmanacPropertyInterface',
'PhabricatorDestructibleInterface',
),
'AlmanacBindingEditController' => 'AlmanacServiceController',
'AlmanacBindingEditor' => 'PhabricatorApplicationTransactionEditor',

View file

@ -6,7 +6,8 @@ final class AlmanacBinding
PhabricatorPolicyInterface,
PhabricatorCustomFieldInterface,
PhabricatorApplicationTransactionInterface,
AlmanacPropertyInterface {
AlmanacPropertyInterface,
PhabricatorDestructibleInterface {
protected $servicePHID;
protected $devicePHID;
@ -204,4 +205,14 @@ final class AlmanacBinding
return $timeline;
}
/* -( PhabricatorDestructibleInterface )----------------------------------- */
public function destroyObjectPermanently(
PhabricatorDestructionEngine $engine) {
$this->delete();
}
}