You are here

protected function crumbs_PluginSystem_PluginInfo::get_pluginsCached in Crumbs, the Breadcrumbs suite 7.2

Plugins, not sorted, but already with the weights information.

Return value

array

See also

crumbs_PluginSystem_PluginInfo::$pluginsCached

File

lib/PluginSystem/PluginInfo.php, line 340

Class

crumbs_PluginSystem_PluginInfo
Info about available plugins and their weights.

Code

protected function get_pluginsCached() {
  $plugins = $this->discovery
    ->getPlugins();
  foreach ($plugins as $plugin_key => $plugin) {

    // Let plugins know about the weights, if they want to.
    if (method_exists($plugin, 'initWeights')) {
      $plugin
        ->initWeights($this->weightMap
        ->localWeightMap($plugin_key));
    }
  }
  return $plugins;
}