GeneratedNoLink
class GeneratedNoLink extends GeneratedLink (View source)
This class holds a generated from the
Traits
Provides an implementation of AttachmentsInterface.
Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface.
Trait for \Drupal\Core\Cache\CacheableDependencyInterface.
Constants
| TAG |
{@inheritdoc} |
Properties
| protected string[] | $cacheContexts | Cache contexts. |
from CacheableDependencyTrait |
| protected string[] | $cacheTags | Cache tags. |
from CacheableDependencyTrait |
| protected int | $cacheMaxAge | Cache max-age. |
from CacheableDependencyTrait |
| protected array | $attachments | The attachments for this response. |
from AttachmentsTrait |
| protected string | $generatedLink | The HTML string value containing a link. |
from GeneratedLink |
Methods
Sets cacheability; useful for value object constructors.
Creates a new bubbleable metadata object by merging this one with another.
Applies the values of this bubbleable metadata object to a render array.
Creates a bubbleable metadata object with values taken from a render array.
Creates a bubbleable metadata object from a depended object.
Merges two attachments arrays (which live under the '#attached' key).
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}
$this
setCacheTags(array $cache_tags)
Sets cache tags.
$this
setCacheContexts(array $cache_contexts)
Sets cache contexts.
$this
setCacheMaxAge(int $max_age)
Sets the maximum age (in seconds).
Defaults to Cache::PERMANENT
CacheableMetadata
merge(CacheableMetadata $other)
Creates a new bubbleable metadata object by merging this one with another.
applyTo(array $build)
Applies the values of this bubbleable metadata object to a render array.
static CacheableMetadata
createFromRenderArray(array $build)
Creates a bubbleable metadata object with values taken from a render array.
static CacheableMetadata
createFromObject(CacheableDependencyInterface|mixed $object)
Creates a bubbleable metadata object from a depended object.
getAttachments()
{@inheritdoc}
addAttachments(array $attachments)
{@inheritdoc}
setAttachments(array $attachments)
{@inheritdoc}
static array
mergeAttachments(array $a, array $b)
Merges two attachments arrays (which live under the '#attached' key).
The values under the 'drupalSettings' key are merged in a special way, to match the behavior of:
string
getGeneratedLink()
Gets the generated link.
$this
setGeneratedLink(string $generated_link)
Sets the generated link.
string
__toString()
Returns markup.
jsonSerialize()
{@inheritdoc}
count()
{@inheritdoc}