3 abstract class PhabricatorHovercardEngineExtension
extends Phobject
{
7 final public function getExtensionKey() {
8 return $this->getPhobjectClassConstant('EXTENSIONKEY');
11 final public function setViewer($viewer) {
12 $this->viewer
= $viewer;
16 final public function getViewer() {
20 abstract public function isExtensionEnabled();
22 abstract public function getExtensionName();
24 abstract public function canRenderObjectHovercard($object);
26 public function getExtensionOrder() {
30 public function willRenderHovercards(array $objects) {
34 abstract public function renderHovercard(
35 PHUIHovercardView
$hovercard,
36 PhabricatorObjectHandle
$handle,
40 final public static function getAllExtensions() {
41 return id(new PhutilClassMapQuery())
42 ->setAncestorClass(__CLASS__
)
43 ->setUniqueMethod('getExtensionKey')
44 ->setSortMethod('getExtensionOrder')
48 final public static function getAllEnabledExtensions() {
49 $extensions = self
::getAllExtensions();
51 foreach ($extensions as $key => $extension) {
52 if (!$extension->isExtensionEnabled()) {
53 unset($extensions[$key]);