Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93029759
ProjectConduitAPIMethod.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
Mon, Nov 25, 16:31
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Nov 27, 16:31 (2 d)
Engine
blob
Format
Raw Data
Handle
22557623
Attached To
rPH Phabricator
ProjectConduitAPIMethod.php
View Options
<?php
abstract
class
ProjectConduitAPIMethod
extends
ConduitAPIMethod
{
final
public
function
getApplication
()
{
return
PhabricatorApplication
::
getByClass
(
'PhabricatorProjectApplication'
);
}
protected
function
buildProjectInfoDictionary
(
PhabricatorProject
$project
)
{
$results
=
$this
->
buildProjectInfoDictionaries
(
array
(
$project
));
return
idx
(
$results
,
$project
->
getPHID
());
}
protected
function
buildProjectInfoDictionaries
(
array
$projects
)
{
assert_instances_of
(
$projects
,
'PhabricatorProject'
);
if
(!
$projects
)
{
return
array
();
}
$result
=
array
();
foreach
(
$projects
as
$project
)
{
$member_phids
=
$project
->
getMemberPHIDs
();
$member_phids
=
array_values
(
$member_phids
);
$project_slugs
=
$project
->
getSlugs
();
$project_slugs
=
array_values
(
mpull
(
$project_slugs
,
'getSlug'
));
$project_icon
=
$project
->
getDisplayIconKey
();
$result
[
$project
->
getPHID
()]
=
array
(
'id'
=>
$project
->
getID
(),
'phid'
=>
$project
->
getPHID
(),
'name'
=>
$project
->
getName
(),
'profileImagePHID'
=>
$project
->
getProfileImagePHID
(),
'icon'
=>
$project_icon
,
'color'
=>
$project
->
getColor
(),
'members'
=>
$member_phids
,
'slugs'
=>
$project_slugs
,
'dateCreated'
=>
$project
->
getDateCreated
(),
'dateModified'
=>
$project
->
getDateModified
(),
);
}
return
$result
;
}
}
Event Timeline
Log In to Comment