Breadcrumb
class Breadcrumb implements RenderableInterface, RefinableCacheableDependencyInterface (View source)
Used to return generated breadcrumbs with associated cacheability metadata.
Traits
Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface.
Trait for \Drupal\Core\Cache\CacheableDependencyInterface.
Properties
| protected string[] | $cacheContexts | Cache contexts. |
from CacheableDependencyTrait |
| protected string[] | $cacheTags | Cache tags. |
from CacheableDependencyTrait |
| protected int | $cacheMaxAge | Cache max-age. |
from CacheableDependencyTrait |
| protected Link[] | $links | An ordered list of links for the breadcrumb. |
Methods
Sets cacheability; useful for value object constructors.
Sets the breadcrumb links.
Returns a render array representation of the object.
Details
protected $this
setCacheability(CacheableDependencyInterface $cacheability)
Sets cacheability; useful for value object constructors.
getCacheTags()
{@inheritdoc}
getCacheContexts()
{@inheritdoc}
getCacheMaxAge()
{@inheritdoc}
addCacheableDependency($other_object)
{@inheritdoc}
addCacheContexts(array $cache_contexts)
{@inheritdoc}
addCacheTags(array $cache_tags)
{@inheritdoc}
mergeCacheMaxAge($max_age)
{@inheritdoc}
Link[]
getLinks()
Gets the breadcrumb links.
$this
setLinks(array $links)
Sets the breadcrumb links.
$this
addLink(Link $link)
Appends a link to the end of the ordered list of breadcrumb links.
array
toRenderable()
Returns a render array representation of the object.