Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110061845
ConpherenceParticipantController.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
Thu, Apr 24, 13:23
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Apr 26, 13:23 (2 d)
Engine
blob
Format
Raw Data
Handle
25781980
Attached To
rPH Phabricator
ConpherenceParticipantController.php
View Options
<?php
final
class
ConpherenceParticipantController
extends
ConpherenceController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getViewer
();
$conpherence_id
=
$request
->
getURIData
(
'id'
);
if
(!
$conpherence_id
)
{
return
new
Aphront404Response
();
}
$conpherence
=
id
(
new
ConpherenceThreadQuery
())
->
setViewer
(
$viewer
)
->
withIDs
(
array
(
$conpherence_id
))
->
needWidgetData
(
true
)
->
executeOne
();
if
(!
$conpherence
)
{
return
new
Aphront404Response
();
}
$this
->
setConpherence
(
$conpherence
);
$content
=
$this
->
renderParticipantPaneContent
();
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
$content
);
}
private
function
renderParticipantPaneContent
()
{
$conpherence
=
$this
->
getConpherence
();
$widgets
=
array
();
$new_icon
=
id
(
new
PHUIIconView
())
->
setIcon
(
'fa-plus-square'
)
->
setHref
(
$this
->
getUpdateURI
())
->
setMetadata
(
array
(
'widget'
=>
null
))
->
addSigil
(
'conpherence-widget-adder'
);
$content
=
id
(
new
ConpherenceParticipantView
())
->
setUser
(
$this
->
getViewer
())
->
setConpherence
(
$this
->
getConpherence
())
->
setUpdateURI
(
$this
->
getUpdateURI
());
$widgets
[]
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'widgets-header'
,
),
id
(
new
PHUIHeaderView
())
->
setHeader
(
pht
(
'Participants'
))
->
addActionItem
(
$new_icon
));
$widgets
[]
=
javelin_tag
(
'div'
,
array
(
'class'
=>
'widgets-body'
,
'id'
=>
'widgets-people'
,
'sigil'
=>
'widgets-people'
,
),
$content
);
// without this implosion we get "," between each element in our widgets
// array
return
array
(
'widgets'
=>
phutil_implode_html
(
''
,
$widgets
));
}
private
function
getUpdateURI
()
{
$conpherence
=
$this
->
getConpherence
();
return
$this
->
getApplicationURI
(
'update/'
.
$conpherence
->
getID
().
'/'
);
}
}
Event Timeline
Log In to Comment