You are here

private function views_CrumbsMonoPlugin_PageTitle::getRelevantArgument in Crumbs, the Breadcrumbs suite 7.2

Parameters

views_handler_argument[] $arguments:

Return value

null|views_handler_argument

1 call to views_CrumbsMonoPlugin_PageTitle::getRelevantArgument()
views_CrumbsMonoPlugin_PageTitle::viewsArgTitle in plugins/crumbs.views.inc
Loads the view and determines a breadcrumb item title based on the last argument. This is used for views paths that end with '%'.

File

plugins/crumbs.views.inc, line 222

Class

views_CrumbsMonoPlugin_PageTitle
Determines a breadcrumb item title based on the view title of a page view. The same plugin class is used for Views displays with or without arguments.

Code

private function getRelevantArgument(array $arguments) {
  while (!empty($arguments)) {

    /** @var views_handler_argument $arg */
    $arg = array_pop($arguments);
    if (1 && is_object($arg) && !$arg
      ->is_exception() && isset($arg->argument)) {
      return $arg;
    }
  }
  return NULL;
}