Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98200991
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, Jan 11, 00:11
Size
954 B
Mime Type
text/x-php
Expires
Mon, Jan 13, 00:11 (2 d)
Engine
blob
Format
Raw Data
Handle
23530810
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
,
));
}
}
Event Timeline
Log In to Comment