yellow/system/workers/stockholm.php
markseu 3f6cc2ea6d Datenstrom Yellow 0.9 has been released
Co-Authored-By: Anna <14218799+annaesvensson@users.noreply.github.com>
Co-Authored-By: Steffen Schultz <steffenschultz@mailbox.org>
2024-04-04 23:54:22 +02:00

23 lines
820 B
PHP

<?php
// Stockholm extension, https://github.com/annaesvensson/yellow-stockholm
class YellowStockholm {
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" => "stockholm"));
} elseif ($action=="uninstall" && $this->yellow->system->get("theme")=="stockholm") {
$this->yellow->system->save($fileName, array("theme" => $this->yellow->system->getDifferent("theme")));
}
}
}