diff --git a/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php b/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php index d17684962..1552ed300 100644 --- a/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php @@ -1,30 +1,20 @@ getAdapter()->loadAffectedPaths(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - switch ($condition) { - case HeraldAdapter::CONDITION_EXISTS: - case HeraldAdapter::CONDITION_NOT_EXISTS: - return HeraldAdapter::VALUE_NONE; - default: - return HeraldAdapter::VALUE_TEXT; - } - } - } diff --git a/src/applications/differential/herald/DifferentialDiffAuthorHeraldField.php b/src/applications/differential/herald/DifferentialDiffAuthorHeraldField.php index 859ec1349..b1f081fc4 100644 --- a/src/applications/differential/herald/DifferentialDiffAuthorHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffAuthorHeraldField.php @@ -1,24 +1,24 @@ getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_USER; } } diff --git a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php index 304fff946..5f170ece3 100644 --- a/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffAuthorProjectsHeraldField.php @@ -1,32 +1,32 @@ getAuthorPHID(), PhabricatorProjectMemberOfProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php b/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php index 325c4e471..ddac2cab6 100644 --- a/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadAddedContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialDiffContentHeraldField.php b/src/applications/differential/herald/DifferentialDiffContentHeraldField.php index c753ef14f..3ded4b5a6 100644 --- a/src/applications/differential/herald/DifferentialDiffContentHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffContentHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php b/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php index 12c294f6b..03bd61ec0 100644 --- a/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadRemovedContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialDiffRepositoryHeraldField.php b/src/applications/differential/herald/DifferentialDiffRepositoryHeraldField.php index 4494d6fec..38fc552d6 100644 --- a/src/applications/differential/herald/DifferentialDiffRepositoryHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffRepositoryHeraldField.php @@ -1,36 +1,36 @@ getAdapter()->loadRepository(); if (!$repository) { return null; } return $repository->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_REPOSITORY; } } } diff --git a/src/applications/differential/herald/DifferentialDiffRepositoryProjectsHeraldField.php b/src/applications/differential/herald/DifferentialDiffRepositoryProjectsHeraldField.php index 6453a170b..2fac95641 100644 --- a/src/applications/differential/herald/DifferentialDiffRepositoryProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialDiffRepositoryProjectsHeraldField.php @@ -1,37 +1,37 @@ getAdapter()->loadRepository(); if (!$repository) { return array(); } return PhabricatorEdgeQuery::loadDestinationPHIDs( $repository->getPHID(), PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php b/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php index c39d852fc..6cfc29b8f 100644 --- a/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php @@ -1,30 +1,20 @@ getAdapter()->loadAffectedPaths(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - switch ($condition) { - case HeraldAdapter::CONDITION_EXISTS: - case HeraldAdapter::CONDITION_NOT_EXISTS: - return HeraldAdapter::VALUE_NONE; - default: - return HeraldAdapter::VALUE_TEXT; - } - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionAuthorHeraldField.php b/src/applications/differential/herald/DifferentialRevisionAuthorHeraldField.php index eb23c2a4a..b2f119cc6 100644 --- a/src/applications/differential/herald/DifferentialRevisionAuthorHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionAuthorHeraldField.php @@ -1,24 +1,24 @@ getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_USER; } } diff --git a/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php b/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php index e50a8b3f8..d02a7c296 100644 --- a/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionAuthorProjectsHeraldField.php @@ -1,32 +1,32 @@ getAuthorPHID(), PhabricatorProjectMemberOfProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php b/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php index fcab6b66c..03cd012de 100644 --- a/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadAddedContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php b/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php index 42f84665a..6c2e7460a 100644 --- a/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php b/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php index 73017c392..dd9fc8ea3 100644 --- a/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadRemovedContentDictionary(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php b/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php index b056cf738..e788d9e61 100644 --- a/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php @@ -1,31 +1,31 @@ getAdapter()->loadAffectedPackages(); return mpull($packages, 'getPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_OWNERS_PACKAGE; } } } diff --git a/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php b/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php index 89e2383e4..ef8b7b289 100644 --- a/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php @@ -1,36 +1,36 @@ getAdapter()->loadAffectedPackages(); if (!$packages) { return array(); } $owners = PhabricatorOwnersOwner::loadAllForPackages($packages); return mpull($owners, 'getUserPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER_OR_PROJECT; } } } diff --git a/src/applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php b/src/applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php index 00d0575ed..561d0ff15 100644 --- a/src/applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionRepositoryHeraldField.php @@ -1,36 +1,36 @@ getAdapter()->loadRepository(); if (!$repository) { return null; } return $repository->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_REPOSITORY; } } } diff --git a/src/applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php b/src/applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php index 948a7eb2e..bdf8ecd8c 100644 --- a/src/applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionRepositoryProjectsHeraldField.php @@ -1,37 +1,37 @@ getAdapter()->loadRepository(); if (!$repository) { return array(); } return PhabricatorEdgeQuery::loadDestinationPHIDs( $repository->getPHID(), PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/differential/herald/DifferentialRevisionReviewersHeraldField.php b/src/applications/differential/herald/DifferentialRevisionReviewersHeraldField.php index 57ae95de0..e8ca0f410 100644 --- a/src/applications/differential/herald/DifferentialRevisionReviewersHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionReviewersHeraldField.php @@ -1,30 +1,30 @@ getAdapter()->loadReviewers(); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER_OR_PROJECT; } } } diff --git a/src/applications/differential/herald/DifferentialRevisionSummaryHeraldField.php b/src/applications/differential/herald/DifferentialRevisionSummaryHeraldField.php index e0d0cd7cc..eafc9bc99 100644 --- a/src/applications/differential/herald/DifferentialRevisionSummaryHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionSummaryHeraldField.php @@ -1,27 +1,23 @@ getSummary()."\n\n".$object->getTestPlan(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/differential/herald/DifferentialRevisionTitleHeraldField.php b/src/applications/differential/herald/DifferentialRevisionTitleHeraldField.php index 5e7eecd51..f39742d2d 100644 --- a/src/applications/differential/herald/DifferentialRevisionTitleHeraldField.php +++ b/src/applications/differential/herald/DifferentialRevisionTitleHeraldField.php @@ -1,24 +1,20 @@ getTitle(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php index 272051689..bc5855c3e 100644 --- a/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadAffectedPaths(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php index f5a52bbe1..1547253d4 100644 --- a/src/applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php @@ -1,30 +1,30 @@ getCommitData()->getCommitDetail('authorPHID'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER; } } } diff --git a/src/applications/diffusion/herald/DiffusionCommitBranchesHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitBranchesHeraldField.php index 4401974f7..dec0a05f0 100644 --- a/src/applications/diffusion/herald/DiffusionCommitBranchesHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitBranchesHeraldField.php @@ -1,38 +1,34 @@ getRepository(); $params = array( 'callsign' => $repository->getCallsign(), 'contains' => $commit->getCommitIdentifier(), ); $result = id(new ConduitCall('diffusion.branchquery', $params)) ->setUser(PhabricatorUser::getOmnipotentUser()) ->execute(); $refs = DiffusionRepositoryRef::loadAllFromDictionaries($result); return mpull($refs, 'getShortName'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitCommitterHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitCommitterHeraldField.php index 715b1c613..06fbc6c9c 100644 --- a/src/applications/diffusion/herald/DiffusionCommitCommitterHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitCommitterHeraldField.php @@ -1,30 +1,30 @@ getCommitData()->getCommitDetail('committerPHID'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER; } } } diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php index 9efeacd87..cd7bf4cc3 100644 --- a/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadDiffContent('+'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php index 7b1265fb1..d78e95f31 100644 --- a/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadDiffContent('*'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php index 371f8edf9..4bb36ed4e 100644 --- a/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->loadDiffContent('-'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php index 587ad70c7..2e3b91b0d 100644 --- a/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->isDiffEnormous(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitMessageHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitMessageHeraldField.php index b1ab512bc..f2b9ed241 100644 --- a/src/applications/diffusion/herald/DiffusionCommitMessageHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitMessageHeraldField.php @@ -1,24 +1,20 @@ getCommitData()->getCommitMessage(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php index 2277dadaf..ce1d19a69 100644 --- a/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php @@ -1,35 +1,35 @@ getAdapter()->loadAuditNeededPackages(); if (!$packages) { return array(); } return mpull($packages, 'getPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_OWNERS_PACKAGE; } } } diff --git a/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php index 9a0ebc52e..01f117ef3 100644 --- a/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php @@ -1,31 +1,31 @@ getAdapter()->loadAffectedPackages(); return mpull($packages, 'getPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_OWNERS_PACKAGE; } } } diff --git a/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php index 917afe58f..bd98aec03 100644 --- a/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php @@ -1,37 +1,37 @@ getAdapter()->loadAffectedPackages(); if (!$packages) { return array(); } $owners = PhabricatorOwnersOwner::loadAllForPackages($packages); return mpull($owners, 'getUserPHID'); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER_OR_PROJECT; } } } diff --git a/src/applications/diffusion/herald/DiffusionCommitRepositoryHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRepositoryHeraldField.php index a26fccb1d..88da8c740 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRepositoryHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRepositoryHeraldField.php @@ -1,24 +1,24 @@ getRepository()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_REPOSITORY; } } diff --git a/src/applications/diffusion/herald/DiffusionCommitRepositoryProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRepositoryProjectsHeraldField.php index 19a84dfe8..7f71d063e 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRepositoryProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRepositoryProjectsHeraldField.php @@ -1,32 +1,32 @@ getRepository()->getPHID(), PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/diffusion/herald/DiffusionCommitReviewerHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitReviewerHeraldField.php index 8eafdc2fc..2f67070f5 100644 --- a/src/applications/diffusion/herald/DiffusionCommitReviewerHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitReviewerHeraldField.php @@ -1,30 +1,30 @@ getCommitData()->getCommitDetail('reviewerPHID'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER; } } } diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php index e51876733..cb5b44998 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php @@ -1,40 +1,36 @@ getAdapter()->loadDifferentialRevision(); if (!$revision) { return null; } $data = $object->getCommitData(); $status = $data->getCommitDetail( 'precommitRevisionStatus', $revision->getStatus()); switch ($status) { case ArcanistDifferentialRevisionStatus::ACCEPTED: case ArcanistDifferentialRevisionStatus::CLOSED: return $revision->getPHID(); } return null; } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php index 75f1a5dfb..5e51e8663 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php @@ -1,30 +1,26 @@ getAdapter()->loadDifferentialRevision(); if (!$revision) { return null; } return $revision->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php index 6385a095e..f9febc72c 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php @@ -1,36 +1,36 @@ getAdapter()->loadDifferentialRevision(); if (!$revision) { return array(); } return $revision->getReviewers(); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER_OR_PROJECT; } } } diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php index 9ea9f27aa..1d235c9a3 100644 --- a/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php @@ -1,37 +1,37 @@ getAdapter()->loadDifferentialRevision(); if (!$revision) { return array(); } $phid = $revision->getPHID(); return PhabricatorSubscribersQuery::loadSubscribersForPHID($phid); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER_OR_PROJECT; } } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php index 97a89b842..bef87ce4b 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->getDiffContent('name'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php index 50a55a043..ae9c725e9 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php @@ -1,30 +1,30 @@ getAdapter()->getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER; } } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorRawHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorRawHeraldField.php index 502eb1f0c..80429810e 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorRawHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentAuthorRawHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->getAuthorRaw(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentBranchesHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentBranchesHeraldField.php index e64c2afaf..09e46083c 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentBranchesHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentBranchesHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->getBranches(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_LIST; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterHeraldField.php index 0f7c6543d..8682c9895 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterHeraldField.php @@ -1,30 +1,30 @@ getAdapter()->getCommitterPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER; } } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterRawHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterRawHeraldField.php index fe9743317..a51804ceb 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterRawHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentCommitterRawHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->getCommitterRaw(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php index 1fa54c2fa..46b4a2c3c 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->getDiffContent('+'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php index 6e7419a5f..db33589ac 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->getDiffContent('*'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php index 72e044e23..1ae34c29c 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->getDiffContent('-'); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT_MAP; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php index d496dea3a..d56018d73 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->isDiffEnormous(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentMergeHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentMergeHeraldField.php index cc6017371..fbafae4f4 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentMergeHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentMergeHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->getIsMergeCommit(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentMessageHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentMessageHeraldField.php index e1ad9e59d..27aff5b5c 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentMessageHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentMessageHeraldField.php @@ -1,24 +1,20 @@ getAdapter()->getCommitRef()->getMessage(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherHeraldField.php index 657c2a34c..ec61cd3ef 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherHeraldField.php @@ -1,24 +1,24 @@ getAdapter()->getHookEngine()->getViewer()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_USER; } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherIsCommitterHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherIsCommitterHeraldField.php index 4904b6f39..4c88955da 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherIsCommitterHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherIsCommitterHeraldField.php @@ -1,27 +1,23 @@ getAdapter()->getHookEngine()->getViewer()->getPHID(); $committer = $this->getAdapter()->getCommitterPHID(); return ($pusher === $committer); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherProjectsHeraldField.php index 61d3e0600..78f550031 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentPusherProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentPusherProjectsHeraldField.php @@ -1,31 +1,31 @@ getAdapter() ->getHookEngine() ->loadViewerProjectPHIDsForHerald(); } - protected function getHeraldFieldStandardConditions() { - return HeraldField::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return HeraldField::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryHeraldField.php index c789b3e76..66352b474 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryHeraldField.php @@ -1,24 +1,24 @@ getAdapter()->getHookEngine()->getRepository()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_REPOSITORY; } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryProjectsHeraldField.php index 6053b92d9..4e9d9977a 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRepositoryProjectsHeraldField.php @@ -1,32 +1,32 @@ getAdapter()->getHookEngine()->getRepository()->getPHID(), PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return HeraldField::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return HeraldField::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php index e060f7d1c..90b0b48b1 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php @@ -1,35 +1,31 @@ getAdapter()->getRevision(); if (!$revision) { return null; } $status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED; if ($revision->getStatus() != $status_accepted) { return null; } return $revision->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php index 665d72f9d..703c5aa95 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php @@ -1,30 +1,26 @@ getAdapter()->getRevision(); if (!$revision) { return null; } return $revision->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php index c24751c3e..7fc9a0e91 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php @@ -1,36 +1,36 @@ getAdapter()->getRevision(); if (!$revision) { return array(); } return $revision->getReviewers(); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER_OR_PROJECT; } } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php index 0aaa043b5..711b88e37 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php @@ -1,37 +1,37 @@ getAdapter()->getRevision(); if (!$revision) { return array(); } $phid = $revision->getPHID(); return PhabricatorSubscribersQuery::loadSubscribersForPHID($phid); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER_OR_PROJECT; } } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php index 28711a1b3..c21a73adb 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php @@ -1,24 +1,20 @@ getRefName(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php index b34cb6f23..dae97328a 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php @@ -1,24 +1,24 @@ getAdapter()->getHookEngine()->getViewer()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_USER; } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php index c77d63a7d..b71e672c7 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php @@ -1,31 +1,31 @@ getAdapter() ->getHookEngine() ->loadViewerProjectPHIDsForHerald(); } - protected function getHeraldFieldStandardConditions() { - return HeraldField::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return HeraldField::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryHeraldField.php index 9b850c684..e3c27890f 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryHeraldField.php @@ -1,24 +1,24 @@ getAdapter()->getHookEngine()->getRepository()->getPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return HeraldField::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_REPOSITORY; } } diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryProjectsHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryProjectsHeraldField.php index f91d1abd1..e5a90180b 100644 --- a/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryProjectsHeraldField.php +++ b/src/applications/diffusion/herald/DiffusionPreCommitRefRepositoryProjectsHeraldField.php @@ -1,32 +1,32 @@ getAdapter()->getHookEngine()->getRepository()->getPHID(), PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return HeraldField::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return HeraldField::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/herald/field/HeraldField.php b/src/applications/herald/field/HeraldField.php index 64d4c645b..82c783972 100644 --- a/src/applications/herald/field/HeraldField.php +++ b/src/applications/herald/field/HeraldField.php @@ -1,180 +1,202 @@ getHeraldFieldStandardConditions()) { - case self::STANDARD_LIST: - return array( - HeraldAdapter::CONDITION_INCLUDE_ALL, - HeraldAdapter::CONDITION_INCLUDE_ANY, - HeraldAdapter::CONDITION_INCLUDE_NONE, - HeraldAdapter::CONDITION_EXISTS, - HeraldAdapter::CONDITION_NOT_EXISTS, - ); + $standard_type = $this->getHeraldFieldStandardType(); + switch ($standard_type) { case self::STANDARD_BOOL: return array( HeraldAdapter::CONDITION_IS_TRUE, HeraldAdapter::CONDITION_IS_FALSE, ); case self::STANDARD_TEXT: return array( HeraldAdapter::CONDITION_CONTAINS, HeraldAdapter::CONDITION_NOT_CONTAINS, HeraldAdapter::CONDITION_IS, HeraldAdapter::CONDITION_IS_NOT, HeraldAdapter::CONDITION_REGEXP, ); case self::STANDARD_PHID: return array( HeraldAdapter::CONDITION_IS_ANY, HeraldAdapter::CONDITION_IS_NOT_ANY, ); + case self::STANDARD_PHID_LIST: + return array( + HeraldAdapter::CONDITION_INCLUDE_ALL, + HeraldAdapter::CONDITION_INCLUDE_ANY, + HeraldAdapter::CONDITION_INCLUDE_NONE, + HeraldAdapter::CONDITION_EXISTS, + HeraldAdapter::CONDITION_NOT_EXISTS, + ); case self::STANDARD_PHID_BOOL: return array( HeraldAdapter::CONDITION_EXISTS, HeraldAdapter::CONDITION_NOT_EXISTS, ); case self::STANDARD_PHID_NULLABLE: return array( HeraldAdapter::CONDITION_IS_ANY, HeraldAdapter::CONDITION_IS_NOT_ANY, HeraldAdapter::CONDITION_EXISTS, HeraldAdapter::CONDITION_NOT_EXISTS, ); case self::STANDARD_TEXT_LIST: return array( HeraldAdapter::CONDITION_CONTAINS, HeraldAdapter::CONDITION_REGEXP, ); case self::STANDARD_TEXT_MAP: return array( HeraldAdapter::CONDITION_CONTAINS, HeraldAdapter::CONDITION_REGEXP, HeraldAdapter::CONDITION_REGEXP_PAIR, ); } - throw new Exception(pht('Unknown standard condition set.')); + throw new Exception( + pht( + 'Herald field "%s" has unknown standard type "%s".', + get_class($this), + $standard_type)); } - protected function getHeraldFieldStandardConditions() { - throw new PhutilMethodNotImplementedException(); - } + public function getHeraldFieldValueType($condition) { + $standard_type = $this->getHeraldFieldStandardType(); + switch ($standard_type) { + case self::STANDARD_BOOL: + case self::STANDARD_PHID_BOOL: + return HeraldAdapter::VALUE_NONE; + case self::STANDARD_TEXT: + case self::STANDARD_TEXT_LIST: + case self::STANDARD_TEXT_MAP: + return HeraldAdapter::VALUE_TEXT; + } - abstract public function getHeraldFieldValueType($condition); + throw new Exception( + pht( + 'Herald field "%s" has unknown standard type "%s".', + get_class($this), + $standard_type)); + } abstract public function supportsObject($object); public function getFieldsForObject($object) { return array($this->getFieldConstant() => $this); } public function renderConditionValue( PhabricatorUser $viewer, $value) { // TODO: While this is less of a mess than it used to be, it would still // be nice to push this down into individual fields better eventually and // stop guessing which values are PHIDs and which aren't. if (!is_array($value)) { return $value; } $type_unknown = PhabricatorPHIDConstants::PHID_TYPE_UNKNOWN; foreach ($value as $key => $val) { if (is_string($val)) { if (phid_get_type($val) !== $type_unknown) { $value[$key] = $viewer->renderHandle($val); } } } return phutil_implode_html(', ', $value); } public function getEditorValue( PhabricatorUser $viewer, $value) { // TODO: This should be better structured and pushed down into individual // fields. As it is used to manually build tokenizer tokens, it can // probably be removed entirely. if (is_array($value)) { $handles = $viewer->loadHandles($value); $value_map = array(); foreach ($value as $k => $phid) { $value_map[$phid] = $handles[$phid]->getName(); } $value = $value_map; } return $value; } final public function setAdapter(HeraldAdapter $adapter) { $this->adapter = $adapter; return $this; } final public function getAdapter() { return $this->adapter; } final public function getFieldConstant() { $class = new ReflectionClass($this); $const = $class->getConstant('FIELDCONST'); if ($const === false) { throw new Exception( pht( '"%s" class "%s" must define a "%s" property.', __CLASS__, get_class($this), 'FIELDCONST')); } $limit = self::getFieldConstantByteLimit(); if (!is_string($const) || (strlen($const) > $limit)) { throw new Exception( pht( '"%s" class "%s" has an invalid "%s" property. Field constants '. 'must be strings and no more than %s bytes in length.', __CLASS__, get_class($this), 'FIELDCONST', new PhutilNumber($limit))); } return $const; } final public static function getFieldConstantByteLimit() { return 64; } final public static function getAllFields() { return id(new PhutilClassMapQuery()) ->setAncestorClass(__CLASS__) ->setUniqueMethod('getFieldConstant') ->execute(); } } diff --git a/src/applications/herald/field/HeraldNewObjectField.php b/src/applications/herald/field/HeraldNewObjectField.php index 8c682cdaa..48cc3cc46 100644 --- a/src/applications/herald/field/HeraldNewObjectField.php +++ b/src/applications/herald/field/HeraldNewObjectField.php @@ -1,27 +1,23 @@ getAdapter()->isSingleEventAdapter(); } public function getHeraldFieldValue($object) { return $this->getAdapter()->getIsNewObject(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_BOOL; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_NONE; - } - } diff --git a/src/applications/maniphest/herald/ManiphestTaskAssigneeHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskAssigneeHeraldField.php index fe519a571..f42feda95 100644 --- a/src/applications/maniphest/herald/ManiphestTaskAssigneeHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskAssigneeHeraldField.php @@ -1,30 +1,30 @@ getOwnerPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID_NULLABLE; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER; } } } diff --git a/src/applications/maniphest/herald/ManiphestTaskAuthorHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskAuthorHeraldField.php index 641b247bf..e44aba8e4 100644 --- a/src/applications/maniphest/herald/ManiphestTaskAuthorHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskAuthorHeraldField.php @@ -1,24 +1,24 @@ getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_USER; } } diff --git a/src/applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php index c1fdc0c2d..5502bb0bf 100644 --- a/src/applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php @@ -1,24 +1,20 @@ getDescription(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldField.php index 3e0cc8932..22c9a53a6 100644 --- a/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldField.php @@ -1,55 +1,55 @@ getPriority(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_TASK_PRIORITY; } public function renderConditionValue( PhabricatorUser $viewer, $value) { $priority_map = ManiphestTaskPriority::getTaskPriorityMap(); $value = (array)$value; foreach ($value as $index => $val) { $name = idx($priority_map, $val); if ($name !== null) { $value[$index] = $name; } } return implode(', ', $value); } public function getEditorValue( PhabricatorUser $viewer, $value) { $priority_map = ManiphestTaskPriority::getTaskPriorityMap(); $value_map = array(); foreach ($value as $priority) { $value_map[$priority] = idx($priority_map, $priority, $priority); } return $value_map; } } diff --git a/src/applications/maniphest/herald/ManiphestTaskStatusHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskStatusHeraldField.php index 063d1308d..49f6b210a 100644 --- a/src/applications/maniphest/herald/ManiphestTaskStatusHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskStatusHeraldField.php @@ -1,55 +1,55 @@ getStatus(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_TASK_STATUS; } public function renderConditionValue( PhabricatorUser $viewer, $value) { $status_map = ManiphestTaskStatus::getTaskStatusMap(); $value = (array)$value; foreach ($value as $index => $val) { $name = idx($status_map, $val); if ($name !== null) { $value[$index] = $name; } } return implode(', ', $value); } public function getEditorValue( PhabricatorUser $viewer, $value) { $status_map = ManiphestTaskStatus::getTaskStatusMap(); $value_map = array(); foreach ($value as $status) { $value_map[$status] = idx($status_map, $status, $status); } return $value_map; } } diff --git a/src/applications/maniphest/herald/ManiphestTaskTitleHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskTitleHeraldField.php index 33845d8b1..efc628126 100644 --- a/src/applications/maniphest/herald/ManiphestTaskTitleHeraldField.php +++ b/src/applications/maniphest/herald/ManiphestTaskTitleHeraldField.php @@ -1,24 +1,20 @@ getTitle(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php b/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php index 89ca253fe..9133442f5 100644 --- a/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php +++ b/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php @@ -1,41 +1,41 @@ getAdapter()->supportsApplicationEmail(); } public function getHeraldFieldValue($object) { $phids = array(); $email = $this->getAdapter()->getApplicationEmail(); if ($email) { $phids[] = $email->getPHID(); } return $phids; } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_APPLICATION_EMAIL; } } } diff --git a/src/applications/pholio/herald/PholioMockAuthorHeraldField.php b/src/applications/pholio/herald/PholioMockAuthorHeraldField.php index 46c5e8bf2..a7bf6fabf 100644 --- a/src/applications/pholio/herald/PholioMockAuthorHeraldField.php +++ b/src/applications/pholio/herald/PholioMockAuthorHeraldField.php @@ -1,24 +1,24 @@ getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_USER; } } diff --git a/src/applications/pholio/herald/PholioMockDescriptionHeraldField.php b/src/applications/pholio/herald/PholioMockDescriptionHeraldField.php index c201a8412..e72730757 100644 --- a/src/applications/pholio/herald/PholioMockDescriptionHeraldField.php +++ b/src/applications/pholio/herald/PholioMockDescriptionHeraldField.php @@ -1,24 +1,20 @@ getDescription(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/pholio/herald/PholioMockNameHeraldField.php b/src/applications/pholio/herald/PholioMockNameHeraldField.php index a39ac9852..206f09a72 100644 --- a/src/applications/pholio/herald/PholioMockNameHeraldField.php +++ b/src/applications/pholio/herald/PholioMockNameHeraldField.php @@ -1,24 +1,20 @@ getName(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/phriction/herald/PhrictionDocumentAuthorHeraldField.php b/src/applications/phriction/herald/PhrictionDocumentAuthorHeraldField.php index 584c0f67c..dd3aedb47 100644 --- a/src/applications/phriction/herald/PhrictionDocumentAuthorHeraldField.php +++ b/src/applications/phriction/herald/PhrictionDocumentAuthorHeraldField.php @@ -1,24 +1,24 @@ getContent()->getAuthorPHID(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_PHID; } public function getHeraldFieldValueType($condition) { return HeraldAdapter::VALUE_USER; } } diff --git a/src/applications/phriction/herald/PhrictionDocumentContentHeraldField.php b/src/applications/phriction/herald/PhrictionDocumentContentHeraldField.php index ff0cda4d9..c933447cb 100644 --- a/src/applications/phriction/herald/PhrictionDocumentContentHeraldField.php +++ b/src/applications/phriction/herald/PhrictionDocumentContentHeraldField.php @@ -1,24 +1,20 @@ getContent()->getContent(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/phriction/herald/PhrictionDocumentPathHeraldField.php b/src/applications/phriction/herald/PhrictionDocumentPathHeraldField.php index bcd7208d5..a7168907d 100644 --- a/src/applications/phriction/herald/PhrictionDocumentPathHeraldField.php +++ b/src/applications/phriction/herald/PhrictionDocumentPathHeraldField.php @@ -1,24 +1,20 @@ getcontent()->getSlug(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/phriction/herald/PhrictionDocumentTitleHeraldField.php b/src/applications/phriction/herald/PhrictionDocumentTitleHeraldField.php index 79f6ec649..99a5c6706 100644 --- a/src/applications/phriction/herald/PhrictionDocumentTitleHeraldField.php +++ b/src/applications/phriction/herald/PhrictionDocumentTitleHeraldField.php @@ -1,24 +1,20 @@ getContent()->getTitle(); } - protected function getHeraldFieldStandardConditions() { + protected function getHeraldFieldStandardType() { return self::STANDARD_TEXT; } - public function getHeraldFieldValueType($condition) { - return HeraldAdapter::VALUE_TEXT; - } - } diff --git a/src/applications/project/herald/HeraldProjectsField.php b/src/applications/project/herald/HeraldProjectsField.php index c73ca5091..d7e77f347 100644 --- a/src/applications/project/herald/HeraldProjectsField.php +++ b/src/applications/project/herald/HeraldProjectsField.php @@ -1,35 +1,35 @@ getPHID(), PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_PROJECT; } } } diff --git a/src/applications/spaces/herald/HeraldSpaceField.php b/src/applications/spaces/herald/HeraldSpaceField.php index a9afc016d..75314c15c 100644 --- a/src/applications/spaces/herald/HeraldSpaceField.php +++ b/src/applications/spaces/herald/HeraldSpaceField.php @@ -1,27 +1,27 @@ getPHID(); return PhabricatorSubscribersQuery::loadSubscribersForPHID($phid); } - protected function getHeraldFieldStandardConditions() { - return self::STANDARD_LIST; + protected function getHeraldFieldStandardType() { + return self::STANDARD_PHID_LIST; } public function getHeraldFieldValueType($condition) { switch ($condition) { case HeraldAdapter::CONDITION_EXISTS: case HeraldAdapter::CONDITION_NOT_EXISTS: return HeraldAdapter::VALUE_NONE; default: return HeraldAdapter::VALUE_USER_OR_PROJECT; } } }