Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91028816
PhabricatorFavoritesProfileMenuEngine.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, Nov 7, 02:16
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Nov 9, 02:16 (2 d)
Engine
blob
Format
Raw Data
Handle
22181640
Attached To
rPH Phabricator
PhabricatorFavoritesProfileMenuEngine.php
View Options
<?php
final
class
PhabricatorFavoritesProfileMenuEngine
extends
PhabricatorProfileMenuEngine
{
protected
function
isMenuEngineConfigurable
()
{
return
true
;
}
protected
function
getItemURI
(
$path
)
{
$object
=
$this
->
getProfileObject
();
$custom
=
$this
->
getCustomPHID
();
if
(
$custom
)
{
return
"/favorites/personal/item/{$path}"
;
}
else
{
return
"/favorites/global/item/{$path}"
;
}
}
protected
function
getBuiltinProfileItems
(
$object
)
{
$items
=
array
();
$viewer
=
$this
->
getViewer
();
$engines
=
PhabricatorEditEngine
::
getAllEditEngines
();
$engines
=
msortv
(
$engines
,
'getQuickCreateOrderVector'
);
foreach
(
$engines
as
$engine
)
{
foreach
(
$engine
->
getDefaultQuickCreateFormKeys
()
as
$form_key
)
{
$form_hash
=
PhabricatorHash
::
digestForIndex
(
$form_key
);
$builtin_key
=
"editengine.form({$form_hash})"
;
$properties
=
array
(
'name'
=>
null
,
'formKey'
=>
$form_key
,
);
$items
[]
=
$this
->
newItem
()
->
setBuiltinKey
(
$builtin_key
)
->
setMenuItemKey
(
PhabricatorEditEngineProfileMenuItem
::
MENUITEMKEY
)
->
setMenuItemProperties
(
$properties
);
}
}
return
$items
;
}
}
Event Timeline
Log In to Comment