public function BubbleableMetadata::addCacheableDependency in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Render/BubbleableMetadata.php \Drupal\Core\Render\BubbleableMetadata::addCacheableDependency()
- 9 core/lib/Drupal/Core/Render/BubbleableMetadata.php \Drupal\Core\Render\BubbleableMetadata::addCacheableDependency()
File
- core/
lib/ Drupal/ Core/ Render/ BubbleableMetadata.php, line 95
Class
- BubbleableMetadata
- Value object used for bubbleable rendering metadata.
Namespace
Drupal\Core\RenderCode
public function addCacheableDependency($other_object) {
parent::addCacheableDependency($other_object);
if ($other_object instanceof AttachmentsInterface) {
$this
->addAttachments($other_object
->getAttachments());
}
return $this;
}