Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F548564
PhabricatorTokenizerEditField.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
PhabricatorTokenizerEditField.php
View Options
<?php
abstract
class
PhabricatorTokenizerEditField
extends
PhabricatorPHIDListEditField
{
abstract
protected
function
newDatasource
();
protected
function
newControl
()
{
$control
=
id
(
new
AphrontFormTokenizerControl
())
->
setDatasource
(
$this
->
newDatasource
());
$initial_value
=
$this
->
getInitialValue
();
if
(
$initial_value
!==
null
)
{
$control
->
setInitialValue
(
$initial_value
);
}
if
(
$this
->
getIsSingleValue
())
{
$control
->
setLimit
(
1
);
}
return
$control
;
}
protected
function
getInitialValueFromSubmit
(
AphrontRequest
$request
,
$key
)
{
return
$request
->
getArr
(
$key
.
'.initial'
);
}
protected
function
newEditType
()
{
$type
=
parent
::
newEditType
();
$datasource
=
$this
->
newDatasource
()
->
setViewer
(
$this
->
getViewer
());
$type
->
setDatasource
(
$datasource
);
return
$type
;
}
protected
function
newCommentAction
()
{
$viewer
=
$this
->
getViewer
();
$datasource
=
$this
->
newDatasource
()
->
setViewer
(
$viewer
);
$action
=
id
(
new
PhabricatorEditEngineTokenizerCommentAction
())
->
setDatasource
(
$datasource
);
if
(
$this
->
getIsSingleValue
())
{
$action
->
setLimit
(
1
);
}
$initial_value
=
$this
->
getInitialValue
();
if
(
$initial_value
!==
null
)
{
$action
->
setInitialValue
(
$initial_value
);
}
return
$action
;
}
protected
function
newBulkParameterType
()
{
$datasource
=
$this
->
newDatasource
()
->
setViewer
(
$this
->
getViewer
());
if
(
$this
->
getIsSingleValue
())
{
$datasource
->
setLimit
(
1
);
}
return
id
(
new
BulkTokenizerParameterType
())
->
setDatasource
(
$datasource
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:51 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
121879
Default Alt Text
PhabricatorTokenizerEditField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment