Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92259261
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
Mon, Nov 18, 20:56
Size
1014 B
Mime Type
text/x-php
Expires
Wed, Nov 20, 20:56 (2 d)
Engine
blob
Format
Raw Data
Handle
22407009
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