Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/events/PhabricatorProjectUIEventListener.php
Show All 25 Lines | private function handlePropertyEvent($event) { | ||||
if (!($object instanceof PhabricatorProjectInterface)) { | if (!($object instanceof PhabricatorProjectInterface)) { | ||||
// This object doesn't have projects. | // This object doesn't have projects. | ||||
return; | return; | ||||
} | } | ||||
$project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( | $project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( | ||||
$object->getPHID(), | $object->getPHID(), | ||||
PhabricatorEdgeConfig::TYPE_OBJECT_HAS_PROJECT); | PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); | ||||
if ($project_phids) { | if ($project_phids) { | ||||
$project_phids = array_reverse($project_phids); | $project_phids = array_reverse($project_phids); | ||||
$handles = id(new PhabricatorHandleQuery()) | $handles = id(new PhabricatorHandleQuery()) | ||||
->setViewer($user) | ->setViewer($user) | ||||
->withPHIDs($project_phids) | ->withPHIDs($project_phids) | ||||
->execute(); | ->execute(); | ||||
} else { | } else { | ||||
$handles = array(); | $handles = array(); | ||||
Show All 14 Lines |