Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php b/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
index e73d476d74..3a301d8410 100644
--- a/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
+++ b/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
@@ -1,68 +1,68 @@
<?php
final class PhabricatorSubtypeEditEngineExtension
extends PhabricatorEditEngineExtension {
const EXTENSIONKEY = 'editengine.subtype';
const EDITKEY = 'subtype';
public function getExtensionPriority() {
return 8000;
}
public function isExtensionEnabled() {
return true;
}
public function getExtensionName() {
return pht('Subtypes');
}
public function supportsObject(
PhabricatorEditEngine $engine,
PhabricatorApplicationTransactionInterface $object) {
- return $engine->supportsSubtypes();
+ return ($object instanceof PhabricatorEditEngineSubtypeInterface);
}
public function buildCustomEditFields(
PhabricatorEditEngine $engine,
PhabricatorApplicationTransactionInterface $object) {
$subtype_type = PhabricatorTransactions::TYPE_SUBTYPE;
$subtype_value = $object->getEditEngineSubtype();
$map = $object->newEditEngineSubtypeMap();
if ($object->getID()) {
$options = $map->getMutationMap($subtype_value);
} else {
// NOTE: This is a crude proxy for "are we in the bulk edit workflow".
// We want to allow any mutation.
$options = $map->getDisplayMap();
}
$subtype_field = id(new PhabricatorSelectEditField())
->setKey(self::EDITKEY)
->setLabel(pht('Subtype'))
->setIsFormField(false)
->setTransactionType($subtype_type)
->setConduitDescription(pht('Change the object subtype.'))
->setConduitTypeDescription(pht('New object subtype key.'))
->setValue($subtype_value)
->setOptions($options);
// If subtypes are configured, enable changing them from the bulk editor.
// Bulk editor
if ($options) {
$subtype_field
->setBulkEditLabel(pht('Change subtype to'))
->setCommentActionLabel(pht('Change Subtype'))
->setCommentActionOrder(3000);
}
return array(
$subtype_field,
);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 24, 9:16 PM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1072
Default Alt Text
(2 KB)

Event Timeline