Drupal 8  8.0.2
Breadcrumb Class Reference
Inheritance diagram for Breadcrumb:

Public Member Functions

 getLinks ()
 
 setLinks (array $links)
 
 addLink (Link $link)
 
 toRenderable ()
 
- Public Member Functions inherited from RefinableCacheableDependencyInterface
 addCacheContexts (array $cache_contexts)
 
 addCacheTags (array $cache_tags)
 
 mergeCacheMaxAge ($max_age)
 
 addCacheableDependency ($other_object)
 
- Public Member Functions inherited from CacheableDependencyInterface
 getCacheContexts ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 

Protected Attributes

 $links = []
 

Detailed Description

Used to return generated breadcrumbs with associated cacheability metadata.

Member Function Documentation

addLink ( Link  $link)

Appends a link to the end of the ordered list of breadcrumb links.

Parameters
\Drupal\Core\Link$linkThe link appended to the breadcrumb.
Returns
$this
getLinks ( )

Gets the breadcrumb links.

Returns
[]
setLinks ( array  $links)

Sets the breadcrumb links.

Parameters
\Drupal\Core\Link[]$links The breadcrumb links.
Returns
$this
Exceptions
\LogicExceptionThrown when setting breadcrumb links after they've already been set.
toRenderable ( )

{Returns a render array representation of the object.

Returns
mixed[] A render array.
}

Implements RenderableInterface.


The documentation for this class was generated from the following file: