Changeset View
Changeset View
Standalone View
Standalone View
src/applications/release/phid/ReleaseChangeRequestPHIDType.php
- This file was added.
Property | Old Value | New Value |
---|---|---|
File Mode | null | 100755 |
<?php | |||||
final class ReleaseChangeRequestPHIDType extends PhabricatorPHIDType { | |||||
const TYPECONST = 'RECR'; | |||||
public function getTypeName() { | |||||
return pht('Release Change Request'); | |||||
} | |||||
public function newObject() { | |||||
return new ReleaseChangeRequest(); | |||||
} | |||||
public function getPHIDTypeApplicationClass() { | |||||
return 'PhabricatorReleaseApplication'; | |||||
} | |||||
protected function buildQueryForObjects( | |||||
PhabricatorObjectQuery $query, | |||||
array $phids) { | |||||
return id(new ReleaseChangeRequestQuery()) | |||||
->withPHIDs($phids); | |||||
} | |||||
public function loadHandles( | |||||
PhabricatorHandleQuery $query, | |||||
array $handles, | |||||
array $objects) { | |||||
foreach ($handles as $phid => $handle) { /// modernize this? support lookup by monogram. | |||||
$request = $objects[$phid]; | |||||
$id = $request->getID(); | |||||
$title = $request->getTitle(); | |||||
$handle->setURI("/Y{$id}"); | |||||
$handle->setName($title); | |||||
$handle->setFullName("Y{$id}: {$title}"); | |||||
} | |||||
} | |||||
} |