Skip to content
Snippets Groups Projects
Commit dc296444 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2565925 by Wim Leers: Let Breadcrumb implement RenderableInterface

parent 10c624b4
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -10,11 +10,12 @@
use Drupal\Core\Cache\RefinableCacheableDependencyInterface;
use Drupal\Core\Cache\RefinableCacheableDependencyTrait;
use Drupal\Core\Link;
use Drupal\Core\Render\RenderableInterface;
/**
* Used to return generated breadcrumbs with associated cacheability metadata.
*/
class Breadcrumb implements RefinableCacheableDependencyInterface {
class Breadcrumb implements RenderableInterface, RefinableCacheableDependencyInterface {
use RefinableCacheableDependencyTrait;
......@@ -70,12 +71,7 @@ public function addLink(Link $link) {
}
/**
* Returns a render array representation of the object.
*
* @return mixed[]
* A render array.
*
* @todo implement RenderableInterface once https://www.drupal.org/node/2529560 lands.
* {@inheritdoc}
*/
public function toRenderable() {
$build = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment