Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1011581
DifferentialRepositoryFieldSpecification.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DifferentialRepositoryFieldSpecification.php
View Options
<?php
final
class
DifferentialRepositoryFieldSpecification
extends
DifferentialFieldSpecification
{
private
$value
;
public
function
shouldAppearOnEdit
()
{
return
true
;
}
protected
function
didSetRevision
()
{
$this
->
value
=
$this
->
getRevision
()->
getRepositoryPHID
();
}
public
function
setValueFromRequest
(
AphrontRequest
$request
)
{
$value
=
head
(
$request
->
getArr
(
'repositoryPHID'
));
$this
->
value
=
nonempty
(
$value
,
null
);
return
$this
;
}
public
function
getRequiredHandlePHIDsForRevisionEdit
()
{
return
array_filter
(
array
(
$this
->
value
));
}
public
function
renderEditControl
()
{
$value
=
array
();
if
(
$this
->
value
)
{
$value
=
array
(
$this
->
getHandle
(
$this
->
value
),
);
}
return
id
(
new
AphrontFormTokenizerControl
())
->
setLabel
(
'Repository'
)
->
setName
(
'repositoryPHID'
)
->
setUser
(
$this
->
getUser
())
->
setLimit
(
1
)
->
setDatasource
(
'/typeahead/common/repositories/'
)
->
setValue
(
$value
);
}
public
function
willWriteRevision
(
DifferentialRevisionEditor
$editor
)
{
$this
->
getRevision
()->
setRepositoryPHID
(
$this
->
value
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jun 19, 3:47 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
246306
Default Alt Text
DifferentialRepositoryFieldSpecification.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment