diff --git a/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php b/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php index d176849621..1552ed300c 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 859ec13499..b1f081fc4f 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 304fff9463..5f170ece31 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 325c4e4719..ddac2cab68 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 c753ef14fb..3ded4b5a64 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 12c294f6b5..03bd61ec02 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 4494d6fece..38fc552d66 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 6453a170b8..2fac95641d 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 c39d852fc0..6cfc29b8fd 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 eb23c2a4ac..b2f119cc6c 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 e50a8b3f85..d02a7c296b 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 fcab6b66c4..03cd012dea 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 42f84665a0..6c2e7460a6 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 73017c3925..dd9fc8ea3a 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 b056cf7387..e788d9e612 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 89e2383e47..ef8b7b2899 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 00d0575ed1..561d0ff15b 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 948a7eb2ea..bdf8ecd8c5 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 57ae95de03..e8ca0f4109 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 e0d0cd7ccf..eafc9bc990 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 5e7eecd515..f39742d2d7 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 2720516898..bc5855c3e4 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 f5a52bbe13..1547253d40 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 4401974f71..dec0a05f0d 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 715b1c6139..06fbc6c9c5 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 9efeacd87c..cd7bf4cc30 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 7b1265fb18..d78e95f319 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 371f8edf9f..4bb36ed4ef 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 587ad70c7e..2e3b91b0d6 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 b1ab512bcc..f2b9ed241f 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 2277dadafe..ce1d19a699 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 9a0ebc52e0..01f117ef3d 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 917afe58fe..bd98aec032 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 a26fccb1d5..88da8c7403 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 19a84dfe88..7f71d063ee 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 8eafdc2fc2..2f67070f52 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 e518767338..cb5b449989 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 75f1a5dfb8..5e51e86639 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 6385a095e0..f9febc72cd 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 9ea9f27aaa..1d235c9a3d 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 97a89b8422..bef87ce4ba 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 50a55a043c..ae9c725e9b 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 502eb1f0c4..80429810e7 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 e64c2afaf3..09e46083c8 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 0f7c6543d3..8682c9895f 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 fe9743317f..a51804ceb1 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 1fa54c2fa8..46b4a2c3c0 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 6e7419a5f6..db33589acb 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 72e044e23a..1ae34c29c4 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 d496dea3a1..d56018d73c 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 cc60173710..fbafae4f4a 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 e1ad9e59d4..27aff5b5c2 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 657c2a34c5..ec61cd3efb 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 4904b6f39f..4c88955da5 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 61d3e06009..78f5500312 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 c789b3e766..66352b4743 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 6053b92d9d..4e9d9977ad 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 e060f7d1c8..90b0b48b1c 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 665d72f9d0..703c5aa95a 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 c24751c3ea..7fc9a0e910 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 0aaa043b5a..711b88e372 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 28711a1b3e..c21a73adb7 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 b34cb6f236..dae97328a9 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 c77d63a7d8..b71e672c7f 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 9b850c6847..e3c27890fa 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 f91d1abd14..e5a90180b6 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 64d4c645ba..82c783972e 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 8c682cdaa2..48cc3cc465 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 fe519a571b..f42feda951 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 641b247bfb..e44aba8e4d 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 c1fdc0c2d1..5502bb0bf6 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 3e0cc8932f..22c9a53a62 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 063d1308df..49f6b210af 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 33845d8b1e..efc628126f 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 89ca253fef..9133442f54 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 46c5e8bf2b..a7bf6fabf5 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 c201a8412c..e727307577 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 a39ac98527..206f09a720 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 584c0f67cd..dd3aedb475 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 ff0cda4d94..c933447cb3 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 bcd7208d54..a7168907d7 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 79f6ec6498..99a5c6706c 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 c73ca50919..d7e77f3476 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 a9afc016d5..75314c15c0 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; } } }