Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F545680
PhabricatorSystemSelectHighlightController.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
PhabricatorSystemSelectHighlightController.php
View Options
<?php
final
class
PhabricatorSystemSelectHighlightController
extends
PhabricatorController
{
public
function
shouldRequireLogin
()
{
return
false
;
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
if
(
$request
->
isFormPost
())
{
$result
=
array
(
'highlight'
=>
$request
->
getStr
(
'highlight'
));
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
$result
);
}
$languages
=
array
(
''
=>
pht
(
'(Use Default)'
),
)
+
PhabricatorEnv
::
getEnvConfig
(
'pygments.dropdown-choices'
);
$form
=
id
(
new
AphrontFormView
())
->
setUser
(
$this
->
getRequest
()->
getUser
())
->
appendRemarkupInstructions
(
pht
(
'Choose a syntax highlighting to use.'
))
->
appendChild
(
id
(
new
AphrontFormSelectControl
())
->
setLabel
(
pht
(
'Highlighting'
))
->
setName
(
'highlight'
)
->
setValue
(
$request
->
getStr
(
'highlight'
))
->
setOptions
(
$languages
));
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Select Syntax Highlighting'
))
->
appendChild
(
$form
->
buildLayoutView
())
->
addSubmitButton
(
pht
(
'Choose Highlighting'
))
->
addCancelButton
(
'/'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 12:57 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
112530
Default Alt Text
PhabricatorSystemSelectHighlightController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment