*/
class PluginList extends Widget
{
- var $plugins = array();
+ var $pluginNames = array();
- function __construct(array $plugins, Action $out=null)
+ function __construct(array $pluginNames, Action $out=null)
{
parent::__construct($out);
- $this->plugins = $plugins;
+ $this->pluginNames = $pluginNames;
}
function show()
function showPlugins()
{
- foreach ($this->plugins as $plugin) {
- // Some check on instance
- assert($plugin instanceof Plugin);
-
- $pli = $this->newListItem($plugin);
+ foreach ($this->pluginNames as $pluginName) {
+ $pli = $this->newListItem($pluginName);
$pli->show();
}
}
- function newListItem(Plugin $plugin)
+ function newListItem($pluginName)
{
- return new PluginListItem($plugin, $this->out);
+ return new PluginListItem($pluginName, $this->out);
}
}