Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93171748
PhabricatorHovercardEngineExtension.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, 18:23
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 28, 18:23 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22586232
Attached To
rPH Phabricator
PhabricatorHovercardEngineExtension.php
View Options
<?php
abstract
class
PhabricatorHovercardEngineExtension
extends
Phobject
{
private
$viewer
;
final
public
function
getExtensionKey
()
{
return
$this
->
getPhobjectClassConstant
(
'EXTENSIONKEY'
);
}
final
public
function
setViewer
(
$viewer
)
{
$this
->
viewer
=
$viewer
;
return
$this
;
}
final
public
function
getViewer
()
{
return
$this
->
viewer
;
}
abstract
public
function
isExtensionEnabled
();
abstract
public
function
getExtensionName
();
abstract
public
function
canRenderObjectHovercard
(
$object
);
public
function
getExtensionOrder
()
{
return
5000
;
}
public
function
willRenderHovercards
(
array
$objects
)
{
return
null
;
}
abstract
public
function
renderHovercard
(
PHUIHovercardView
$hovercard
,
PhabricatorObjectHandle
$handle
,
$object
,
$data
);
final
public
static
function
getAllExtensions
()
{
return
id
(
new
PhutilClassMapQuery
())
->
setAncestorClass
(
__CLASS__
)
->
setUniqueMethod
(
'getExtensionKey'
)
->
setSortMethod
(
'getExtensionOrder'
)
->
execute
();
}
final
public
static
function
getAllEnabledExtensions
()
{
$extensions
=
self
::
getAllExtensions
();
foreach
(
$extensions
as
$key
=>
$extension
)
{
if
(!
$extension
->
isExtensionEnabled
())
{
unset
(
$extensions
[
$key
]);
}
}
return
$extensions
;
}
}
Event Timeline
Log In to Comment