Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F973974
ReleephUserView.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
ReleephUserView.php
View Options
<?php
abstract
class
ReleephUserView
extends
AphrontView
{
/**
* This function should bulk load everything you need to render all the given
* user phids.
*
* Many parts of Releeph load users for rendering. Accordingly, this
* function will be called multiple times for each part of the UI that
* renders users, so you should accumulate your results on each call.
*
* You should also implement render() (from AphrontView) to render each
* user's PHID.
*/
protected
function
loadInner
(
array
$phids
)
{
// This is a hook!
}
final
public
static
function
getNewInstance
()
{
$key
=
'releeph.user-view'
;
$class
=
PhabricatorEnv
::
getEnvConfig
(
$key
);
return
newv
(
$class
,
array
());
}
private
static
$handles
=
array
();
private
static
$seen
=
array
();
final
public
function
load
(
array
$phids
)
{
$todo
=
array
();
foreach
(
$phids
as
$key
=>
$phid
)
{
if
(!
idx
(
self
::
$seen
,
$phid
))
{
$todo
[
$key
]
=
$phid
;
self
::
$seen
[
$phid
]
=
true
;
}
}
if
(
$todo
)
{
self
::
$handles
=
array_merge
(
self
::
$handles
,
id
(
new
PhabricatorObjectHandleData
(
$todo
))
->
setViewer
(
$this
->
getUser
())
->
loadHandles
());
$this
->
loadInner
(
$todo
);
}
}
private
$phid
;
private
$releephProject
;
final
public
function
setRenderUserPHID
(
$phid
)
{
$this
->
phid
=
$phid
;
return
$this
;
}
final
public
function
setReleephProject
(
ReleephProject
$project
)
{
$this
->
releephProject
=
$project
;
return
$this
;
}
final
protected
function
getRenderUserPHID
()
{
return
$this
->
phid
;
}
final
protected
function
getReleephProject
()
{
return
$this
->
releephProject
;
}
final
protected
function
getHandle
()
{
return
self
::
$handles
[
$this
->
phid
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 7:32 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
232486
Default Alt Text
ReleephUserView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment