You are here

function crumbs_MonoPlugin_TitleCallback::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/TitleCallback.php, line 51

Class

crumbs_MonoPlugin_TitleCallback

Code

function findTitle($path, $item) {
  if (!isset($this->callback)) {

    // Restore the callback after serialization.
    $this->callback = crumbs()->callbackRestoration
      ->restoreCallback($this->module, $this->key, 'routeTitle');
  }
  if (!empty($this->callback)) {
    return call_user_func($this->callback, $path, $item);
  }
  return NULL;
}