mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 18:32:41 +01:00
101 lines
2.4 KiB
PHP
101 lines
2.4 KiB
PHP
|
<?php
|
||
|
|
||
|
final class DifferentialTransactionEditor
|
||
|
extends PhabricatorApplicationTransactionEditor {
|
||
|
|
||
|
public function getTransactionTypes() {
|
||
|
$types = parent::getTransactionTypes();
|
||
|
|
||
|
/*
|
||
|
$types[] = PhabricatorTransactions::TYPE_EDGE;
|
||
|
$types[] = PhabricatorTransactions::TYPE_VIEW_POLICY;
|
||
|
$types[] = PhabricatorTransactions::TYPE_EDIT_POLICY;
|
||
|
|
||
|
$types[] = DifferentialTransaction::TYPE_INLINE;
|
||
|
$types[] = DifferentialTransaction::TYPE_UPDATE;
|
||
|
$types[] = DifferentialTransaction::TYPE_ACTION;
|
||
|
*/
|
||
|
|
||
|
return $types;
|
||
|
}
|
||
|
|
||
|
protected function getCustomTransactionOldValue(
|
||
|
PhabricatorLiskDAO $object,
|
||
|
PhabricatorApplicationTransaction $xaction) {
|
||
|
|
||
|
switch ($xaction->getTransactionType()) {
|
||
|
}
|
||
|
|
||
|
return parent::getCustomTransactionOldValue($object, $xaction);
|
||
|
}
|
||
|
|
||
|
protected function getCustomTransactionNewValue(
|
||
|
PhabricatorLiskDAO $object,
|
||
|
PhabricatorApplicationTransaction $xaction) {
|
||
|
|
||
|
switch ($xaction->getTransactionType()) {
|
||
|
}
|
||
|
|
||
|
return parent::getCustomTransactionNewValue($object, $xaction);
|
||
|
}
|
||
|
|
||
|
protected function applyCustomInternalTransaction(
|
||
|
PhabricatorLiskDAO $object,
|
||
|
PhabricatorApplicationTransaction $xaction) {
|
||
|
|
||
|
switch ($xaction->getTransactionType()) {
|
||
|
}
|
||
|
|
||
|
return parent::applyCustomInternalTransaction($object, $xaction);
|
||
|
}
|
||
|
|
||
|
protected function applyCustomExternalTransaction(
|
||
|
PhabricatorLiskDAO $object,
|
||
|
PhabricatorApplicationTransaction $xaction) {
|
||
|
|
||
|
switch ($xaction->getTransactionType()) {
|
||
|
}
|
||
|
|
||
|
return parent::applyCustomExternalTransaction($object, $xaction);
|
||
|
}
|
||
|
|
||
|
protected function validateTransaction(
|
||
|
PhabricatorLiskDAO $object,
|
||
|
$type,
|
||
|
array $xactions) {
|
||
|
|
||
|
$errors = parent::validateTransaction($object, $type, $xactions);
|
||
|
|
||
|
switch ($type) {
|
||
|
}
|
||
|
|
||
|
return $errors;
|
||
|
}
|
||
|
|
||
|
|
||
|
protected function requireCapabilities(
|
||
|
PhabricatorLiskDAO $object,
|
||
|
PhabricatorApplicationTransaction $xaction) {
|
||
|
|
||
|
switch ($xaction->getTransactionType()) {
|
||
|
}
|
||
|
|
||
|
return parent::requireCapabilities($object, $xaction);
|
||
|
}
|
||
|
|
||
|
protected function supportsSearch() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
protected function extractFilePHIDsFromCustomTransaction(
|
||
|
PhabricatorLiskDAO $object,
|
||
|
PhabricatorApplicationTransaction $xaction) {
|
||
|
|
||
|
switch ($xaction->getTransactionType()) {
|
||
|
}
|
||
|
|
||
|
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
|
||
|
}
|
||
|
|
||
|
}
|