Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96614629
NuanceItemEditController.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
Sat, Dec 28, 22:45
Size
973 B
Mime Type
text/x-php
Expires
Mon, Dec 30, 22:45 (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
23198277
Attached To
rPH Phabricator
NuanceItemEditController.php
View Options
<?php
final
class
NuanceItemEditController
extends
NuanceController
{
private
$itemID
;
public
function
setItemID
(
$item_id
)
{
$this
->
itemID
=
$item_id
;
return
$this
;
}
public
function
getItemID
()
{
return
$this
->
itemID
;
}
public
function
willProcessRequest
(
array
$data
)
{
$this
->
setItemID
(
idx
(
$data
,
'id'
));
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$item_id
=
$this
->
getItemID
();
$is_new
=
!
$item_id
;
if
(
$is_new
)
{
$item
=
new
NuanceItem
();
}
else
{
$item
=
id
(
new
NuanceItemQuery
())
->
setViewer
(
$user
)
->
withIDs
(
array
(
$item_id
))
->
executeOne
();
}
if
(!
$item
)
{
return
new
Aphront404Response
();
}
$crumbs
=
$this
->
buildApplicationCrumbs
();
$title
=
'TODO'
;
return
$this
->
buildApplicationPage
(
$crumbs
,
array
(
'title'
=>
$title
,
'device'
=>
true
));
}
}
Event Timeline
Log In to Comment