Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96124471
PhrictionNewController.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
Sun, Dec 22, 22:07
Size
993 B
Mime Type
text/x-php
Expires
Tue, Dec 24, 22:07 (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
23128703
Attached To
rPH Phabricator
PhrictionNewController.php
View Options
<?php
/**
* @group phriction
*/
final
class
PhrictionNewController
extends
PhrictionController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
if
(
$request
->
isFormPost
())
{
$slug
=
PhabricatorSlug
::
normalize
(
$request
->
getStr
(
'slug'
));
$uri
=
'/phriction/edit/?slug='
.
$slug
;
return
id
(
new
AphrontRedirectResponse
())
->
setURI
(
$uri
);
}
$view
=
id
(
new
AphrontFormLayoutView
())
->
appendChild
(
id
(
new
AphrontFormTextControl
())
->
setLabel
(
'/w/'
)
->
setName
(
'slug'
));
$dialog
=
id
(
new
AphrontDialogView
())
->
setUser
(
$user
)
->
setTitle
(
pht
(
'New Document'
))
->
appendChild
(
phutil_render_tag
(
'p'
,
array
(),
pht
(
'Create a new document at'
)))
->
appendChild
(
$view
)
->
addSubmitButton
(
pht
(
'Create'
))
->
addCancelButton
(
'/w/'
);
return
id
(
new
AphrontDialogResponse
())->
setDialog
(
$dialog
);
}
}
Event Timeline
Log In to Comment