Skip to content

Commit

Permalink
add getConfigForCommunity
Browse files Browse the repository at this point in the history
  • Loading branch information
Mips2648 committed Apr 9, 2024
1 parent e4b7276 commit ee012b3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/MipsEqLogicTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,24 @@ public static function sendToDaemon($params) {
socket_write($socket, $payLoad, strlen($payLoad));
socket_close($socket);
}

public static function getConfigForCommunity() {
/** @var plugin */
$plugin = plugin::byId(__CLASS__);

$return = "<br>*Remplacez ce texte par une capture d'écran de la page santé Jeedom*<br><br>";
if ($plugin->getHasDependency()) {
if (file_exists(log::getPathToLog($plugin->getId() . '_update'))) {
$return .= "Log des dépendances:<br>```<br><br>collez ici le contenu du log {$plugin->getId()}_update<br><br>```<br>";
} elseif (file_exists(log::getPathToLog($plugin->getId() . '_packages'))) {
$return .= "Log des dépendances:<br>```<br><br>collez ici le contenu du log {$plugin->getId()}_packages<br><br>```<br>";
}
}
if ($plugin->getHasOwnDeamon()) {
$return .= "Log du démon:<br>```<br><br>collez ici le contenu du log {$plugin->getId()}_daemon<br><br>```<br>";
}
$return .= "Log du plugin:<br>```<br><br>collez ici le contenu du log {$plugin->getId()}<br><br>```<br>";

return $return;
}
}

0 comments on commit ee012b3

Please sign in to comment.