mirror of
https://github.com/fruithost/Panel.git
synced 2026-11-07 04:22:35 +09:00
Adding module settings (admin.php), some fixes
This commit is contained in:
1 parent
f6b9eb2bf5
commit
211db399b9
12 files changed
+264
-111
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user