Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F538481
PhabricatorEditEngineConfigurationSaveController.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
PhabricatorEditEngineConfigurationSaveController.php
View Options
<?php
final
class
PhabricatorEditEngineConfigurationSaveController
extends
PhabricatorEditEngineController
{
public
function
handleRequest
(
AphrontRequest
$request
)
{
$engine_key
=
$request
->
getURIData
(
'engineKey'
);
$this
->
setEngineKey
(
$engine_key
);
$key
=
$request
->
getURIData
(
'key'
);
$viewer
=
$this
->
getViewer
();
$config
=
id
(
new
PhabricatorEditEngineConfigurationQuery
())
->
setViewer
(
$viewer
)
->
withEngineKeys
(
array
(
$engine_key
))
->
withIdentifiers
(
array
(
$key
))
->
executeOne
();
if
(!
$config
)
{
return
id
(
new
Aphront404Response
());
}
$view_uri
=
$config
->
getURI
();
if
(
$config
->
getID
())
{
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Already Editable'
))
->
appendParagraph
(
pht
(
'This form configuration is already editable.'
))
->
addCancelButton
(
$view_uri
);
}
if
(
$request
->
isFormPost
())
{
$editor
=
id
(
new
PhabricatorEditEngineConfigurationEditor
())
->
setActor
(
$viewer
)
->
setContentSourceFromRequest
(
$request
)
->
setContinueOnNoEffect
(
true
);
$editor
->
applyTransactions
(
$config
,
array
());
return
id
(
new
AphrontRedirectResponse
())
->
setURI
(
$config
->
getURI
());
}
// TODO: Explain what this means in more detail once the implications are
// more clear, or just link to some docs or something.
return
$this
->
newDialog
()
->
setTitle
(
pht
(
'Make Builtin Editable'
))
->
appendParagraph
(
pht
(
'Make this builtin form editable?'
))
->
addSubmitButton
(
pht
(
'Make Editable'
))
->
addCancelButton
(
$view_uri
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 8:48 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
119987
Default Alt Text
PhabricatorEditEngineConfigurationSaveController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment