Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F72532285
PholioImagePHIDType.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
Mon, Jul 15, 14:13
Size
910 B
Mime Type
text/x-php
Expires
Wed, Jul 17, 14:13 (2 d)
Engine
blob
Format
Raw Data
Handle
19061211
Attached To
rPH Phabricator
PholioImagePHIDType.php
View Options
<?php
final
class
PholioImagePHIDType
extends
PhabricatorPHIDType
{
const
TYPECONST
=
'PIMG'
;
public
function
getTypeName
()
{
return
pht
(
'Image'
);
}
public
function
newObject
()
{
return
new
PholioImage
();
}
public
function
getPHIDTypeApplicationClass
()
{
return
'PhabricatorPholioApplication'
;
}
protected
function
buildQueryForObjects
(
PhabricatorObjectQuery
$query
,
array
$phids
)
{
return
id
(
new
PholioImageQuery
())
->
withPHIDs
(
$phids
);
}
public
function
loadHandles
(
PhabricatorHandleQuery
$query
,
array
$handles
,
array
$objects
)
{
foreach
(
$handles
as
$phid
=>
$handle
)
{
$image
=
$objects
[
$phid
];
$id
=
$image
->
getID
();
$mock_id
=
$image
->
getMockID
();
$name
=
$image
->
getName
();
$handle
->
setURI
(
"/M{$mock_id}/{$id}/"
);
$handle
->
setName
(
$name
);
$handle
->
setFullName
(
$name
);
}
}
}
Event Timeline
Log In to Comment