Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102488982
PhabricatorPinnedApplicationsSetting.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
Fri, Feb 21, 06:08
Size
850 B
Mime Type
text/x-php
Expires
Sun, Feb 23, 06:08 (2 d)
Engine
blob
Format
Raw Data
Handle
24331737
Attached To
rPH Phabricator
PhabricatorPinnedApplicationsSetting.php
View Options
<?php
final
class
PhabricatorPinnedApplicationsSetting
extends
PhabricatorInternalSetting
{
const
SETTINGKEY
=
'app-pinned'
;
public
function
getSettingName
()
{
return
pht
(
'Pinned Applications'
);
}
public
function
getSettingDefaultValue
()
{
$viewer
=
$this
->
getViewer
();
// If we're editing a template, just show every available application.
if
(!
$viewer
)
{
$viewer
=
PhabricatorUser
::
getOmnipotentUser
();
}
$applications
=
id
(
new
PhabricatorApplicationQuery
())
->
setViewer
(
$viewer
)
->
withInstalled
(
true
)
->
withUnlisted
(
false
)
->
withLaunchable
(
true
)
->
execute
();
$pinned
=
array
();
foreach
(
$applications
as
$application
)
{
if
(
$application
->
isPinnedByDefault
(
$viewer
))
{
$pinned
[]
=
get_class
(
$application
);
}
}
return
$pinned
;
}
}
Event Timeline
Log In to Comment