Differential D7367 Diff 16613 src/applications/legalpad/phid/PhabricatorLegalpadPHIDTypeDocument.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/legalpad/phid/PhabricatorLegalpadPHIDTypeDocument.php
Show All 13 Lines | final class PhabricatorLegalpadPHIDTypeDocument extends PhabricatorPHIDType { | ||||
public function getTypeName() { | public function getTypeName() { | ||||
return pht('Legalpad Document'); | return pht('Legalpad Document'); | ||||
} | } | ||||
public function newObject() { | public function newObject() { | ||||
return new LegalpadDocument(); | return new LegalpadDocument(); | ||||
} | } | ||||
public function loadObjects( | protected function buildQueryForObjects( | ||||
PhabricatorObjectQuery $query, | PhabricatorObjectQuery $query, | ||||
array $phids) { | array $phids) { | ||||
return id(new LegalpadDocumentQuery()) | return id(new LegalpadDocumentQuery()) | ||||
->setViewer($query->getViewer()) | |||||
->setParentQuery($query) | |||||
->withPHIDs($phids) | ->withPHIDs($phids) | ||||
->needDocumentBodies(true) | ->needDocumentBodies(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 38 Lines |