/** * Ask applicable plugins to "decorate" (alter) the breadcrumb. * * @param array $breadcrumb */ function decorateBreadcrumb($breadcrumb) { $plugin_methods = $this->pluginInfo->basicPluginMethods('decorateBreadcrumb'); foreach ($plugin_methods as $plugin_key => $method) { /** * @var crumbs_PluginInterface $plugin */ $plugin = $this->plugins[$plugin_key]; if (!method_exists($plugin, 'decorateBreadcrumb')) { // This means the code has changed, without the cache being cleared. // It is the user's responsibility to clear the cache. // Until then, we simply ignore and move on. continue; } $plugin->decorateBreadcrumb($breadcrumb); } }
/** * Prepared list of plugins and methods for a given find operation and route. * * @param crumbs_Container_CachedLazyPluginInfo $container * @param string $method * @param string $route * @return array */ function routePluginMethods($container, $method, $route) { $plugin_methods = $container->routePluginMethodsCached($method, $route); return FALSE !== $plugin_methods ? $plugin_methods : $container->basicPluginMethods($method); }