You are here

function crumbs_MonoPlugin_LegacyWrapper::findTitle in Crumbs, the Breadcrumbs suite 7.2

Find candidates for the parent path.

Parameters

string $path: The path that we want to find a parent for.

array $item: Item as returned from crumbs_get_router_item()

Return value

string Title candidate.

Overrides crumbs_MonoPlugin_FindTitleInterface::findTitle

File

lib/MonoPlugin/LegacyWrapper.php, line 92

Class

crumbs_MonoPlugin_LegacyWrapper
A wrapper for legacy plugins with suffixed methods like findTitle__node_x().

Code

function findTitle($path, $item) {
  $route = $item['route'];
  if (isset($this->findTitleRouteMethods[$route])) {
    $method = $this->findTitleRouteMethods[$route];
    return $this->wrappedPlugin
      ->{$method}($path, $item);
  }
  elseif (method_exists($this->wrappedPlugin, 'findTitle')) {
    return $this->wrappedPlugin
      ->findTitle($path, $item);
  }
  return NULL;
}