public function TMGMTLocalBreadcrumbBuilder::applies

File

translators/tmgmt_local/src/Menu/TMGMTLocalBreadcrumbBuilder.php, line 22

Class

TMGMTLocalBreadcrumbBuilder
A custom Local task item breadcrumb builder.

Namespace

Drupal\tmgmt_local\Menu

Code

public function applies(RouteMatchInterface $route_match) {
  if (strpos($route_match
    ->getRouteName(), 'view.tmgmt_local_manage_translate_task') === 0 || strpos($route_match
    ->getRouteName(), 'view.tmgmt_local_task_overview') === 0 || $route_match
    ->getParameter('tmgmt_local_task') instanceof LocalTaskInterface || $route_match
    ->getParameter('tmgmt_local_task_item') instanceof LocalTaskItemInterface) {
    return TRUE;
  }
  return FALSE;
}