Adding module settings (admin.php), some fixes

This commit is contained in:
Adrian Preuß committed 2019-05-16 22:57:04 +02:00
1 parent f6b9eb2bf5
commit 211db399b9
12 files changed
+264 -111

No files matched your search

+17 -3
View File
@@ -2,10 +2,12 @@
namespace fruithost;
class ModuleInterface {
private $core = null;
private $core = null;
private $instance = null;
public function __construct($core) {
$this->core = $core;
public function __construct($core, $instance) {
$this->core = $core;
$this->instance = $instance;
$this->init();
}
@@ -34,6 +36,18 @@
return $this->core;
}
public function getInstance() {
return $this->instance;
}
public function setSettings($name, $value = NULL) {
$this->instance->setSettings($name, $value);
}
public function getSettings($name, $default = NULL) {
return $this->instance->getSettings($name, $default);
}
public function addButton($button) {
$this->addFilter('buttons', function($buttons) use($button) {
$buttons[] = $button;