Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78665765
PhragmentSnapshotPHIDType.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 22, 07:03
Size
786 B
Mime Type
text/x-php
Expires
Sat, Aug 24, 07:03 (2 d)
Engine
blob
Format
Raw Data
Handle
20083163
Attached To
rPH Phabricator
PhragmentSnapshotPHIDType.php
View Options
<?php
final
class
PhragmentSnapshotPHIDType
extends
PhabricatorPHIDType
{
const
TYPECONST
=
'PHRS'
;
public
function
getTypeName
()
{
return
pht
(
'Snapshot'
);
}
public
function
newObject
()
{
return
new
PhragmentSnapshot
();
}
protected
function
buildQueryForObjects
(
PhabricatorObjectQuery
$query
,
array
$phids
)
{
return
id
(
new
PhragmentSnapshotQuery
())
->
withPHIDs
(
$phids
);
}
public
function
loadHandles
(
PhabricatorHandleQuery
$query
,
array
$handles
,
array
$objects
)
{
$viewer
=
$query
->
getViewer
();
foreach
(
$handles
as
$phid
=>
$handle
)
{
$snapshot
=
$objects
[
$phid
];
$handle
->
setName
(
pht
(
'Snapshot: %s'
,
$snapshot
->
getName
()));
$handle
->
setURI
(
$snapshot
->
getURI
());
}
}
}
Event Timeline
Log In to Comment