Issue #2145463 by damiankloip: Remove LegacyBreadcrumbBuilder.

8.0.x
webchick 2013-11-27 23:33:00 -08:00
parent 9bcaedec15
commit d6362badbf
3 changed files with 0 additions and 63 deletions

View File

@ -285,28 +285,6 @@ function drupal_get_profile() {
return $profile;
}
/**
* Sets the breadcrumb trail for the current page.
*
* @param $breadcrumb
* Array of links, starting with "home" and proceeding up to but not including
* the current page.
*
* @deprecated This will be removed in 8.0. Instead, register a new breadcrumb
* builder service.
*
* @see \Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface
*/
function drupal_set_breadcrumb($breadcrumb = NULL) {
$stored_breadcrumb = &drupal_static(__FUNCTION__);
if (isset($breadcrumb)) {
$stored_breadcrumb = $breadcrumb;
}
return $stored_breadcrumb;
}
/**
* Adds output to the HEAD tag of the HTML page.
*

View File

@ -1,37 +0,0 @@
<?php
/**
* @file
* Contains \Drupal\system\LegacyBreadcrumbBuilder.
*/
namespace Drupal\system;
use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface;
/**
* Class to define the legacy breadcrumb builder.
*
* @deprecated This will be removed in 8.0. Instead, register a new breadcrumb
* builder service.
*
* @see \Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface
*
* This breadcrumb builder implements legacy support for the
* drupal_set_breadcrumb() mechanic.
* Remove this once drupal_set_breadcrumb() has been eliminated.
*/
class LegacyBreadcrumbBuilder implements BreadcrumbBuilderInterface {
/**
* {@inheritdoc}
*/
public function build(array $attributes) {
$breadcrumb = drupal_set_breadcrumb();
if (is_array($breadcrumb)) {
// $breadcrumb is expected to be an array of rendered breadcrumb links.
return $breadcrumb;
}
}
}

View File

@ -6,10 +6,6 @@ services:
system.manager:
class: Drupal\system\SystemManager
arguments: ['@module_handler', '@database', '@entity.manager']
system.breadcrumb.legacy:
class: Drupal\system\LegacyBreadcrumbBuilder
tags:
- {name: breadcrumb_builder, priority: 500}
system.breadcrumb.default:
class: Drupal\system\PathBasedBreadcrumbBuilder
arguments: ['@request', '@entity.manager', '@access_manager', '@router', '@path_processor_manager', '@config.factory', '@title_resolver']