Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99152243
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, Jan 21, 18:33
Size
1014 B
Mime Type
text/x-php
Expires
Thu, Jan 23, 18:33 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23720408
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