You are here

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

Information returned from hook_crumbs_plugins()

Return value

crumbs_InjectedAPI_Collection_CollectionResult

See also

crumbs_PluginSystem_PluginInfo::$discovery

File

lib/PluginSystem/PluginInfo.php, line 358

Class

crumbs_PluginSystem_PluginInfo
Info about available plugins and their weights.

Code

protected function get_discovery() {
  $this->includePluginFiles;

  // Pass a by-reference parameter to the $api object, that can only be
  // changed from here.
  $api = new crumbs_InjectedAPI_hookCrumbsPlugins($pluginCollection = new crumbs_InjectedAPI_Collection_PluginCollection(), $entityPluginCollection = new crumbs_InjectedAPI_Collection_EntityPluginCollection(), new crumbs_InjectedAPI_Collection_CallbackCollection(), $defaultValueCollection = new crumbs_InjectedAPI_Collection_DefaultValueCollection());
  foreach (module_implements('crumbs_plugins') as $module) {
    $function = $module . '_crumbs_plugins';
    $api
      ->setModule($module);
    $function($api);
  }
  $entityPluginCollection
    ->finalize($pluginCollection);
  return new crumbs_InjectedAPI_Collection_CollectionResult($pluginCollection, $defaultValueCollection);
}