Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93111852
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
Tue, Nov 26, 07:25
Size
712 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 07:25 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22575515
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
=
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