yellow-lbs/lbs.php
2026-09-08 15:33:10 +02:00

22 lines
787 B
PHP

<?php
// LBS extension, https://git.thepipes.ch/simon/yellow-lbs
class YellowLbs {
const VERSION = "0.9.1";
public $yellow; // access to API
// Handle initialisation
public function onLoad($yellow) {
$this->yellow = $yellow;
}
// Handle update
public function onUpdate($action) {
$fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreSystemFile");
if ($action=="install") {
$this->yellow->system->save($fileName, array("theme" => "lbs"));
} elseif ($action=="uninstall" && $this->yellow->system->get("theme")=="lbs") {
$this->yellow->system->save($fileName, array("theme" => $this->yellow->system->getDifferent("theme")));
}
}
}