yellow-lbs/lbs.php
2026-09-08 15:05:43 +02:00

22 lines
786 B
PHP

<?php
// LBS extension, https://git.thepipes.ch/simon/yellow-lbs
class YellowLBS {
const VERSION = "0.9.0";
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" => "lb"));
} elseif ($action=="uninstall" && $this->yellow->system->get("theme")=="lbs") {
$this->yellow->system->save($fileName, array("theme" => $this->yellow->system->getDifferent("theme")));
}
}
}