Commit dc296444 authored by alexpott's avatar alexpott

Issue #2565925 by Wim Leers: Let Breadcrumb implement RenderableInterface

parent 10c624b4
...@@ -10,11 +10,12 @@ ...@@ -10,11 +10,12 @@
use Drupal\Core\Cache\RefinableCacheableDependencyInterface; use Drupal\Core\Cache\RefinableCacheableDependencyInterface;
use Drupal\Core\Cache\RefinableCacheableDependencyTrait; use Drupal\Core\Cache\RefinableCacheableDependencyTrait;
use Drupal\Core\Link; use Drupal\Core\Link;
use Drupal\Core\Render\RenderableInterface;
/** /**
* Used to return generated breadcrumbs with associated cacheability metadata. * Used to return generated breadcrumbs with associated cacheability metadata.
*/ */
class Breadcrumb implements RefinableCacheableDependencyInterface { class Breadcrumb implements RenderableInterface, RefinableCacheableDependencyInterface {
use RefinableCacheableDependencyTrait; use RefinableCacheableDependencyTrait;
...@@ -70,12 +71,7 @@ public function addLink(Link $link) { ...@@ -70,12 +71,7 @@ public function addLink(Link $link) {
} }
/** /**
* Returns a render array representation of the object. * {@inheritdoc}
*
* @return mixed[]
* A render array.
*
* @todo implement RenderableInterface once https://www.drupal.org/node/2529560 lands.
*/ */
public function toRenderable() { public function toRenderable() {
$build = [ $build = [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment