Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/phid/PhabricatorFilePHIDTypeFile.php
Show All 10 Lines | final class PhabricatorFilePHIDTypeFile extends PhabricatorPHIDType { | ||||
public function getTypeName() { | public function getTypeName() { | ||||
return pht('File'); | return pht('File'); | ||||
} | } | ||||
public function newObject() { | public function newObject() { | ||||
return new PhabricatorFile(); | return new PhabricatorFile(); | ||||
} | } | ||||
public function loadObjects( | protected function buildQueryForObjects( | ||||
PhabricatorObjectQuery $query, | PhabricatorObjectQuery $query, | ||||
array $phids) { | array $phids) { | ||||
return id(new PhabricatorFileQuery()) | return id(new PhabricatorFileQuery()) | ||||
->setViewer($query->getViewer()) | ->withPHIDs($phids); | ||||
->setParentQuery($query) | |||||
->withPHIDs($phids) | |||||
->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 20 Lines • Show All 42 Lines • Show Last 20 Lines |