Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/phid/PhabricatorPeoplePHIDTypeUser.php
Show All 10 Lines | final class PhabricatorPeoplePHIDTypeUser extends PhabricatorPHIDType { | ||||
public function getTypeName() { | public function getTypeName() { | ||||
return pht('Phabricator User'); | return pht('Phabricator User'); | ||||
} | } | ||||
public function newObject() { | public function newObject() { | ||||
return new PhabricatorUser(); | return new PhabricatorUser(); | ||||
} | } | ||||
public function loadObjects( | protected function buildQueryForObjects( | ||||
PhabricatorObjectQuery $query, | PhabricatorObjectQuery $query, | ||||
array $phids) { | array $phids) { | ||||
return id(new PhabricatorPeopleQuery()) | return id(new PhabricatorPeopleQuery()) | ||||
->setViewer($query->getViewer()) | |||||
->setParentQuery($query) | |||||
->withPHIDs($phids) | ->withPHIDs($phids) | ||||
->needProfileImage(true) | ->needProfileImage(true) | ||||
->needStatus(true) | ->needStatus(true); | ||||
->execute(); | |||||
} | } | ||||
public function loadHandles( | public function loadHandles( | ||||
PhabricatorHandleQuery $query, | PhabricatorHandleQuery $query, | ||||
array $handles, | array $handles, | ||||
array $objects) { | array $objects) { | ||||
foreach ($handles as $phid => $handle) { | foreach ($handles as $phid => $handle) { | ||||
Show All 17 Lines |