Esempio n. 1
0
 /**
  * Builds plugins list that will be passed to templates engine.
  *
  * @return array
  */
 protected function buildPluginsList()
 {
     $plugins = array();
     foreach (PluginUtils::discoverPlugins() as $plugin_name) {
         $plugin = new PluginInfo($plugin_name);
         $plugins[] = array('name' => $plugin_name, 'version' => $plugin->isInstalled() ? $plugin->getInstalledVersion() : $plugin->getVersion(), 'dependencies' => array_merge($plugin->getSystemRequirements(), $plugin->getDependencies()), 'enabled' => $plugin->isEnabled(), 'installed' => $plugin->isInstalled(), 'needsUpdate' => $plugin->needsUpdate(), 'canBeEnabled' => $plugin->canBeEnabled(), 'canBeDisabled' => $plugin->canBeDisabled(), 'canBeUninstalled' => $plugin->canBeUninstalled(), 'canBeUpdated' => $plugin->canBeUpdated(), 'state' => $this->getPluginState($plugin));
     }
     return $plugins;
 }