2024.8.23
|
Go to the source code of this file.
Variables | |
global | $bearsamppBins |
global | $bearsamppLang |
$result | |
if($bearsamppBins->getNodejs() ->isEnable()) | else |
foreach ( $bearsamppBins->getNodejs() ->getVersionList() as $version) | |
global $bearsamppBins |
Definition at line 10 of file ajax.nodejs.php.
global $bearsamppLang |
Definition at line 10 of file ajax.nodejs.php.
$result |
This script generates a JSON-encoded array containing the status and versions of Node.js. It checks if Node.js is enabled and sets the status accordingly. Then, it loops through the Node.js version list, adding versions to the 'versions' key. Finally, it encodes the result array into a JSON format and echoes it.
@global object $bearsamppBins Provides access to various binaries including Node.js. @global object $bearsamppLang Provides access to language strings for localization.
Definition at line 23 of file ajax.nodejs.php.
if ( $bearsamppBins->getNodejs() ->isEnable()) else |
Checks if Node.js is enabled and sets the status in the result array. If enabled, sets the status to a success badge with the 'ENABLED' label. If disabled, sets the status to a danger badge with the 'DISABLED' label.
Definition at line 36 of file ajax.nodejs.php.
foreach($bearsamppBins->getNodejs() ->getVersionList() as $version) | ( | $bearsamppBins->getNodejs() ->getVersionList() as | ) |
Loops through the list of Node.js versions and adds them to the 'versions' key in the result array. The current version is highlighted with a primary badge, while other versions are shown with a secondary badge.
Definition at line 45 of file ajax.nodejs.php.