Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93080914
PhabricatorStandardCustomFieldBlueprints.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
Tue, Nov 26, 01:47
Size
1014 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 01:47 (2 d)
Engine
blob
Format
Raw Data
Handle
22568921
Attached To
rPH Phabricator
PhabricatorStandardCustomFieldBlueprints.php
View Options
<?php
final
class
PhabricatorStandardCustomFieldBlueprints
extends
PhabricatorStandardCustomFieldTokenizer
{
public
function
getFieldType
()
{
return
'blueprints'
;
}
public
function
getDatasource
()
{
return
new
DrydockBlueprintDatasource
();
}
public
function
applyApplicationTransactionExternalEffects
(
PhabricatorApplicationTransaction
$xaction
)
{
$old
=
$this
->
decodeValue
(
$xaction
->
getOldValue
());
$new
=
$this
->
decodeValue
(
$xaction
->
getNewValue
());
DrydockAuthorization
::
applyAuthorizationChanges
(
$this
->
getViewer
(),
$xaction
->
getObjectPHID
(),
$old
,
$new
);
}
public
function
renderPropertyViewValue
(
array
$handles
)
{
$value
=
$this
->
getFieldValue
();
if
(!
$value
)
{
return
phutil_tag
(
'em'
,
array
(),
pht
(
'No authorized blueprints.'
));
}
return
id
(
new
DrydockObjectAuthorizationView
())
->
setUser
(
$this
->
getViewer
())
->
setObjectPHID
(
$this
->
getObject
()->
getPHID
())
->
setBlueprintPHIDs
(
$value
);
}
}
Event Timeline
Log In to Comment