plugin prepare
This commit is contained in:
parent
be86717c0b
commit
56f13f9660
@ -36,6 +36,8 @@ class PluginManager {
|
|||||||
|
|
||||||
$this->pluginMenu = new PluginMenu($maniaControl);
|
$this->pluginMenu = new PluginMenu($maniaControl);
|
||||||
$this->maniaControl->configurator->addMenu($this->pluginMenu);
|
$this->maniaControl->configurator->addMenu($this->pluginMenu);
|
||||||
|
|
||||||
|
$this->preparePlugins();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -224,6 +226,15 @@ class PluginManager {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare all Plugins
|
||||||
|
*/
|
||||||
|
private function preparePlugins() {
|
||||||
|
foreach($this->pluginClasses as $plugin) {
|
||||||
|
$plugin::prepare($this->maniaControl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all declared plugin class names
|
* Get all declared plugin class names
|
||||||
*
|
*
|
||||||
|
@ -43,6 +43,15 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
const SETTING_DONATION_VALUES = 'Donation Values';
|
const SETTING_DONATION_VALUES = 'Donation Values';
|
||||||
const SETTING_MIN_AMOUNT_SHOWN = 'Minimum Donation amount to get shown';
|
const SETTING_MIN_AMOUNT_SHOWN = 'Minimum Donation amount to get shown';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Private properties
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @var maniaControl $maniaControl
|
||||||
|
*/
|
||||||
|
private $maniaControl = null;
|
||||||
|
private $openBills = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepares the Plugin
|
* Prepares the Plugin
|
||||||
*
|
*
|
||||||
@ -53,18 +62,8 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
// TODO: Implement prepare() method.
|
// TODO: Implement prepare() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Private properties
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @var maniaControl $maniaControl
|
|
||||||
*/
|
|
||||||
private $maniaControl = null;
|
|
||||||
private $openBills = array();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @see \ManiaControl\Plugins\Plugin::load()
|
* @see \ManiaControl\Plugins\Plugin::load()
|
||||||
*/
|
*/
|
||||||
public function load(ManiaControl $maniaControl) {
|
public function load(ManiaControl $maniaControl) {
|
||||||
@ -96,7 +95,6 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @see \ManiaControl\Plugins\Plugin::unload()
|
* @see \ManiaControl\Plugins\Plugin::unload()
|
||||||
*/
|
*/
|
||||||
public function unload() {
|
public function unload() {
|
||||||
@ -110,7 +108,6 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @see \ManiaControl\Plugins\Plugin::getId()
|
* @see \ManiaControl\Plugins\Plugin::getId()
|
||||||
*/
|
*/
|
||||||
public static function getId() {
|
public static function getId() {
|
||||||
@ -118,7 +115,6 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @see \ManiaControl\Plugins\Plugin::getName()
|
* @see \ManiaControl\Plugins\Plugin::getName()
|
||||||
*/
|
*/
|
||||||
public static function getName() {
|
public static function getName() {
|
||||||
@ -126,7 +122,6 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @see \ManiaControl\Plugins\Plugin::getVersion()
|
* @see \ManiaControl\Plugins\Plugin::getVersion()
|
||||||
*/
|
*/
|
||||||
public static function getVersion() {
|
public static function getVersion() {
|
||||||
@ -134,7 +129,6 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @see \ManiaControl\Plugins\Plugin::getAuthor()
|
* @see \ManiaControl\Plugins\Plugin::getAuthor()
|
||||||
*/
|
*/
|
||||||
public static function getAuthor() {
|
public static function getAuthor() {
|
||||||
@ -142,7 +136,6 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @see \ManiaControl\Plugins\Plugin::getDescription()
|
* @see \ManiaControl\Plugins\Plugin::getDescription()
|
||||||
*/
|
*/
|
||||||
public static function getDescription() {
|
public static function getDescription() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user