Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php final class PhabricatorProjectHovercardEngineExtension extends PhabricatorHoverca..
Decoded Output download
<?php
final class PhabricatorProjectHovercardEngineExtension
extends PhabricatorHovercardEngineExtension {
const EXTENSIONKEY = 'project.card';
public function isExtensionEnabled() {
return true;
}
public function getExtensionName() {
return pht('Project Card');
}
public function canRenderObjectHovercard($object) {
return ($object instanceof PhabricatorProject);
}
public function willRenderHovercards(array $objects) {
$viewer = $this->getViewer();
$phids = mpull($objects, 'getPHID');
$projects = id(new PhabricatorProjectQuery())
->setViewer($viewer)
->withPHIDs($phids)
->needImages(true)
->execute();
$projects = mpull($projects, null, 'getPHID');
return array(
'projects' => $projects,
);
}
public function renderHovercard(
PHUIHovercardView $hovercard,
PhabricatorObjectHandle $handle,
$object,
$data) {
$viewer = $this->getViewer();
$project = idx($data['projects'], $object->getPHID());
if (!$project) {
return;
}
$project_card = id(new PhabricatorProjectCardView())
->setProject($project)
->setViewer($viewer);
$hovercard->appendChild($project_card);
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorProjectHovercardEngineExtension
extends PhabricatorHovercardEngineExtension {
const EXTENSIONKEY = 'project.card';
public function isExtensionEnabled() {
return true;
}
public function getExtensionName() {
return pht('Project Card');
}
public function canRenderObjectHovercard($object) {
return ($object instanceof PhabricatorProject);
}
public function willRenderHovercards(array $objects) {
$viewer = $this->getViewer();
$phids = mpull($objects, 'getPHID');
$projects = id(new PhabricatorProjectQuery())
->setViewer($viewer)
->withPHIDs($phids)
->needImages(true)
->execute();
$projects = mpull($projects, null, 'getPHID');
return array(
'projects' => $projects,
);
}
public function renderHovercard(
PHUIHovercardView $hovercard,
PhabricatorObjectHandle $handle,
$object,
$data) {
$viewer = $this->getViewer();
$project = idx($data['projects'], $object->getPHID());
if (!$project) {
return;
}
$project_card = id(new PhabricatorProjectCardView())
->setProject($project)
->setViewer($viewer);
$hovercard->appendChild($project_card);
}
}
Function Calls
None |
Stats
MD5 | 95959c51b94f52c66e79f249f7e77a22 |
Eval Count | 0 |
Decode Time | 92 ms |