1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-08 22:01:03 +01:00
phorge-phorge/src/applications/diffusion/relationships/DiffusionCommitRelationship.php

20 lines
415 B
PHP
Raw Normal View History

<?php
abstract class DiffusionCommitRelationship
extends PhabricatorObjectRelationship {
public function isEnabledForObject($object) {
$viewer = $this->getViewer();
$has_app = PhabricatorApplication::isClassInstalledForViewer(
'PhabricatorDiffusionApplication',
$viewer);
if (!$has_app) {
return false;
}
return ($object instanceof PhabricatorRepositoryCommit);
}
}