Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/action/HeraldCommentAction.php
Show All 13 Lines | final class HeraldCommentAction extends HeraldAction { | ||||
} | } | ||||
public function supportsObject($object) { | public function supportsObject($object) { | ||||
if (!($object instanceof PhabricatorApplicationTransactionInterface)) { | if (!($object instanceof PhabricatorApplicationTransactionInterface)) { | ||||
return false; | return false; | ||||
} | } | ||||
$xaction = $object->getApplicationTransactionTemplate(); | $xaction = $object->getApplicationTransactionTemplate(); | ||||
try { | |||||
$comment = $xaction->getApplicationTransactionCommentObject(); | $comment = $xaction->getApplicationTransactionCommentObject(); | ||||
if (!$comment) { | if (!$comment) { | ||||
return false; | return false; | ||||
} | } | ||||
} catch (PhutilMethodNotImplementedException $ex) { | |||||
return false; | |||||
} | |||||
return true; | return true; | ||||
} | } | ||||
public function supportsRuleType($rule_type) { | public function supportsRuleType($rule_type) { | ||||
return ($rule_type != HeraldRuleTypeConfig::RULE_TYPE_PERSONAL); | return ($rule_type != HeraldRuleTypeConfig::RULE_TYPE_PERSONAL); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |